Manage Runs

Every trigger occurrence becomes a durable run with its own identity and status. The management commands let you find that run, understand its safe operational state, and request cancellation without opening the database yourself.

List recent history

Terminal
woml list --workflow orders --status failed --limit 50

Use no filters for a general recent view:

Terminal
woml list

Filter by workflow when one deployment owns many definitions, and by status when investigating failures or outstanding work. Limits range from 1 to 200. Add --json when another tool will consume the result.

Inspect one run

Terminal
woml get <runId>
woml get <runId> --json

Inspection reports safe status, steps, attempts, waits, control flow, lifecycle, policies, cancellation, and bounded workflow-call relations. It omits payloads, result values, credentials, and stack traces.

That omission is deliberate. get is an operations view, not a full business-data export. If a workflow needs to preserve a business result, store it deliberately in your database or object storage rather than depending on administrative history.

For live, readable step output, follow the run:

Terminal
woml <runId> --logs

Cancel active work

Terminal
woml cancel <runId>

Cancellation is durable and cooperative. It preserves already committed external effects and does not claim to roll them back.

When cancellation wins, WOML stops admitting new nodes for the run, signals active script or capability work, invalidates approval capabilities, records an honest terminal state, then runs <on-cancel> and <on-complete> when defined.

Cancellation cannot unsend a message, refund a payment, or undo a database write that an external system already committed. Design compensation as explicit workflow work when your domain needs it.

Independent child workflows started with services.workflows.start() are not cancelled automatically. They are separate runs by design. Synchronous call() relationships remain visible in bounded run relations for investigation.

Address the correct runtime

All three commands accept --state. Use the same durable state path as the runtime:

Terminal
woml get run_abc123 --state ./data/workflow-history.sqlite
woml cancel run_abc123 --state ./data/workflow-history.sqlite

See Cancellation and Failures for the execution semantics behind these commands.