Orchestrating Human Tasks with Conductor
Human tasks are used when you need to pause 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 in situations where forms need to be used 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
Conductor has a feature to 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 console.
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 that would be visible at the beginning of the layout.
- Once the template is created, you can have a preview of the template by clicking on the Preview button.
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.
The human task needs to be configured with the following parameters:
Human Task Parameters
Parameter | Description |
---|---|
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. 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. |
Task Owners | Select the task owner for the human task. The task owner grants permission to perform a human task. Choose the users/applications in Conductor who should own the task. In certain situations, the applications created in Conductor may be required to retrieve this task. You can add the required application as a task owner in such cases. Notes:By default, the Conductor Admin can access all the human tasks. |
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 +New assignment button:
|
Trigger Policy | Choose the trigger policy to be applied. This field is optional. You can choose from the following trigger policies:
In addition, you can also include more inputs while starting the workflow by clicking the Additional Inputs button and providing the additional inputs such as input parameters, correlation ID & task to domain mapping. |
Predefined input | The inputs to the template can be parameterized from here. Check out the document on how to pass parameters to the inputs. |
- 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 task would be in the RUNNING state.
Completing Human Task
Once your workflow execution is initiated, navigate to Executions > Human Task. Here, the human task would be listed.
You can view the human task details, such as the workflow it is part of, state, assignment policy, and assignee.
The task owner/assignee can claim the task. To do this:
- Click on the task ID & you can view the form details.
- Click Claim.
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 stage.