Adding branching task

With Studio you can define conditional tasks without writing a single line of code. This is possible with the concept of branching that enables you to define conditional rules for the different tasks and to then perform actions based on whether the condition/s is satisfied.You can have such branching tasks within your workflows in Studio defined for different processes. There are a minimum of two branches that you would need to define, there can be more if required.

Let us have a quick look at this video here to understand the concept of branching.

Now as we have seen the approval task let us consider a scenario where we have a leave application and approval process. The leaves would be of two type LWP that is leave without pay and Other leaves which include the Casual and Sick leave. The LWP would be approved by the HR team while the other leaves would be approved by the Manager.

Here for the approval process, we would be using two branches which would eventually move to the Update Sheet task for inserting records to the sheet.

From the Select Task select the Branch task and click Continue. Note that the two branches are added to the workflow.

Now if you click any of the branches you can add the condition to be satisfied for the branch to be executed. You can assign it a self-explanatory name and define the condition for Executes When and click Done. In the example we are considering here, let us provide the condition that the branch Executes when leavetype is equal to “LWP”. Here leavetype is the value selected for the Leavetype dropdown on the form. We would check if the value entered is LWP or Casual leave or Sick Leave and executes the branch accordingly.

After you provide the conditions as required, you would define the next steps or tasks to be executed. It can be different tasks that could be executed or you can move to the next step that might be common but one which uses different values from the two branches.

In this example we are considering here, we would be using two different Approval tasks that would be directed to the HR if leave applied is “LWP” and directed to “Manager” if leave applied is Casual leave or Sick Leave. Once the approval task is complete the records would be inserted to the sheet with the Update sheet task.

Once the leave type is selected and details for the leave request are entered, the form would be submitted. The workflow is linked to the Submit button. It is triggered when the Submit button is clicked which in turn initiates the process we defined earlier. The leave type is checked and an approval request is sent to the specific user. After the user approves or rejects the requests, the records are inserted with the Insert task.

There can be different situations when you can make use of the branching within workflow. They can include approval tasks, notification tasks, update task, and all others to define a clear process.

approval tasks to users