On this page
Sommatic Docs
Open portal

Publishing

Publish a workflow's draft as an immutable, numbered version that production traffic runs, roll back to an earlier version, read the warnings publishing returns, and pause a workflow per mode without unpublishing it.

View as Markdown
Open in

Publishing is the line between experimenting and operating. Until you publish, only test traffic sees your changes. After you publish, prod webhooks, schedules, mailbox triggers and calls from published workflows run the new version.

Publish a version

Open the … menu next to Save draft and choose Deploy. The studio saves any pending change first, then publishes. A message confirms the new number, for example Flow v4 published successfully.

Shell
curl -X POST "https://api.sommatic.ai/workflow-orchestration/control-plane/flow-design/flow-definition/<flow-definition-id>/publish" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{ "description": "Adds the billing branch" }'

The response is the new flow version, with its version, its graph and a warnings list.

When the workflow comes from Git, Git Sync can publish as part of applying a change. The version records the repository, branch and commit it came from.

What publishing does

  • Copies the current draft (nodes, edges and node positions) into a new flow version.
  • Numbers it with the highest existing number plus one and names it <workflow name> V<number>.
  • Makes it the default version and removes that flag from the previous default.
  • Records it on the flow definition as latest_version_id, with version_counter updated.

Publishing an empty draft fails with Cannot publish an empty flow (no draft nodes). Existing versions are never modified.

Warnings

Publishing returns non-blocking warnings. Today they flag keys written as literal values in a node’s configuration instead of a stored credential (code: "literal_secret"), with the node and the field. The value itself is never included. Move the secret to Credentials and pick it in the node.

Roll back

There is no separate rollback command: you publish the old graph again.

  1. In the studio, open the history and choose View all history….
  2. Click Restore on the version you want. Its graph replaces the canvas.
  3. Save draft, then Deploy. The old graph becomes a new, higher version.

The history keeps every version, so you can always see what ran when.

Pause a workflow

Pausing stops new runs for one mode without touching versions or drafts:

Shell
curl -X POST "https://api.sommatic.ai/workflow-orchestration/control-plane/flow-design/flow-definition/<flow-definition-id>/pause" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{ "mode": "prod", "reason": "Supplier API under maintenance" }'
Mode pausedWhat happens to new calls
testRejected with status 423. No run is created.
prodAccepted. A run is created with status paused, so every call stays on record.

The pause applies to webhooks, schedules and chained calls alike. Resume with POST …/flow-definition/<id>/resume and the same mode. Streams open on the workflow receive workflow-paused and workflow-resumed.

Before you publish

  • Test every branch against the draft (see Testing).
  • Publish the sub-workflows this workflow calls: a published caller runs the published version of its targets.
  • Check the schema warnings in the studio header.

Next steps

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs