WorkflowRun

Overview

One execution: where it is, what each step produced, and the four things you can do to it — wait, resume, retry, cancel.

5 methods5 statusessurvives your process
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

CallDoes
refresh()Re-reads its state.
wait(options)Polls until it reaches a status you named.
resume(stepId, data)Approves a waiting human step.
retry(stepId)Runs it again from a step, keeping what came before.
cancel()Stops it.

What data holds

run.data;
// {
//   id, workflowId, status: "running" | "waiting" | "succeeded" | "failed" | "cancelled",
//   input: { … },
//   steps: [{ id, type, status, output, credits, error, warnings, attempts, startedAt, endedAt }],
//   credits, startedAt, endedAt
// }
run.data
# {
#   "id", "workflowId", "status": "running" | "waiting" | "succeeded" | "failed" | "cancelled",
#   "input": {…},
#   "steps": [{"id", "type", "status", "output", "credits", "error", "warnings", "attempts", "startedAt", "endedAt"}],
#   "credits", "startedAt", "endedAt"
# }

The five statuses

statusMeansWhat you can do
runningIn progress.cancel()
waitingStopped at a human step.resume() · cancel()
succeededFinished.—
failedA step failed.retry()
cancelledStopped.—

Every method updates the object

refresh(), resume(), retry() and cancel() all replace data with what came back and return the same instance — so a reference you hold stays current.

It is a snapshot until you refresh it

data is whatever the last call returned. A run moves on the platform without telling you — reading data twice without a refresh gives the same answer.