Skip to content

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.

ValueTerminalMeaning
queuedNoDefault 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.
scheduledNoThe run has been started and is waiting to be picked up by an automation worker.
runningNoA worker is actively executing pathway steps.
pausedNoExplicitly paused via API or UI. Resumable.
completedYesRequired work finished successfully.
erroredYesA node failed. Inspect error on the run.
canceledYesEnded 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.
stoppedYesEnded by MedFlow without completing (for example the trigger was disabled or an operator halted it).

The API value is canceled (one l).

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.

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.

FromToHow
(created)queuedDefault. The run exists but has not been started
queuedscheduledStarted by autoStart, a person, or the start endpoint
scheduledrunningAn automation worker claims the run
runningpausedPause
pausedrunningResume
runningcompletedSuccess
runningerroredA node failed
queued / scheduled / running / pausedcanceledCancel by a caller, or a Decision node rules out the remaining steps
queued / scheduled / running / pausedstoppedMedFlow 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.

  • GET /v1/runs/:runId (one run)
  • GET /v1/triggers/:triggerId/status (aggregate counts per trigger)

For polling patterns, see Monitoring runs.