Evaluation and History
DMN evaluations are synchronous: you POST an input context, the engine runs the decision graph, and you get back the per-decision results in the response. Every evaluation is recorded so you can inspect what happened later. Recorded evaluations are deleted by data retention, after 90 days by default.
The evaluate API
POST /projects/{projectID}/dmn/definitions/by-definitions-id/{definitionsID}/evaluate
definitionsID is the value of the <definitions id="…"> attribute in your DMN XML. The endpoint evaluates a deployed version, the latest by default. Pass version in the body or the query to pin one. A model with no deployed version answers 404. A draft evaluates in the modeler or through POST /dmn/evaluate/design with its XML, and neither records anything.
Request body
{
"context": { "customerAge": 42, "annualIncome": 85000 },
"decisions": ["Eligibility"],
"version": 3
}
| Field | Required | Notes |
|---|---|---|
context | yes | The input scope. A FEEL context - keys are variable names, values are FEEL-typed (number, string, boolean, list, nested context) |
decisions | no | Names of decisions or decision services to evaluate. If empty, all decisions in the definition are evaluated |
decisionServices | no | Names of decision services to evaluate. When given, decisions is ignored |
version | no | Pin to a deployed version. Defaults to the latest |
businessId | no | A correlation key recorded with the evaluation |
errorMode | no | strict or lenient. Overrides the server's configured mode for this call |
Leaving both lists empty runs every decision but no services. To invoke a decision service, name it explicitly.
Response shape
The response is a map keyed by decision name. Each value is an EvaluationResult:
{
"Eligibility": {
"decisionID": "decision_eligibility",
"decisionVersion": 4,
"name": "Eligibility",
"type": "DECISION",
"value": { "eligible": true, "tier": "gold" },
"hitRules": [
{ "ruleID": "rule_3", "outputs": { "eligible": true, "tier": "gold" } }
],
"dependencies": [
{
"decisionID": "decision_score",
"decisionVersion": 2,
"name": "Score",
"type": "DECISION",
"value": 720
}
],
"error": null
}
}
| Field | Notes |
|---|---|
decisionID | The decision's XML id |
decisionVersion | The version of the decision that ran. Absent on a decision service, a business knowledge model and input data |
name | Human-readable name |
type | DECISION, DECISION_SERVICE, BKM, or INPUT_DATA |
value | The FEEL value the decision produced. Shape depends on the decision's output type |
hitRules | For decision tables: which rules matched, and what each rule output. Empty for other expression types |
dependencies | The upstream decisions that this evaluation pulled in - the dependency tree of the result. Useful for tracing why a decision came out the way it did |
error | Error message if this decision failed to evaluate. null on success |
When a single decision in the graph errors, the engine still returns a response - the failed decision carries error, and decisions that depended on it propagate the failure. The HTTP status itself is 200 unless the request body was malformed.
Example
curl -X POST "$API/projects/$PROJECT/dmn/definitions/by-definitions-id/$DEFINITIONS_ID/evaluate" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"context": {
"applicant": { "age": 42, "income": 85000 },
"loanAmount": 25000
},
"decisions": ["Eligibility", "Pricing"]
}'
For authentication, see Authentication.
Calling decisions from a BPMN process
A BPMN business-rule task invokes a deployed decision directly - no HTTP round-trip. The quantum:calledDecision decisionId="…" extension expects a decision XML id from the decision picker, and a pinned version names one of the decision's own versions.
The runtime is the same engine, the only difference is that the BPMN side reads the input context from the process variables (after I/O input mapping) and writes the result into a process variable named by resultVariable.
Execution history
Every evaluation - whether it came in via the API or from a BPMN business-rule task - is recorded by the engine. A test run's business-rule task evaluations are left out of the list.
What's stored per execution
| Field | Description |
|---|---|
| Execution ID | Unique identifier of this evaluation |
| Definitions ID | The <definitions id> of the model that ran |
| Version | The deployed version that ran |
| Decision ID and version, Instance ID, Node ID | For a business-rule task: the decision and decision version it called, its process instance and its element id |
| Inputs | The full input context |
| Outputs | Each evaluated decision's result, by name, with its decision id and version |
| Executed by | User or service account that issued an API call |
| Business ID | The correlation key of the call, or the process instance's |
| Executed at | Timestamp |
The Execution History view
Open Execution History from the navigation. The view is a chronological list across all models in the project, with columns:
| Column | Description |
|---|---|
| Executed by | User or service account, or the business-rule task with a link to its instance |
| Definitions ID | The <definitions id> and version that ran, and for a business-rule task the decision and its version |
| Business ID | The correlation key |
| Executed at | Timestamp |
Filters at the top narrow the list to one definitionsID, one business ID, and a time range of the last hour, 24 hours (the default), 7 days or all time. The list paginates, default 20 per page.
API access
| Endpoint | Use |
|---|---|
GET /projects/{projectID}/dmn/executions | Project-wide execution list. Filter by definitionsID and version, instanceID and executionKey, businessId, startDate. Newest first, paged by cursor and limit |
GET /projects/{projectID}/dmn/executions/{executionID} | Single execution detail - the inputs and per-decision results |
The single-execution detail endpoint returns each decision's EvaluationResult as it was at evaluation time, so you can reproduce why a decision came out the way it did. Each matched rule names its ruleID and its 0-based ruleIndex in the decision table.
A business rule task's execution names its instanceID, nodeID and executionKey, the key that run's entries in the instance history carry. instanceID together with executionKey returns the evaluation of one history entry.
Where it fits
- Building an integration that calls decisions from outside? Use the evaluate API with authentication.
- Wiring a decision into a BPMN process? See the business-rule task.
- Investigating a past decision? Open the Execution History view, or fetch the execution by ID.