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
| Concept | Identifier | What it is |
|---|---|---|
| Definition | definitionsID (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 version | resourceID (UUID) | One stored revision of a definition. Carries the actual XML body, a name, and a deployed/draft flag |
| Process | processID (the id attribute on <bpmn:process>) | A single executable flow inside a definition. One definition can contain multiple processes |
| Process version | processID + 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:
| Column | Description |
|---|---|
| Definition ID | The stable ID from the BPMN XML |
| Name | Display name from the latest version |
| Versions | How many stored revisions exist |
| Status | Whether the latest version is deployed |
| Created at | When the latest version was uploaded |
| Actions | Edit (open the latest version in the modeler) and view history |
A New Process 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, newest to oldest:
| Column | Description |
|---|---|
| Name | Display name as set when that version was saved |
| Status | Deployed or Draft |
| Created at | Upload timestamp |
| Created by | The user who saved that version |
| Actions | View contents, open in modeler, delete |
A resource version can be deleted, deployed or not, while none of the process versions deployed from it has running instances. Otherwise the delete answers 409. Deleting a deployed resource version leaves its process versions deployed, and their past instances remain in history.
What deployment does
The Deploy action on a saved draft does three things:
- Marks the resource version as deployed. The XML is now immutable.
- Registers a new process version for every
<process>inside the resource. Each process's version number is auto-incremented perprocessID, starting at1the first time. Every process gets a new version, even when only one of them changed. Different processes inside the same resource can be at different version numbers. - 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.
A file identical to the latest deployed resource of its definition is refused with 409, both when you save it and when you deploy a draft of it. Every deploy therefore registers new versions of all the resource's processes. Deploying the latest deployed resource again changes nothing. An earlier file can be saved and deployed again, and becomes the next version.
What re-deployment does
When you deploy a new version of a definition that's already been deployed before:
| What happens | Notes |
|---|---|
| The new resource version is registered | Same as a first deploy |
| Each process inside gets a new process version | version column bumps for that processID |
| Typed start-event registrations from the previous version are deactivated | Inbound messages, signals, and timer fires now create instances of the new version, not the old one |
| Running instances of the previous version keep running | They 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 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:
| Column | Description |
|---|---|
| Process ID | The BPMN id attribute on <bpmn:process> |
| Name | Process name from the most recent version |
| Versions | Count of deployed versions for this processID |
| Running | Instances with status RUNNING across all versions |
| Total Instances | Instances started in the selected time range (last 24 hours by default), across 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:
| Column | Description |
|---|---|
| Version | Version number, starting at v1 |
| Name | Process name from that version |
| Resource | The resource version this process came from |
| Running | Instances of this version with status RUNNING |
| Total Instances | Instances of this version started in the selected time range (last 24 hours by default), across statuses |
| Created at | When 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.
A deployed version can be paused from here. Pausing a version stops every running instance of it and rejects new starts until it is resumed. Paused versions carry a badge in this view and both list endpoints accept a ?suspended= filter. See Pausing and resuming.
Starting an instance
There are two paths.
Production instance (deployed only)
POST /projects/{projectID}/bpmn/instances
| Field | Required | Notes |
|---|---|---|
processID | yes | The id of the <bpmn:process> to start |
version | no | The deployed process version to start. Omit it for the latest |
variables | no | Initial variables. Available to FEEL expressions and service tasks from the first activity onward |
businessId | no | Your own reference, such as an order number, carried by the instance and everything it creates |
Returns 201 Created with the new instance's instanceID, which you'll use to fetch state, send signals/messages, complete user tasks, and so on. A process with no deployed version, or without the requested one, answers 404.
curl -X POST "$API/projects/$PROJECT/bpmn/instances" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"processID": "order-fulfilment",
"variables": { "orderId": "ORD-123", "amount": 49.95 }
}'
Without version the start runs the latest deployed version, so a new deploy takes over new starts at once. Pass version to pin a start to one version.
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
| Field | Required | Notes |
|---|---|---|
processID | no | BPMN process ID inside the resource. Defaults to the first executable process |
variables | no | Initial variables |
businessId | no | Your own reference, as on a production start |
Use test instances to try out an in-progress design before deploying. They run on the same engine as production but stay apart from it, and so do their call-activity children. An instance started this way stays a test run for life, also after a migration to a deployed version.
| What production shares | For a test run |
|---|---|
| Job task types | Carry the draft: prefix. A worker activates draft:issue-payout to work a test run's issue-payout jobs, and a worker of issue-payout never receives them |
| Message and signal names | Carry the draft: prefix. Publish draft:PaymentReceived to reach a test run waiting on PaymentReceived. The run panel adds the prefix itself |
| User tasks, jobs and incidents | Listed only when the list names the instance (instanceID), so tasklists and job dashboards leave them out |
| Instance counts, analytics and job queue depth | Leave test runs out |
| Instance list | Shows test runs, marked and with draft set. Filter with draft=true or draft=false |
A suspended process version does not stop a test run of its resource, since the test run takes no deployed version.
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
| Endpoint | Use |
|---|---|
GET /projects/{projectID}/bpmn/resources/latest | List 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, newest to oldest |
POST /projects/{projectID}/bpmn/resources | Create 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 resource version. Answers 409 while a process version deployed from it has running instances |
POST /projects/{projectID}/bpmn/resources/{resourceID}/deploy | Deploy a draft, locking it and creating new process versions |
POST /projects/{projectID}/bpmn/validate | Validate BPMN XML without saving - same checks the modeler runs at save time |
POST /projects/{projectID}/bpmn/resources/{resourceID}/test | Start a test instance against any resource version |
POST /projects/{projectID}/bpmn/instances | Start a production instance against a deployed process version |
GET /projects/{projectID}/bpmn/processes | List one entry per process with aggregate instance counts. Supports ?suspended= |
GET /projects/{projectID}/bpmn/processes/{processID}/versions | List deployed versions of one process with per-version instance counts. Supports ?suspended= |
GET /projects/{projectID}/bpmn/processes/{processID}/versions/{version} | Read one deployed process version |
POST /projects/{projectID}/bpmn/processes/{processID}/versions/{version}/suspend | Pause a deployed process version - stops its running instances and rejects new starts |
POST /projects/{projectID}/bpmn/processes/{processID}/versions/{version}/resume | Resume a paused process version |