Prev Next

DMN Expression Auto Completion

DMN defines many expressions, such as FunctionDefinition, DecisionTable, Boxed Context, Invocation and Literal Expression. The parameters, arguments and logic of expressions is implemented largely by 'text'.

To make modeling easy and reliable, Enterprise Architect provides an Auto Completion facility, helping provide the:

  • Allowed Values of ItemDefinition
  • Input/Output Entries of a Decision Table
  • InformationRequirement

Allowed Values of ItemDefinition

The idea is to define allowed value enumerations in ItemDefinition, then compose a list for selection whenever these values are requested.

In this example, ItemDefinition 'Applicant data . Employment Status' defines an enumeration of allowed values.

An example of a DMN Item Definition with Enumerations using Sparx Systems Enterprise Architect.

When editing values for the InputData typed to this ItemDefinition, press the Spacebar on the keyboard to display a list of values to select from.

An example using Auto Completion on an InputData DMN Expression modeled with Sparx Systems Enterprise Architect.

We could also define multiple data sets for the InputData, as the Auto Completion feature is available on this dialog.

An example of  Auto Completion filling in a DMN Data Set using Sparx Systems Enterprise Architect.

On the Simulation window, you could change the test value to simulate the model; the Auto Completion feature is available on this list as well.

An example using the auto completion feature when running a DMN simulation using Sparx Systems Enterprise Architect.

Input/Output Entries of a Decision Table

Take the 'Strategy' ItemDefinition as an example:

A DMN Item Definition example of a simple data type using Sparx Systems Enterprise Architect.

We can quickly fill the 'Allowed Values' field for a Decision table by selection:

Auto-filling value fields in a DMN Decision Table in the context of an Item Definition using Sparx Systems Enterprise Architect.

Then we can quickly fill the Decision table rules by selection:

Auto-filling value fields in a DMN Decision Table in the context of an Item Definition using Sparx Systems Enterprise Architect.

Information Requirement

On a decision hierarchy, a decision might access required decisions and input data; these required elements form a list of variables that can be used by the decision.

An example of usingAuto Complete in a DMN Decision Hierarchy using Sparx Systems Enterprise Architect.

In this example, Decision 'Eligibility' requires two decisions - 'Pre-bureau risk category' and 'Pre-bureau affordability' - and one Input Data item 'Applicant data'.

When setting the binding values for the invoked BusinessKnowledgeModel 'Eligibility rules', an Auto Completion list will prompt for selection.

In this list, there are sub-decision names - leaf components of the input data.

With this feature, you can easily set up an invocation.

Learn more