Assign a Task to a Manager¶
Scenario¶
Use this example when the next task should automatically go to the manager of the selected person or initiator.
Prerequisites¶
- permission to create processes and roles
- organisation data with manager relationships already defined
- access to role expressions in the process designer
Steps¶
Create the Process and Tasks¶
- Create a process and open it in edit mode.
- Build two tasks:
- the initial form task
Manager Approval- Add
ApproveandRejectactions to the manager task. - Route
Rejectback to the first task if you want resubmission.

Create the Manager Role¶
- Add a new role named
Manager. - Set the role type to Expression.
- Choose JavaScript as the expression language.
- Use a manager lookup expression such as:
1 | |
This expression routes the task to the manager of the identity selected on the form. If your design should instead use the process initiator, you can adapt the expression accordingly.

Assign the Role to the Task¶
- Return to the process designer.
- Select the
Manager Approvaltask. - Choose the
Managerrole in the task settings.

Test the Process¶
- Commit the process changes.
- Start the process from the folder.
- Submit the first task with a selected person.
- Verify that the approval task appears for that person's manager.
Result¶
The approval task is now routed automatically to the manager resolved from organisation data.