# Overview

Canonical URL: https://developers.iagenify.com/sdk/ref/workflow-run/
Language: en

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

Status: 5 methods · 5 statuses · survives your process

| Call | Does |
| --- | --- |
| [refresh()](/sdk/ref/workflow-run/refresh) | Re-reads its state. |
| [wait(options)](/sdk/ref/workflow-run/wait) | Polls until it reaches a status you named. |
| [resume(stepId, data)](/sdk/ref/workflow-run/resume) | Approves a waiting human step. |
| [retry(stepId)](/sdk/ref/workflow-run/retry) | Runs it again from a step, keeping what came before. |
| [cancel()](/sdk/ref/workflow-run/cancel) | Stops it. |

## What data holds {#data}

```javascript
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 {#statuses}

| status | Means | What you can do |
| --- | --- | --- |
| `running` | In progress. | `cancel()` |
| `waiting` | Stopped at a human step. | `resume()` · `cancel()` |
| `succeeded` | Finished. | — |
| `failed` | A step failed. | `retry()` |
| `cancelled` | Stopped. | — |

## Every method updates the object {#mutating}

`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.

- [wait()](/sdk/ref/workflow-run/wait): The usual way to follow one.
- [resume()](/sdk/ref/workflow-run/resume): Approving.

```python
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"
# }
```
