Definitions and Versioning
DMN models are stored as definitions in your project. A saved definition is a draft until you deploy it, as with BPMN. A deploy makes its decisions evaluable through the API and callable from BPMN business rule tasks, and gives it a version number.
Concepts
| Concept | Identifier | What it is |
|---|---|---|
| Definition | platform UUID (definitionID) | One saved DMN document. A draft can be edited and deleted, a deployed definition is read-only |
| Model | definitionsID (from the DMN XML's outer <definitions id="…">) | The stable identity shared by every definition saved for one model |
| Version | integer version per definitionsID | The number a deploy gives a definition. Every deploy gives the next one |
| Decision | decisionID (from <decision id="…">) | One decision node inside a definition. Each decision counts its own versions, see Decision versions |
Two ways to address a definition in the API:
- Platform UUID (
definitionIDpath parameter) - points at one saved definition, draft or deployed. - DMN definitions id (
definitionsIDpath parameter on theby-definitions-id/…endpoints) - points at the model's deployed versions, the latest unless a specific version is requested. A draft is not addressed this way.
Lifecycle
┌──────────────┐ save ┌──────────────┐ deploy ┌──────────────┐
│ In modeler │ ──────────► │ Draft │ ─────────► │ Deployed │
│ (browser) │ │ (editable) │ │ version N │
└──────────────┘ └──────────────┘ └──────────────┘
▲ │
└──── save a change ────────┘
as a new draft
Four things to know:
- Only deployed versions run. Evaluation through the API and business rule tasks use deployed versions. The modeler evaluates the draft you are editing without recording anything, and so does
POST /dmn/evaluate/designwith the draft's XML. - A deployed definition is read-only. Saving a change to it stores a new draft of the same model, and deploying that draft gives the next version.
- The latest deployed document is not saved twice. A document identical to the latest deployed version of its model is refused with
409when you save it as a new draft and when you deploy a draft of it. - Only drafts can be deleted. The engine keeps every deployed version. Its recorded evaluations are deleted by data retention, after 90 days by default.
The Models view
Open DMN Models from the navigation. One row per definitionsID, showing the newest saved definition:
| Column | Description |
|---|---|
| Definition ID | The stable <definitions> ID from the DMN XML |
| Name | Display name, with a Draft badge when the newest definition is not deployed |
| Versions | How many definitions are saved for the model |
| Created at | When the newest definition was saved |
| Actions | View the history, evaluate a deployed one, delete a draft |
A New Model button (visible to project Editors and Admins) opens an empty modeler.
The Definition Detail view
Drill into a model to see every definition saved for it, newest first:
| Column | Description |
|---|---|
| Version | v1, v2, … for a deployed definition, Draft otherwise |
| Name | Display name as set when it was saved |
| Created at | Save timestamp |
| Created by | The user who saved it |
| Actions | Open in modeler, delete a draft (Editor / Admin role only) |
Finding a decision
When you wire a BPMN business rule task, the decision picker in the BPMN modeler lists every deployed decision in the project by name and owning model, at its latest version. The quantum:calledDecision decisionId="…" extension takes the decision's XML id. GET /projects/{projectID}/dmn/decisions returns the same list with decisionID, decisionName, definitionName and latestVersion. A decision that was only saved in a draft is not in it.
Decision versions
A business rule task binds a decision, the latest or a pinned version. Decision versions count per decision id: each deploy that contains the decision gives it the next version. They match the model's versions while the decision is in every deployed version, and drift from them when a version leaves it out or the decision moves to another model. The BPMN modeler offers the decision's own versions when you pin one. Every evaluation result and recorded execution names the decisionVersion that ran.
Saving and deploying from the modeler
The first save of a brand-new model stores a draft and establishes the definitionsID. Saving a draft again asks whether to overwrite the draft or save as a new draft. Saving a deployed definition always stores a new draft. Deploy appears on a saved draft and gives it its version.
For the modeler UI itself, see The DMN Editor.
API reference
| Endpoint | Use |
|---|---|
GET /projects/{projectID}/dmn/definitions/latest | List the newest saved definition of each model (drives the Models view) |
GET /projects/{projectID}/dmn/definitions | List every saved definition across the project |
GET /projects/{projectID}/dmn/definitions/by-definitions-id/{definitionsID} | Get the latest deployed version, or the one version names |
GET /projects/{projectID}/dmn/definitions/by-definitions-id/{definitionsID}/versions | List every saved definition of one model, newest first |
GET /projects/{projectID}/dmn/definitions/{definitionID} | Get one saved definition by platform UUID |
POST /projects/{projectID}/dmn/definitions | Save a new draft |
PUT /projects/{projectID}/dmn/definitions/{definitionID} | Change a draft's name and XML. A deployed definition answers 409 |
POST /projects/{projectID}/dmn/definitions/{definitionID}/deploy | Deploy a draft and return it with its version. A deployed definition answers 409 |
DELETE /projects/{projectID}/dmn/definitions/{definitionID} | Delete a draft. A deployed definition answers 409 |
GET /projects/{projectID}/dmn/decisions | List one entry per deployed decision in the project |
GET /projects/{projectID}/dmn/decisions/{decisionID}/versions | List a decision's deployed versions, the latest first |
The save endpoint accepts:
{
"name": "Underwriting rules",
"xml": "<definitions xmlns=\"https://www.omg.org/spec/DMN/20240513/MODEL/\" id=\"underwriting\">…</definitions>"
}
name is the display label and xml is the DMN body. A deploy needs the outer <definitions id> and answers 400 without one.
For evaluating a deployed definition, see Evaluation and history.