Wait for task
Suspend until a Task inbox task (an approval or a form, from Create task or a workflow) is completed or cancelled. The run's user must be allowed to see the task, or the task was made by this run.
Command in the Long-running agents toolkit · id ooa.longrunning/wait_for_task · 4 inputs (1 required), 3 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Task ID | String | Yes | From Create task. | |
| Timeout (seconds) | Number | No | Stop waiting after this many seconds; wait as long as it takes when empty. | |
| On timeout | String | No | error | error: fail with LONGRUN.TIMEOUT; continue: carry on with Timed out true. |
| Pool | String | No | Carry on on any runner of this pool; on the same runner when empty. |
Outputs
| Output | Type | What it is |
|---|---|---|
| resumed_by | String | resumed_by: what ended the wait (time, task, queue_item, job, callback, admin or timeout). |
| timed_out | Boolean | True when the timeout ended the wait. |
| result | Dictionary | task_id, status (completed or cancelled), outcome (approved, rejected, submitted), result (the answers, or approved/approver/comment) and completed_by. |