Skip to main content

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.

note

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,

  1. From the left menu, navigate to Definitions > User Forms.
  2. Click + New Form.
  3. Provide a name for the form.
  4. Create the user form based on your requirements by dragging and dropping the available components from the Conductor UI.
  5. While adding the components, you have the provision to make the fields mandatory by checking the required button.

Making form field mandatory in human tasks in Conductor

  1. Under Layout configuration, you can provide a Layout label visible at the layout's header.
  2. Once the template is created, you can preview it by clicking the Preview button.
  3. Save the template.

Creating templates for human task in Orkes Conductor

note

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,

  1. Navigate to Definitions > Workflow from the left menu.
  2. 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 in Orkes Conductor

Human Task Parameters

ParameterDescription
Task Display NameThe 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 templateChoose 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 policyConfigure 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:

 Assignment policy of human task

  • Assign - Choose the user/group type for the assignment policy. It can take the following values:
    • External User - If the user is a non-Orkes user, i.e., residing in an external system, choose this option and provide the user's email ID.
    • External Group - If the group resides outside the Conductor cluster, choose this option and provide the name of your group that resides in the external system.
    • Conductor User - If the task is to be assigned to a user in the Conductor cluster, select this option and choose the user in the next column.
    • Conductor Group - If the task is to be assigned to a group in the Conductor cluster, select this option and choose the group name in the next column.
  • SLA Minute - Provide the time duration in minutes for which the human task is to be picked up for resolution.
Note: Multiple assignment policies can be stacked to create a hierarchical structure. For example, in the following setup, if the first user fails to pick the assignment within the specified SLA minutes, the task will be escalated according to the subsequent assignment policy in the order added here.

Assignment policy of human task in hierarchical order

After assignmentsChoose the action to be carried out after the assignment policy is timed out. You can choose any of the following actions:
  • Leave open - This ensures that the human task execution remains open to pick up by anyone once the assignment policy is timed out as per the specified SLA Minute.
  • Terminate - This option terminates the human task, and the workflow fails. If you check the workflow execution, you can see that the workflow failed with a note indicating the same “Task terminated as no more assignments pending and completion strategy is TERMINATE”.

    Workflow with human task failed on terminate action

  • In the Executions > Human Tasks, this instance of the human task would be marked as deleted.

    Human task deleted in the executions view

Trigger policyChoose 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.

States in Human tasks based on which trigger policies can be defined

To add a trigger policy, click the +New trigger button. You can choose from the following trigger policies:

 Trigger policy for human task

  • Pending - If the human task execution is in the pending state, the workflow chosen under the “Start workflow” field is executed.
  • Assigned - Once the human task is assigned to the specific assignee, the workflow chosen under the “Start workflow” field is executed.
  • In progress - Once the human task execution is in the progress state, the workflow chosen under the “Start workflow” field is executed.
  • Completed - Once the human task execution is completed, the workflow chosen under the “Start workflow” field is executed.
  • Timed out - Once the human task execution is timed out, the workflow chosen under the “Start workflow” field is executed.
  • Assignee change - Once the human task assignee changes (as per the assignment policy or if left open and picked by anyone), the workflow chosen under the “Start workflow” field is executed.
  • Start workflow - Choose the workflow to be triggered.
  • Version - Choose the workflow version.
In addition, you can also include more inputs while starting the workflow by clicking the Additional Inputs button and providing the inputs such as input parameters, correlation ID & task to domain mapping.

Additional inputs for trigger policy

Input parametersIf 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.
  1. Save the workflow definition.

Executing Workflow

Now, you can run the workflow from the Conductor UI.

  1. From the left menu, click Run Workflow.
  2. Choose the workflow to run and provide any input parameters if defined.
  3. Click Run Workflow.
  4. Once the workflow is run, click on the workflow ID generated.
  5. The workflow would be in the RUNNING state.

Human Task in Running state

Completing Human Task

Once your workflow execution is initiated, navigate to Executions > Human Tasks. Here, the human task would be listed.

Human Task List in Conductor UI

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.

info

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.

Admin view of human task executions

Claiming Task

The assignee can claim the task. To do this:

  1. Click on the task ID & you can view the form details.
  2. Click Claim.

Claiming human tasks forms

Notes
  • 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.

    Assigning to a different subject

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.

Update/Complete/Release forms

Once the task is completed from here, the workflow moves to the next step.

Human Task Completed