Skip to main content

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
}
FieldRequiredNotes
contextyesThe input scope. A FEEL context - keys are variable names, values are FEEL-typed (number, string, boolean, list, nested context)
decisionsnoNames of decisions or decision services to evaluate. If empty, all decisions in the definition are evaluated
decisionServicesnoNames of decision services to evaluate. When given, decisions is ignored
versionnoPin to a deployed version. Defaults to the latest
businessIdnoA correlation key recorded with the evaluation
errorModenostrict 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
}
}
FieldNotes
decisionIDThe decision's XML id
decisionVersionThe version of the decision that ran. Absent on a decision service, a business knowledge model and input data
nameHuman-readable name
typeDECISION, DECISION_SERVICE, BKM, or INPUT_DATA
valueThe FEEL value the decision produced. Shape depends on the decision's output type
hitRulesFor decision tables: which rules matched, and what each rule output. Empty for other expression types
dependenciesThe 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
errorError 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​

FieldDescription
Execution IDUnique identifier of this evaluation
Definitions IDThe <definitions id> of the model that ran
VersionThe deployed version that ran
Decision ID and version, Instance ID, Node IDFor a business-rule task: the decision and decision version it called, its process instance and its element id
InputsThe full input context
OutputsEach evaluated decision's result, by name, with its decision id and version
Executed byUser or service account that issued an API call
Business IDThe correlation key of the call, or the process instance's
Executed atTimestamp

The Execution History view​

Open Execution History from the navigation. The view is a chronological list across all models in the project, with columns:

ColumnDescription
Executed byUser or service account, or the business-rule task with a link to its instance
Definitions IDThe <definitions id> and version that ran, and for a business-rule task the decision and its version
Business IDThe correlation key
Executed atTimestamp

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​

EndpointUse
GET /projects/{projectID}/dmn/executionsProject-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.