Skip to main content

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​

ConceptIdentifierWhat it is
Definitionplatform UUID (definitionID)One saved DMN document. A draft can be edited and deleted, a deployed definition is read-only
ModeldefinitionsID (from the DMN XML's outer <definitions id="…">)The stable identity shared by every definition saved for one model
Versioninteger version per definitionsIDThe number a deploy gives a definition. Every deploy gives the next one
DecisiondecisionID (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 (definitionID path parameter) - points at one saved definition, draft or deployed.
  • DMN definitions id (definitionsID path parameter on the by-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/design with 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 409 when 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:

ColumnDescription
Definition IDThe stable <definitions> ID from the DMN XML
NameDisplay name, with a Draft badge when the newest definition is not deployed
VersionsHow many definitions are saved for the model
Created atWhen the newest definition was saved
ActionsView 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:

ColumnDescription
Versionv1, v2, … for a deployed definition, Draft otherwise
NameDisplay name as set when it was saved
Created atSave timestamp
Created byThe user who saved it
ActionsOpen 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​

EndpointUse
GET /projects/{projectID}/dmn/definitions/latestList the newest saved definition of each model (drives the Models view)
GET /projects/{projectID}/dmn/definitionsList 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}/versionsList 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/definitionsSave 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}/deployDeploy 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/decisionsList one entry per deployed decision in the project
GET /projects/{projectID}/dmn/decisions/{decisionID}/versionsList 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.