Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

DMN Decision Table Validation

A Decision table is one of the most common and powerful DMN Expressions to express the decision logic. However, modeling a Decision table can also be complicated, especially if multiple input clauses are used in combination for many Decision table rules. Luckily, Enterprise Architect provides a feature to validate a Decision table; this topic explains how to apply this feature.

Access

DMN Expression Window

Simulate > Decision Analysis > DMN > DMN Expression : Validate button

DMN Simulation Window

Simulate > Decision Analysis > DMN > Manage > Open DMN Simulation > Configure : Validate button

Entries out of range detection

It is good practice to define 'allowed values' for the input clause and output clause of a Decision Table.

Firstly, the enumerations (comma separated string) will enable the Auto Completion feature, where you can choose the value from a list rather than typing it in the entry field.

Secondly, the 'allowed values' enable Enterprise Architect to perform a range check for the entry values.

An example of validation being performed on a set of DMN Expressions using Sparx Systems Enterprise Architect.

In this example:

  • The 'Age' input clause defines a range of [20..120], causing the first rule [18..21] to fail
  • The Marital Status clause defines an enumeration of 'S, M', causing rule #7 with value 'D' to fail

You can fix this issue by changing the 'allowed value' range or the rule entry, based on the actual business rules.

Completeness detection — report gaps in the rules

The gaps in rules for a Decision table mean that, given a combination of input values, no rule is matched.  This indicates that some logic or rule might be missing (unless a default output is defined).

When the Decision table defines rules with lots of number ranges, it is hard to detect gaps by eyesight and too hard to compose test cases.

For example,

An example of validation being performed on a set of DMN Expressions using Sparx Systems Enterprise Architect.

The validation reports a gap in the rules. You might first perform a merge on the Decision table to focus on the ninth input 'Credit Score' and easily detect the error in input entry (580..600], which should be [580..600].

Rule Overlaps detection for Unique Hit Policy

When rules overlap, given a combination of input values, multiple rules are matched. This is a violation if the Decision table specifies 'Unique' as its Hit Policy.

When the Decision table defines rules with lots of number ranges, it is hard to detect gaps by eyesight and too hard to compose test cases.

For example:

An example of validation being performed on a set of DMN Expressions using Sparx Systems Enterprise Architect.

The validation reports an overlap in the rules. You might first perform a merge on the Decision table to focus on the 3rd input 'Credit Score' and easily detect the overlap between '<610' and '[600..625]'. You could fix this issue either by changing rule #4 to '<600' or by changing rule #5 to '[610..625]', based on the actual business rules.

Learn more