Skip to main content
Every workflow is versioned. Saving updates the editable draft. Publishing or executing it freezes that version. A saved version is a draft. One version of the workflow is published. The published version is the one your production traffic runs.

Draft

Where every edit lands. Runs in production do not see it.

Published

The version that API calls, schedules and integrations use.

Which version an execution uses

An execution uses one version, and it holds that version until it finishes. Edits in a draft do not change an execution until you publish.
If your API runs ignore a change, check that you published the new version. A test execution can target the draft. The workflow then looks correct in testing while production runs the older version.

Pinning a version from the API

The execute call takes an optional version field. Pass an integer to run that exact version, published or not.
Omit version and the execution uses the published version. See Call a workflow from your code. A schedule set to a specific version keeps that version, even after you publish a newer one. See Schedules.

Publishing

Publishing promotes one version to be the default for API, schedule and integration triggers.
  • On the platform, open the workflow and click Publish.
  • From your code, call POST /agents/{agentId}/workflows/{workflowId}/publish.
Publishing never touches an execution that already started. Each execution keeps the version it began with.

Version history

The platform shows the workflow’s version lineage and marks the published one. Asteroid keeps every version that was published or executed. You can always read the exact instructions a past run used. Only an unpublished draft with no executions can be deleted.

Test, iterate, publish

The loop from draft to published

Call a workflow

Start an execution, with or without a pinned version