Skip to content

Human Task Activities

Version: 1.3.3  ·  ID: zoan-packages-human-tasks  ·  Author: Zoan Software

The Human Tasks package lets a process ask a person for a decision: approve a refund, validate a piece of data the robot couldn’t read well, choose among several options. The robot creates a task in the Zoan Cloud Tasks inbox, with the files the person needs to decide; the person reviews it, decides (and, if needed, fills in a few fields or a complete form, with tables and attachments) and the process continues with that decision.

  1. The robot creates the task with Create Human Task: a title, the context, the data the person must see, the attachments and the decision options (Aprobar and Rechazar —approve / reject— by default).
  2. The task is always addressed to a person (by email) or a role: only they see it in the Zoan Cloud Tasks inbox and get an email with the link. A person with several roles sees the tasks of all their roles.
  3. Someone claims the task, reviews the data and decides, with an optional comment and the fields you ask for.
  4. The process receives the decision, the comment and the fields; the files the person attached in their answer are downloaded with Download Human Task File.

A task goes through these statuses:

StatusMeaning
pendingCreated, waiting for someone to claim it.
claimedA person claimed it and is reviewing it.
completedDecided. The chosen option is in decision.
cancelledCancelled (by the process or by a person).
expiredThe deadline (dueInHours) passed without a decision.

The robot doesn’t “sleep” indefinitely, so choose the pattern based on how long the decision may take:

  • Minutes → wait in the same process. Create the task and use Wait for Human Task: the robot checks the task every few seconds and continues when someone decides. Ideal for a quick approval in the middle of a process.
  • Hours or days → resume with another process. Create the task with onCompleteProcess and end the process. When someone decides (or the task expires, or a person cancels it from Zoan Cloud), Zoan Cloud runs that other process with the decision as inputs, on the same agent and robot session.
  • Batches → work queue. If there are many decisions (fifty invoices a supervisor approves one after another), link each task to a queue item with queueName: a single performer processes everything that was decided. The Human decisions in batches guide explains it.
ActivityTypeOutputWhat it does
Create Human Taskhuman-task-createobjectCreates a task for a person to decide
Wait for Human Taskhuman-task-waitobjectWaits for the task to be decided, cancelled or expire
Cancel Human Taskhuman-task-cancelobjectCancels a task that’s still open
Download Human Task Filehuman-task-download-fileList<string>Downloads the files the person attached in their answer

Create, Wait and Cancel return the task as a dictionary with the same keys:

FieldTypeDescription
idstringTask id.
statusstringOne of the statuses above (or timeout in Wait for Human Task).
titlestringTitle.
decisionstringChosen option; null until someone decides.
commentstringComment of whoever decided, or the cancellation reason.
fieldsDictionaryFields the person filled in (empty until someone decides).
formDictionaryname and version of the form, or null.

Ask for approval of a refund and act on the decision:

Create Human Task title = "Approve refund #0001"
data = { "Customer": "Test customer", "Amount": "150.00" }
assignRole = "tenant-admin" → output: task
Wait for Human Task taskId = task["id"] timeoutMinutes = 30 → output: result
If condition = result["decision"] == "Aprobar"
├─ then:
│ ... record the refund ...
└─ else:
Log level = info message = "Refund not approved: " + str(result["status"])