Orchestrating Human Tasks with Conductor
Human tasks are used when you need to wait your workflow for an interaction with a human. When your workflow reaches the human task, it waits for a manual interaction to proceed with the workflow.
It can be leveraged when you need manual approval from a human, such as when a form needs to be approved within an application, such as approval workflows.
To support human-involved tasks, Conductor offers a set of features:
- User Forms: Used to build forms that can be hosted in Conductor UI.
- Human Tasks API: Suite of APIs to manage the lifecycle of Human tasks connected to Conductor workflows.
Creating User Forms
You can compose and host forms that can be used in the Conductor UI.
A user form is to be created only if they are to be hosted within your Conductor cluster. If you are hosting this in any external system, you may not create a user form and proceed directly with the next step - Defining Workflow.
To create a user form from Conductor UI,
- From the left menu, navigate to Definitions > User Forms.
- Click + New Form.
- Provide a name for the form.
- Create the user form based on your requirements by dragging and dropping the available components from the Conductor UI.
- While adding the components, you have the provision to make the fields mandatory by checking the required button.
- Under Layout configuration, you can provide a Layout label visible at the layout's header.
- Once the template is created, you can preview it by clicking the Preview button.
- Save the template.
If you make any changes to the existing user form, you can save it as a new template version.
Defining Workflow
To define a workflow from Conductor UI,
- Navigate to Definitions > Workflow from the left menu.
- Click +Define Workflow, provide a workflow name, and add a Human Task at the required point of the workflow.
The human task needs to be configured with the following parameters:
Human Task Parameters
Parameter | Description |
---|---|
Task Display Name | The display name for the human task to be displayed in the human task execution list. Whenever a workflow containing a human task is executed, the execution status of the human task can be viewed under Executions > Human tasks from the left menu on your Conductor console. The name specified under this field can be used to identify your human task execution from Executions > Human tasks list. |
UI template | Choose the user form you have created previously here. Similar to workflows, the user forms can also have different versions. You can also choose the required version. Click on the View button to get a quick preview of the template. Note: This optional field comes into use only if the forms are hosted in the Conductor itself. If you are hosting the forms in an external system, you can leave this field empty. |
Assignment policy | Configure the assignment policy here. If you haven’t configured any policy under this field, it’s free for all, which indicates that anyone, i.e., can pick a particular human task; there is no limitation on the access for this task. To add a new assignment, click the +New assignment button:
|
After assignments | Choose the action to be carried out after the assignment policy is timed out. You can choose any of the following actions:
|
Trigger policy | Choose the trigger policy to be applied. This field is optional. The trigger policy works based on the human task state in the Executions > Human Tasks list.To add a trigger policy, click the +New trigger button. You can choose from the following trigger policies:
|
Input parameters | If you have created a user form in Conductor, the fields mentioned in the user form will be added as input parameters here by default. You can also pass these parameters as inputs/outputs from tasks/workflows. In addition, you can add the required parameters here. |
- Save the workflow definition.
Executing Workflow
Now, you can run the workflow from the Conductor UI.
- From the left menu, click Run Workflow.
- Choose the workflow to run and provide any input parameters if defined.
- Click Run Workflow.
- Once the workflow is run, click on the workflow ID generated.
- The workflow would be in the RUNNING state.
Completing Human Task
Once your workflow execution is initiated, navigate to Executions > Human Tasks. Here, the human task would be listed.
You can view the human task details, such as the task ID, Name (Task Display Name specified in the workflow definition), task state, assignee, claimant, etc.
You can have two different views for human task execution. For a regular non-admin user, you get the Task Inbox view that lists all the tasks assigned to you or left open.
On the other hand, if you are an admin (cluster admin or the task admin - who created the workflow containing human tasks), you can also have another view. Click Switch to Task Admin View to have a list of human tasks within the Conductor cluster. The cluster admin can view all the human tasks whereas the task admins (who created the workflow containing human tasks) can only view the tasks created by them.
Claiming Task
The assignee can claim the task. To do this:
- Click on the task ID & you can view the form details.
- Click Claim.
- Select the dropdown arrow adjacent to Claim to override the claim.
- Utilize the Skip option to bypass the task. Access the dropdown menu under Skip and choose Skip with a reason to provide an explanation for skipping the task.
- Within this interface, you have the ability to allocate to another user/group through the Assign to a different subject option.
Once claimed, you can update or complete the task. In addition, you can release the task to remove your assignment so that someone else can claim the task.
Once the task is completed from here, the workflow moves to the next step.