DMN Coverage
Flower BPM evaluates the part of DMN that decides: decision tables, literal expressions and the decisions they require, with FEEL. Every other element is kept in the .dmn file when you import it, but is not evaluated. How decisions are used in a process: Decide with Decision Tables (DMN).
Decision Logic
| Element | Evaluated | Notes |
|---|---|---|
| Decision table | Yes | Rules as rows. See Decision Tables. |
| Hit policy Unique, Any, Priority, First | Yes | Unique with several matches and Any with different outputs are errors. Priority without output values is refused. |
| Hit policy Output order, Rule order, Collect | Yes | The result is a list. Output order without output values is refused. |
| Collect with sum, minimum, maximum, count | Yes | From the first output; a value that is no number gives null with a warning. |
| Literal expression | Yes | FEEL (feelin). |
| Result of a table with one output | Yes | Inside the DMN the value itself, as in DMN: a decision that requires it reads Customer level = "gold". Toward the process a context of the outputs, also with one output: pi.decisions.<name>.<output>. |
| Context, invocation, relation, list, function definition | No | An error when the decision runs. Write the logic as a literal expression. See Literal and Boxed Expressions. |
| Conditional, filter, iterator (DMN 1.4) | No | The same: as FEEL in a literal expression. |
Decision Requirements
| Element | Evaluated | Notes |
|---|---|---|
| Decision | Yes | A business rule task calls one decision; without a choice, the top decision. |
| Information requirement between decisions | Yes | Required decisions run first, their results are available under their variable names (in dmn-js the name of the decision). A cycle is an error, and so is a required decision that is not in the DMN. |
| Input data | No | The values come from the process: pi, cur, par, model, pi.decisions. |
| Business knowledge model, knowledge requirement | No | Kept in the model. |
| Knowledge source, authority requirement | Documentation | As in DMN. |
| Decision service | No | Kept in the model; the DMN modeler does not draw it. |
| Text annotation, association | Documentation | As in DMN. |
See Decision Requirements Diagram.
Tables and FEEL
| Element | Evaluated | Notes |
|---|---|---|
| Input expression, input entry, output entry | Yes | FEEL, unary tests with ?. |
| Types of inputs and outputs | Kept | Not checked. |
| Input values, output values | Kept | Output values set the order of Priority and Output order. |
| Default output entry | Yes | Used when no rule matches. Without one: null, an empty list, or 0 for a count. |
| Annotation columns | Documentation | As in DMN. |
| FEEL data types, operators, functions | Yes | feelin, the FEEL interpreter of bpmn.io. See FEEL. |
Files
Flower BPM reads and writes .dmn files in DMN 1.3 (namespace https://www.omg.org/spec/DMN/20191111/MODEL/), the version of dmn-js, with dmn-moddle. A file (.dmn or .xml) from another tool, for example from Camunda Modeler, is imported when you create a decision. A file in DMN 1.1, 1.2, 1.4, 1.5 or 1.6, or one that is no DMN, is refused before anything is created, with the message failed to parse document as <dmn:Definitions>. The decision is exported as .dmn from the DMN modeler.
Limits
The FEEL of a decision is checked before it runs, and its result before it is kept:
| Limit | What happens above it |
|---|---|
The loops of one FEEL expression (for, some, every, a filter whose condition loops; nested loops multiplied): at most 100,000 steps | An error: The … of the decision ”…” takes too many steps (…): its loops (for, some, every) take about N steps, at most 100000 are allowed. Make the ranges and lists smaller. |
| All expressions of one evaluation together (the decision and the decisions it requires): at most 1,000,000 steps | An error: … the loops (for, some, every) of the decision take more than 1000000 steps together. Make the ranges and lists smaller. |
| The result of a decision as JSON: at most 4,000 characters | An error: The result of the decision ”…” has N characters, at most 4000 are allowed (it is kept at the process instance): return fewer or shorter values. |
| All results kept at one process instance together: at most 8,000 characters | An error: The results of the decisions of this process instance would have N characters together, at most 8000 are kept: the result of ”…” is not kept. |
The size of a range or list is read from its literal, or from the values of the process: for i in 1..pi.fields.customfield_10040 is checked with the value of the field. On an error, the business rule task gets an error comment, the value of the result is null, and the process goes on. Evaluate shows the same messages, except the limit of the process instance.
Running Decisions
| Topic | What Flower BPM does |
|---|---|
| Version | A business rule task evaluates the latest published version of the decision at the moment it runs. |
| Result | Kept at the process instance as pi.decisions.<name>, as plain JSON; a comment names the decision, its version, the result, the matching rules and up to five FEEL warnings. A result that is empty with FEEL warnings also gets a warning comment. |
| Name of the result | The Name of the result of the task, else the id of the chosen Decision in the diagram, else the id of the top decision. An empty value after an error stands under the same name. |
| Errors | An error comment at the process instance, the value null under the name of the result, and the process goes on. |
| Loading the decision | A decision that does not exist, a work item that is no decision, and a decision without a published version are errors as above. When Jira does not answer while the decision is read, the run does not start: nothing is decided and the process does not take a path. See Decide with Decision Tables (DMN). |
Editions: running decisions in a process is part of Flower BPM Advanced on Jira Cloud, with a 30-day preview on every site, and included on Jira Data Center. When the preview or Advanced ends, process instances that are already running keep deciding until they end; only process instances created afterwards pass their business rule tasks without a result. Modeling, versions and Evaluate work in every edition. See Editions.