In this example, we demonstrate how to configure a workflow where a task is delegated to the manager of the person who initiated the task. The process is completed when the assigned task is approved by the manager.
Step-by-Step Guide
Creating a Task to Assign to the Manager
Create a New Process
Select "All Folders" from the menu and click "+New Folder" to create a new folder.
...
In the process version screen, press the “Edit” button to open the process designer.
Create the Tasks
In the process designer, create two consecutive tasks. The first task will be initiated by any user in the organisation, and the second task will be for the manager's approval.
...
When the manager approves the form, the process is completed. If the manager rejects it, the task returns to the expense form. This behaviour can be adjusted using the arrows that appear from the red dot. The red dots become visible when you hover over the buttons.
To set the Reject button to return to the Expense Form, drag the red dot from the Reject button and drop it on the left side of the first task (Expense Form). This ensures that when the Manager rejects the approval task, the process returns to the beginning.
...
Assign Roles to the Tasks
This section assigns a role to the tasks you want to submit.
...
Code Block | ||
---|---|---|
| ||
$Membership.FindManager( $Xml.Evaluate('PersonnelInformation/Personnel') ); |
The FindManager function allows you to locate the manager of the provided identity. In this example, the identity is retrieved directly from the form using
$Xml.Evaluate('PersonnelInformation/Personnel')
, which gives us the identity of the person selected on the form. However, if you prefer to use the form's initiator as the identity, simply pass $Initiator as the parameter instead.
...
Then, the second task, called Manager Approval, belongs to the manager of that personnel.
...
Testing
To close the process designer, select "Close" from the top menu.
...