What a run records
A run records its workflow and published version, trigger, input, who or what started it, its idempotency key, timestamps and final outcome. Store the run ID with the record in your system that started it.
IDs in responses
Workflow and run responses carry public IDs only. The API key already identifies the organisation, workspace and environment, so they are not repeated in definitions.
API and dashboard actions
| Action | Where |
|---|---|
| Validate a draft graph | v2 API: POST /api/v2/workflows/validate (workflows.write) |
| List, create and read workflows | v2 API: GET and POST /api/v2/workflows, GET /api/v2/workflows/{workflowId} (workflows.read / workflows.write) |
| Replace a draft | v2 API: PATCH /api/v2/workflows/{workflowId} (workflows.write) |
| Publish a version (required before any run) | v2 API: POST /api/v2/workflows/{workflowId}/publish (workflows.write) |
| Start a run of a published workflow | v2 API: POST /api/v2/workflows/{workflowId}/runs (workflows.execute) |
| Read one run | v2 API: GET /api/v2/workflow-runs/{runId} (workflows.read) |
| Cancel or replay a run | v2 API: POST /api/v2/workflow-runs/{runId}/cancel or /replay (workflows.execute) |
| Decide an approval | v2 API: POST /api/v2/workflow-approvals/{approvalId}/decision (workflows.approve) |
| Create a schedule or retry one failed step | Dashboard only |
Step states
| State | Meaning |
|---|---|
| Pending | Waiting for earlier steps |
| Ready | About to start |
| Running | In progress |
| Waiting | Waiting for a document operation or an approval |
| Succeeded | Finished successfully |
| Failed | Finished with an error |
| Cancelled | Stopped on purpose |
Steps that process documents
A processing step starts a document operation and waits for it. The step succeeds or fails only when the operation does, so the run's result always matches the actual output version.
Approvals
- An approval belongs to one run, step and workflow version.
- It records who decided, the decision, the reason and the time.
- It is decided once and moves the run on exactly once.
- A decided approval is never reopened.
Cancelling
Cancelling stops new steps from starting and tries to cancel operations in progress. Work that already finished, such as a sent email, stays done, and the run reports what completed; nothing is rolled back.