Skip to main content

Definitions and Deployment

This page covers what happens between save and run: how BPMN files are stored as definition versions, what deployment does, how process versioning works, and how to start a new instance once a process is live.

Concepts

ConceptIdentifierWhat it is
DefinitiondefinitionsID (from the BPMN XML's outer <definitions id="…">)The stable identity of a BPMN file across edits. Saving a new revision adds another version under the same definitionsID; the ID itself doesn't change
Resource versionresourceID (UUID)One stored revision of a definition. Carries the actual XML body, a name, and a deployed/draft flag
ProcessprocessID (the id attribute on <bpmn:process>)A single executable flow inside a definition. One definition can contain multiple processes
Process versionprocessDefinitionID (UUID) + version (integer)One deployed iteration of a process. Auto-incremented per processID each time the containing definition is deployed

The relationship: a definition has many resource versions; each deployed resource produces one new process version for every process declared inside it.

Lifecycle

A BPMN file moves through three stages:

   ┌──────────────┐    save     ┌──────────────┐   deploy    ┌──────────────┐
│ In modeler │ ──────────► │ Draft │ ──────────► │ Deployed │
│ (browser) │ │ resource │ │ resource + │
│ │ │ (editable) │ │ new process │
└──────────────┘ └──────────────┘ │ version(s) │
▲ └──────────────┘

edit / save again
  • Draft — saved to the project but not yet executable. You can edit drafts, test-run them, and delete them.
  • Deployed — the resource version is locked and the processes inside it are now runnable.

A deployed resource version is immutable. To change a deployed process you upload a new resource version under the same definitionsID and deploy that.

The Definitions view

Open BPMN Definitions from the BPMN navigation. One row per definitionsID, showing the latest version's metadata:

ColumnDescription
Definition IDThe stable ID from the BPMN XML
NameDisplay name from the latest version
VersionsHow many stored revisions exist
StatusWhether the latest version is deployed
Created atWhen the latest version was uploaded
ActionsEdit (open the latest version in the modeler) and view history

A New button (visible to project Editors and Admins) opens a fresh modeler tab.

The Versions view

Drill into a definition to see all of its resource versions, oldest to newest:

ColumnDescription
VersionSequential ordinal (v1, v2, …) within this definition
NameDisplay name as set when that version was saved
StatusDeployed or Draft
Created atUpload timestamp
Created byThe user who saved that version
ActionsView contents, open in modeler, delete (drafts only)

Drafts can be deleted to clean up exploratory revisions. Deployed versions cannot be deleted — they're load-bearing for any running instances and any references from other deployed processes (call activities, business-rule task DMN references). Past instances of a deployed version remain in history regardless.

What deployment does

The Deploy action on a saved draft does three things:

  1. Marks the resource version as deployed. The XML is now immutable.
  2. Registers a new process version for every <process> inside the resource. Each process's version number is auto-incremented per processID, starting at 1 the first time. Different processes inside the same resource can be at different version numbers.
  3. Activates typed start events on the new version. Message, signal, and timer start events register so an inbound message, signal, or scheduled tick can start an instance of the new version.

Deployment is one-way per resource version. You can't "undeploy" — to retire a process, deploy a new version that does nothing or stop sending traffic to it.

What re-deployment does

When you deploy a new version of a definition that's already been deployed before:

What happensNotes
The new resource version is registeredSame as a first deploy
Each process inside gets a new process versionversion column bumps for that processID
Typed start-event registrations from the previous version are deactivatedInbound messages, signals, and timer fires now create instances of the new version, not the old one
Running instances of the previous version keep runningThey continue under the version they were started with — re-deploying does not automatically migrate them
The previous version remains "deployed"It can still be the source/target of an explicit instance migration. Call activities and business-rule tasks pointing at the old version still resolve

If you need to move running instances over to the new version, use instance migration — the API supports migration plans that map nodes between versions.

The Processes view

The Processes view aggregates by processID across all of its deployed versions. One row per process:

ColumnDescription
Process IDThe BPMN id attribute on <bpmn:process>
NameProcess name from the most recent version
VersionsCount of deployed versions for this processID
RunningInstances with status RUNNING across all versions
TotalAll instances across all statuses

Use this view when thinking about a process as a long-lived unit, regardless of which version is deployed today.

The Process Versions view

Drill into a process to see each deployed version and its instance counts:

ColumnDescription
VersionVersion number, starting at v1
NameProcess name from that version
ResourceThe resource version this process came from
RunningInstances of this version with status RUNNING
TotalAll instances of this version, across statuses
Created atWhen the version was deployed

This is the place to pick the source/target version when migrating running instances, or to see how traffic is distributed if you've shipped multiple versions over time.

Starting an instance

There are two paths.

Production instance (deployed only)

POST /projects/{projectID}/bpmn/instances
FieldRequiredNotes
processDefinitionIDyesUUID of a deployed process version (the id of a process version)
variablesnoInitial variables. Available to FEEL expressions and service tasks from the first activity onward

Returns 201 Created with the new instance's workflowID, which you'll use to fetch state, send signals/messages, complete user tasks, and so on.

curl -X POST "$API/projects/$PROJECT/bpmn/instances" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"processDefinitionID": "f8a3…",
"variables": { "orderId": "ORD-123", "amount": 49.95 }
}'

If you want to target a specific version, pass the processDefinitionID of that version. To always run the latest, look up the most recent version via the Process Versions view (or GET /processes/{processID}/versions) and pass its UUID.

Test instance (drafts and deployed)

The modeler's Run button uses a different endpoint that works against a resource version directly — drafts included:

POST /projects/{projectID}/bpmn/resources/{resourceID}/test
FieldRequiredNotes
processIDnoBPMN process ID inside the resource. Defaults to the first executable process
variablesnoInitial variables

Test instances run on the same engine as production but are flagged so dashboards can filter them out. Use them to try out an in-progress design before deploying.

From the UI

The first-class start-from-UI path today is the modeler's Run button — see Testing from the modeler. For production starts, use the API directly or have an upstream system (typed start event, signal, timer) trigger them.

API reference

EndpointUse
GET /projects/{projectID}/bpmn/resources/latestList the latest version of each definition (drives the Definitions view)
GET /projects/{projectID}/bpmn/resources/by-definitions-id/{definitionsID}List every version of a definition, oldest to newest
POST /projects/{projectID}/bpmn/resourcesCreate a new draft resource (first save)
PUT /projects/{projectID}/bpmn/resources/{resourceID}Update a draft's XML (drafts only — deployed versions are immutable)
DELETE /projects/{projectID}/bpmn/resources/{resourceID}Delete a draft resource version
POST /projects/{projectID}/bpmn/resources/{resourceID}/deployDeploy a draft, locking it and creating new process versions
POST /projects/{projectID}/bpmn/validateValidate BPMN XML without saving — same checks the modeler runs at save time
POST /projects/{projectID}/bpmn/resources/{resourceID}/testStart a test instance against any resource version
POST /projects/{projectID}/bpmn/instancesStart a production instance against a deployed process version
GET /projects/{projectID}/bpmn/processesList one entry per process with aggregate instance counts
GET /projects/{projectID}/bpmn/processes/{processID}/versionsList deployed versions of one process with per-version instance counts