Documentation / Conception / Guides pratiques / Publish and roll back a workflow

Publish and roll back a workflow

Saving and activating are two separate acts — in every environment. Creating a brand new workflow is the one exception: it has no version history to draft against, so the first save publishes v1 directly.

Save a draft

Save draft stores your work without routing anything: a draft is never used to handle an incoming event. Drafts are validated loosely (schema only) so you can save mid-edit, and they are simulatable like any spec.

If someone else changed the workflow since you loaded it, saving fails with a conflict — reload to get their version, then reapply your change. Last-write-wins overwrites cannot happen silently.

Publish

Publish runs the full validation (schema, typed dataflow, terminology), then freezes your draft as an immutable version vN and makes it the active version — the one that handles the next incoming event. You can attach a short note (why this change); it shows up in the history.

Publishing warns you if another active workflow claims the same event type: only the first one (by slug order) receives the event, so a duplicate claim is almost always a mistake. Two kinds of trigger are exempt, because they are not routed by event type at all: webhooks (routed by the UUID in their URL) and sub-workflows (routed by the caller's execute node). Several workflows normally share those.

Runs already in flight are untouched: each run executes the spec that was active when it started (journaled with the run) — including the sub-workflows it calls, whose versions are pinned at the same moment. So publishing a new version of a callee cannot change a run that is already under way.

Roll back

The version history (in the workflow view) lists every published version with its author, date, and note. Restore an earlier version to make it active again — instantly, with no redeploy. Rolling back does not delete anything: the newer version stays in the history and can be re-published later.

Where each run's version shows

The Executions view shows the version badge (v3) each run was started with, so "which version handled this patient?" is always one glance away.

75 documents4 sectionssource : /docs · généré au build