Skip to content

Commit

Permalink
Updates from #745
Browse files Browse the repository at this point in the history
  • Loading branch information
RizaFarheen committed Sep 16, 2024
1 parent 7d7cce7 commit 5ceb319
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
48 changes: 35 additions & 13 deletions docs/developer-guides/orchestrating-human-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ During development, you can test and execute Human tasks internally on Orkes Pla
**To orchestrate human-involved tasks:**
1. Create a user form schema for the Human task.
2. Define the Human task.
3. Configure the Human task in your workflow definition to set the assignment and trigger policy.
3. Configure the Human task in your workflow definition and set the assignment and trigger policy.
4. Display the user form on an external UI.


Expand Down Expand Up @@ -122,17 +122,30 @@ Add the Human task to your workflow and configure its assignment policy and trig
* **Conductor User** or **Group**—Select this if the assignees are Conductor users and will access Orkes Platform to complete the task.
<p align="center"><img src="/content/img/assignment-policy-human-task.png" alt=" Assignment policy of human task" width="70%" height="auto"></img></p>
3. Enter the **SLA minutes** to specify the assignment duration before it times out. Use 0 minutes to set a non-expiring assignment.
4. In **After assignments**, select the strategy for when the assignment times out.
4. In **After assignments**, select the strategy for when the assignment times out.
* **Leave open**—The Human task execution remains open to be picked up by anyone.
* **Terminate**—The Human task execution is terminated and marked as deleted, and the workflow fails with the error “Task terminated as no more assignments pending and completion strategy is TERMINATE”.
5. If needed, add another assignment to create a multi-level assignment chain.
<p align="center"><img src="/content/img/assignment-policy-human-task-hierarchy.png" alt="Assignment policy of human task in hierarchical order" width="90%" height="auto"></img></p>
6. (Optional) Add a trigger policy to start new workflows when the state of the Human task changes.
1. In Trigger policy, select **(+) New trigger**.
2. Select the **Trigger event**.
3. Select the **Workflow** to start and its **Version**.
4. (Optional) Select **Additional inputs** to configure the workflow’s input parameters, correlation ID, and task-to-domain mapping.
5. If needed, add another trigger to start another workflow.
6. (Optional) Add a trigger policy to start new workflows when the state of the Human task changes. The trigger policy works based on the human task state in the **Executions > Human Tasks** list.

<p align="center"><img src="/content/img/human-task-states.png" alt="States in Human tasks based on which trigger policies can be defined" width="90%" height="auto"></img></p>

To add a trigger policy:

1. In Trigger policy, select **(+) New trigger**.
<p align="center"><img src="/content/img/trigger-policy-human-task.png" alt=" Trigger policy for human task" width="90%" height="auto"></img></p>
7. In Input parameters, configure the form fields depending on the input source:
2. Select the **Trigger event**, the **Workflow** to start and its **Version**.
* **Pending**—If the human task execution is in the pending state, the trigger workflow is executed.
* **Assigned**—Once the human task is assigned to a specific assignee, the trigger workflow is executed.
* **In progress**—Once the human task execution is in the progress state, the trigger workflow is executed.
* **Completed**—Once the human task execution is completed, the trigger workflow is executed.
* **Timed out**—Once the human task execution is timed out, the trigger workflow is executed.
* **Assignee changed**—Once the human task assignee changes (as per the assignment policy or if left open and picked by anyone), the trigger workflow is executed.
* **Claimant changed**—When the claimant of a human task changes (e.g., if the initially assigned user does not claim the task and it remains open, allowing another user to claim it), the trigger workflow is executed.
3. (Optional) Select **Additional inputs** to configure the workflow’s input parameters, correlation ID, and task-to-domain mapping.
4. If needed, add another trigger to start another workflow.
5. In Input parameters, configure the form fields depending on the input source:
* If the field is to be filled up by the assignee, you can leave the parameter value empty or pass in a default value that can be modified before submission.
* If the field is read-only and will be passed from somewhere in the workflow, enter a parameter value. The value can be passed as a variable.

Expand Down Expand Up @@ -222,10 +235,8 @@ The workflow ID is generated. You can use it to view the execution progress and
As a Conductor user, you can also access all Human task executions on Orkes Platform. The list of Human task executions can be found in the left navigation menu under **Executions** > **Human Tasks**, allowing you to claim and complete pending Human tasks and view past Human task executions.

Depending on your permission level, there are two tab views available on the page:
* **Task inbox**—Contains unassigned Human tasks left open to everyone as well as assigned tasks to you or your group, pending and completed.
* **Admin search**—(applicable only to cluster admins or task creators) Contains all Human tasks in the Conductor cluster.

<p align="center"><img src="/content/img/human-task-inbox-view.png" alt="Task inbox view of human task execution" width="100%" height="auto"></img></p>
* **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 creator—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.

<Tabs>
<TabItem value="claim task" label="To claim a task">
Expand Down Expand Up @@ -271,6 +282,17 @@ In your selected Human task, select **Skip** to bypass it. Alternatively, select

### Search Human task executions

#### Task inbox

The task inbox view is the non-admin regular user view that lists all the tasks assigned to you or left open.

<p align="center"><img src="/content/img/human-task-inbox-view.png" alt="Task inbox view of human task execution" width="100%" height="auto"></img></p>

* 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

If you are a cluster admin or task admin (workflow creator for the Human task), you can use **Admin search** tab in **Executions** > **Human Tasks** to filter and sort through all Human task executions for testing and debugging.

<p align="center"><img src="/content/img/admin-view-human-task.png" alt="Admin view of human task executions" width="100%" height="auto"></img></p>
Expand Down
4 changes: 2 additions & 2 deletions docs/reference-docs/worker-task.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ For a full guide on how to use workers, refer to Using Workers.

**To add a Worker task:**
1. In your workflow, select the **(+)** icon to add a new task. There are two ways to add a worker task:
* Search for your task using its task name and select to add it to the workflow.
* Add a **Worker Task (Simple)** and enter the task name in Task Definition.
* Search for your task using its task name (created previously) and select to add it to the workflow.
* Add a **Worker Task (Simple)** and enter the task name in Task Definition. This creates a new task definition.
2. Configure the task, such as its inputs, caching, and optionality.


Expand Down

0 comments on commit 5ceb319

Please sign in to comment.