Process flow - approval task
There are different operations and tasks that can be created which are often automated ones. However, there are some manual tasks as well, where an input is required from a user, like in the case of Input task and the Approval task. The tasks would require manual intervention or in other words require or wait for some input from specific users or a group of users.
We have already seen how to create an Input Task in Workflows. Now let us understand how to create an Approval Task in Studio Workflow. An Approval Task is a request/action that an approver reviews and responds to, either as an approval or rejection of the action. The approval process involves providing an input on submitting a form which would trigger a Workflow that includes an Approval task that sends a notification to the receiver. The action is completed when the receiver accepts or rejects the request sent.
Adding the Approval task
To add an approval task to your form or app you would first add a workflow. Select the Approval task and click Continue.
Whenever the form is submitted, this workflow would be triggered.
Configuring the Approval task
The configuration of the approval task involves assigning the task to the respective assignee. This configuration needs to be done in the Approval tasks as follows -
Assign the task:
You need to select the user to whom you would want the task to be assigned for approval. Select the assignee for this task. It can be assigned to the Initiator, or last user, or to a group of users based on filter or even directly to an individual user.
You can also assign it to the initiator’s manager.
It can also be assigned to a group of users related to the initiator.
Once you have configured the assignee of this task, click Done 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.
Now you can add a new task below the Approval Tasks, by clicking on the ‘+’ icon, below the Approve/Reject endpoints connect (as shown in the image below). In some scenarios you might even have a task that is always executed irrespective of whether the approval task is Approved or Rejected.
After creating the app and adding the workflow for approval and subsequent actions, you need to first publish your app before you can receive the notifications to your web app or mobile app.
Now when the app is run after publishing you can see the notification in the Status App bar > Updates as shown below.
You can thus use the approval task for initiating action from the specified users. There can be different actions that you may add after the approval or rejection like inserting or updating data, triggering a notification email, and so on.
You can also have a look at this article here to understand how to create an approval task.