Ask a person from an automation
Raise an action task from a workflow or a Python automation, wait for the decision or continue in a new job, and see what a waiting job looks like.
An automation hands a decision to a person by raising an action task from a published app version, then reads the outcome and the reviewer's response. You can do this from a workflow with the Action Hub activities or from Python with velophex.runtime. Before you start: Action Hub is enabled for the tenant, and the app is published. Note its key and version on the app's page, or copy a snippet from Inputs & outputs. See Build an action app. The app is tenant-wide or belongs to the job's workspace. The automation runs as a job on a Robot. The activities and SDK calls use the job's token, so they do not work in a local run from Studio. Choose how to wait# You need Use The robot while a person decides An answer within minutes, in the same job Create a task, then wait for it with a timeout of up to 60 minutes (default 15). Held An answer in hours or days, in the same workflow Wait for Action Task with a timeout over 60 minutes. The job is Suspended and resumes when the task closes or the timeout passes. Free An answer in hours or days, in a new job The app's Continuation. Completing the task starts the continuation automation with the decision. Free The decision later in the same job Create Action Task now, Get Action Task in a later step. Free between steps Python automations cannot suspend: wait_for_action_task always waits in the job. For long waits from Python, use a continuation. Use the workflow activities# The Action Hub activities are in the VeloPhex.System.Activities package. Search the toolbox for approval or human task. See Activity catalog. Create Action Task raises the task and returns its id. Property Description App Key The app's key, for example approval. Required. Version The published version to use. Required. Input The request fields as a JSON object. It must match the version's input schema. Title What the inbox shows. The app's name when empty. Correlation Key Identifies the task within the job, so a retried step gets the same task back. Empty uses the activity's own key. Assignee User Id / Assignee Group Assign the task to one user, or queue it for a group. Empty leaves it in the queue. Due At When the decision is due. The app's Due in applies when empty. Priority low, normal or high. The app's priority when empty. Task Id (output) The new task's id. Wait for Action Task waits for the decision. Property Description Task Id The id Create Action Task returned. Required. Timeout (minutes) How long to wait. 0 uses 15 minutes. Up to 60 the job waits on the robot; over 60 the job suspends. Timeout Behavior ReturnTimedOut (default) sets the status to timedOut and continues; Throw faults with VXORCH-ACTION-TASK-TIMED-OUT. Either way the task stays open. Action Task (output) The task: Status (completed, canceled or timedOut), Outcome (the action id), Output (the response fields), Completed By, Completed At and Late. Get Action Task reads a task the job created (Task Id in, Action Task out) without waiting. Use Python# main.pyPythonCopyfrom velophex import entrypoint, runtime @entrypoint def main(invoice_number: str, amount: float) -> dict: task_id = runtime.create_action_task( "approval", 1, {"title": f"Approve invoice {invoice_number}", "amount": amount, "requester": "AP robot"}, assignee_group="AP Approvers", ) result = runtime.wait_for_action_task(task_id, timeout=600) if result.status != "completed": # "canceled", or "timedOut" (the task stays open) return {"approved": False, "status": result.status} return {"approved": result.outcome == "approve", "comment": (result.output or {}).get("comment")} create_action_task(app_key, version, input, *, correlation_key, title, assignee_user_id, assignee_group, due_at, priority) returns the task id. wait_for_action_task(task_id, *, timeout=900.0, raise_on_timeout=False) returns a result with status, outcome, output, completed_by, completed_at and late. It never waits past the job's deadline or a stop request. get_action_task(task_id) reads the task without waiting. See Python SDK API reference. Wait for days without holding a robot# When Wait for Action Task has a timeout over 60 minutes and the task is still open: The workflow saves its state and the job becomes Suspended. No robot is held. When someone completes or cancels the task, the job goes back to the queue and continues on the next free robot. The activity reports the decision exactly as a short wait would. If the timeout passes first, the job wakes and the activity reports timedOut (or faults, with Throw). The task stays open. The job's details list the wait as action-task: followed by the task id. Using Resume on the job while the task is still open keeps it waiting. Canceling a suspended job flags its open tasks Automation ended. See Jobs. Continue in a new job# Give the app a Continuation (see Build an action app) and let the first automation end after creating the task. When the task is completed, Action Hub starts the continuation automation once, as the app's Run as user. Its inputs are the response fields plus actionTask: Continuation job inputsJSONCopy{ "comment": "Matches the purchase order.", "actionTask": { "taskId": "0192…", "appKey": "approval", "version": 1, "outcome": "approve", "completedBy": { "userId": "0192…", "name": "Mei Chen" } } } The continuation's entry point must accept these inputs. If the job cannot start, the decision still stands: the failure is written on the task and raised as an error notification. See what a job is waiting for# While a job waits for open tasks, its logs page shows Waiting on task with each task, its due chip and who holds it. Select a task to open it in Action Hub. Avoid duplicate tasks# Creating a task is safe to retry. The same Correlation Key with the same input returns the existing task instead of a second one; the same key with different input fails with action_task_correlation_conflict. Keys are per job, so a restarted job raises new tasks. Pass your own key, such as the invoice number, when the decision belongs to a business record. Errors# Code Cause Fix action_hub_disabled Action Hub is off for the tenant. Ask a platform administrator to enable it. action_app_not_found No app with that key is visible to the job, or it is archived. Check the key on the Apps page and the app's workspace. action_app_version_not_published That version was never published. Publish it, or use a listed version. action_task_input_invalid The input does not match the version's input schema. Fix the fields listed in the error. action_task_correlation_conflict The key was used in this job with different input. Use a different key, or the same input. action_hub_runtime_unsupported The Orchestrator, Robot or package is too old, or the workflow is not running as a job. Update the components, and run the automation as a job. Next steps# Work on tasks Jobs
Choose how to wait
Use the workflow activities
Use Python
Wait for days without holding a robot
Continue in a new job
See what a job is waiting for
Avoid duplicate tasks
Errors
Next steps