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.
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.
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, withversion_counterupdated.
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.
- In the studio, open the history and choose View all history….
- Click Restore on the version you want. Its graph replaces the canvas.
- 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:
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 paused | What happens to new calls |
|---|---|
test | Rejected with status 423. No run is created. |
prod | Accepted. 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.