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: A suite of APIs that manage the lifecycle of human tasks connected to Conductor workflows.
Creating User Forms
You can compose and host forms to be used in the Conductor UI.
A user form must be created only if it is to be hosted within your Conductor cluster. If you are hosting this in an external system, you may not create a user form and may 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.
- Choose the required form layout (horizontal/vertical) and drag and drop the available components to create the user form.
- While adding the components, you can make the fields mandatory by checking the required button.
- Field Name - This name is filled in the user form section of the workflow definition and is used as the input parameter.
- Label - The name the end-users see while filling out the form.
- Once the user form is created, you can preview it by clicking the Preview button.
- Save the form.
- If you make any changes to the existing user form, you can save it as a new version.
- The user form can also be created using JSON code.
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 that appears 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 the 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. Note: This optional field is used only if the forms are hosted by the Conductor. If you host 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 can pick a particular human task; access to this task is not limited. 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.
|
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 variables from inputs/outputs from tasks/workflows. In addition, you can also add additional 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 / Human Task Executions
Once your workflow execution is initiated, navigate to Executions > Human Tasks.
You have two different views for human task execution based on your permissions to the Conductor cluster.
- Task inbox - As a regular non-admin user, you get the task inbox view, which lists all the tasks assigned to you or left open.
- Admin search - If you are an admin (cluster-admin or the task admin—who created the workflow containing human tasks), you can also have another view: the admin search, which lists all human tasks within the Conductor cluster.
Task inbox
The task inbox view is the non-admin regular user view that lists all the tasks assigned to you or left open (by the assignment policy).
- The executions can be filtered by task name and start time. You can also filter the executions by Available, Completed, or All.
- On the execution page, 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.
Admin search
The admin search view is available to the cluster admin and the task admin (who created the workflow containing human tasks).
On the execution page, 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 filter the data based on the following parameters:
Task names - The human task's name (the Task display name specified in the workflow definition).
State - The status of the human task. It can be IN_PROGRESS, PENDING, ASSIGNED, COMPLETED, TIMED_OUT or DELETED.
Definition names - This field filters based on the task definition name (the name of the human task in the workflow). It supports multiple entries.
Output data search - Used to filter execution based on the output data.
Task reference name - Filters based on the task reference name (Each task created has a unique task reference name). This field supports multiple entries.
Start time - Used to filter execution based on the task execution time.
Input data search - Used to filter execution based on the input data.
Full-text search - Used to query the data using a full-text approach. Only “AND” and “OR” are supported.
noteThe field supports searching all the data within the execution columns based on an “AND” or “OR” query. For an example query like this:
“loan" OR "cc3d2dc-18d4-11ef-a811-8a584d19ffea"
The search will return all results that contain either the text “loan” or the specific workflow ID “cc3d2dc-18d4-11ef-a811-8a584d19ffea”. This means it will include results that match either of the criteria. To get results matching both criteria, use “AND” instead of “OR”.
Filter by actors - Filters based on Claimant or Assignee.
Actor type - Filters based on the actor, i.e., Conductor User, Conductor Group, External User, or External Group.
- User/Group ID - Filters execution based on a particular user/group's name.
Claiming Task
The task assignee can claim the task. To do this:
- Click on the task ID from the executions page & you can view the form details.
- Click Claim.
- Select the dropdown arrow adjacent to Claim to override the claim.
- To bypass the task, use the Skip option. Access the dropdown menu under Skip and choose Skip with a reason to explain skipping the task.
- Within this interface, you can also 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 it.
Once the task is completed from here, the workflow moves to the next step.