As we learnt how to create an Input Task in Workflow, similarly we can create an Approval Task in Studio Workflow. An Approval Task is a request/action that an approver reviews and respond to, either by approving, or denying it. And therefore, an approval task has mainly 3 parts -
- Assignee or the Approver
- Actions on approval
- Actions on rejection
To create an approval task, go to the Workflow editor and click on '+' icon. On the Select Task modal, select the Approval option to create an Approval task, as shown in the below image.
Let's take an example of Employee Leave Application process to understand the approval task. In this leave application, an employee applies for leave by providing information like - leave type, leave start date & end date, and reasons for leave. Based on this information, the user's manager will approve or reject the leave application. Hence, we will have to create an approval task for the manager to review and respond the employee's leave application.
Therefore, when an employee submits a leave application, a workflow should trigger the approval task which will send a notification to the employee's manager. This configuration needs to be done in the Approval tasks as follows -
When you create an Approval task, you should provide a meaningful name to the task in the field TASK NAME (as shown in the below image). This text will be visible to the assignee of Approval Task in the Workflow Status App. In other words, whenever an employee submits a leave application, employee's manager will get a notification message as written in Approval Task Name.
Once you provide a Task Name, click on Next button to go to ASSIGN TASK screen of the Approval Task modal. On this screen, you will be able to select an assignee of this task. You can assign task directly to an individual user or a group of users based on the User Hierarchy.
In our Employee Leave Application example, we have to assign the task to the Manager (userlookupmanager) of the employee who has initiated the leave application and hence the employee becomes the Initiator (as shown in the below example).
Based on the configuration the workflow engine will search the user in userlookupmanager column of the Initiator mentioned in the User Hierarchy sheet and assign him/her the approval task.
Once you have configured the assignee of this task, click on Done button to save the Approval task. On saving, the approval task will be displayed in the workflow editor as shown below.
Any approval task has two paths, Approve & Reject. Either of these paths will execute, when the assignee of the approval tasks opts for either approval or rejection of the request.
You can further add tasks under each path as per the requirement (which will execute only when the approval task is approved or rejected) by clicking the respective '+' icons.
You can also add new tasks below the Approval Tasks, by clicking on the '+' icon, below the Approve/Reject end points connect (as shown in the image below). This task, will always be evaluated irrespective of whether the approval task for Approved or Rejected.
This way, you can create an Approval Task in Studio Workflow