Automation status
Every pathway run exposes an automationStatus field. A run always has one, from the moment it is created. Use it to know whether work is waiting, in progress, or finished.
Values
Section titled “Values”| Value | Terminal | Meaning |
|---|---|---|
queued | No | Default status. The run has been created but has not been started. It waits until it is started, either automatically (autoStart) or by a person or the start endpoint. No worker is assigned yet. |
scheduled | No | The run has been started and is waiting to be picked up by an automation worker. |
running | No | A worker is actively executing pathway steps. |
paused | No | Explicitly paused via API or UI. Resumable. |
completed | Yes | Required work finished successfully. |
errored | Yes | A node failed. Inspect error on the run. |
canceled | Yes | Ended before finishing, by a caller (API cancel or a user in the UI) or by a Decision on the pathway that rules out the remaining steps. |
stopped | Yes | Ended by MedFlow without completing (for example the trigger was disabled or an operator halted it). |
The API value is canceled (one l).
Queued vs scheduled
Section titled “Queued vs scheduled”Both are non-terminal and neither is executing, but they mean different things. queued is un-run: nobody has hit play yet, so nothing is scheduled to work it. scheduled means play has been hit and the run is now waiting for an automation worker to claim it. The lifecycle is queued then scheduled then running.
Canceled vs stopped
Section titled “Canceled vs stopped”Both are terminal and neither finished the work. canceled means the run ended before completion, either because someone ended it (you called cancel, or a user canceled in the UI) or because the pathway did, when a Decision node takes one path and rules out the others. stopped is MedFlow-initiated for operational reasons: the trigger was disabled, the tenant was suspended, or an operator halted the run.
Typical transitions
Section titled “Typical transitions”| From | To | How |
|---|---|---|
| (created) | queued | Default. The run exists but has not been started |
queued | scheduled | Started by autoStart, a person, or the start endpoint |
scheduled | running | An automation worker claims the run |
running | paused | Pause |
paused | running | Resume |
running | completed | Success |
running | errored | A node failed |
queued / scheduled / running / paused | canceled | Cancel by a caller, or a Decision node rules out the remaining steps |
queued / scheduled / running / paused | stopped | MedFlow halts the run |
When a trigger has autoStart: true, a run moves from queued to scheduled on its own, so callers usually see scheduled or running.
Terminal values are completed, errored, canceled, and stopped.
Where status appears
Section titled “Where status appears”GET /v1/runs/:runId(one run)GET /v1/triggers/:triggerId/status(aggregate counts per trigger)
For polling patterns, see Monitoring runs.