Evaluating a Decision

To evaluate a deployed decision, reference it by id or a combination of key and version. Ifa key is used but no version is specified then the latest version of decisiondefinition with the given key is evaluated.

The key of a decision definition is specified by the attribute of thedecision element in the DMN XML. The different naming is related to the. Since a key can reference multiple versions of adecision definition, the id specifies exactly one version.

Passing Data

A decision may reference one or more variables. For example, a variable can bereferenced in an input expression or an input entry of a decision table. Thevariables are passed to the decision service as key-value pairs. Each pairspecifies the name and the value of a variable.

For more information on the different expressions see the DMN 1.1 reference.

Authorizations for Evaluating Decisions

For more information about authorizations please refer to the section.

Working with the Decision Result

The result of an evaluation is called decision result. The decision result is a complex objectof type . Think of it as a list of key-value pairs.

If the decision is implemented as decision table then each entry in the list represents one matched rule. The output entries of thisrule are represented by the key-value pairs. The key of a pair is specified bythe name of the output.

Instead, if the decision is implemented as then the list contains only one entry. This entry represents the expression value and is mapped by the variable name.

Note that the decision result also provides methods to get typed output entries.A complete list of all methods can be found in the Java Docs.

If the decision is implemented as then it can also be evaluated using one of theevaluateDecisionTable methods. In this case, the evaluation returns a which is semantically equal and provide the same methods as a.

History of Evaluated Decisions

When a decision is evaluated, a new history entry of typeHistoricDecisionInstance is created which contains the inputs and outputs ofthe decision. The history can be queried by the history service.

For more information about this, please refer to the History for DMN Decisions.