Prev Next

DMN Expression Validation

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

To make modeling easy and reliable, Enterprise Architect provides two features: Auto Completion and Validation.

  • Auto Completion: The idea is to select a text string from a list of enumerations rather than type the text in
  • Validation: this can pick up modeling errors caused by typo, logic completeness and consistency and so on

In this topic, we will show you how to validate a DMN Expression.

Access

DMN Expression Widnow

Simulate > Decision Analysis > DMN > DMN Expression, then click the Validate button

DMN Simulation Window

Simulate > Decision Analysis > DMN > Open DMN Simulation > Simulate page, then click the Validate icon

Common validations

Variable Name Validation

In this example, BusinessKnowledgeModel BKM1 defined two parameters: "Input 1" and "Input 2", two local variables: "Local Variable 1" and "Local Variable 2"

  • Context Entry #1 failed because there is a typo: It should be operator "-", but typed in "–" instead.
  • Context Entry #2 failed because there is no space between "Input" and number 2. Note: function ceiling is defined in DMN Library so it can be successfully parsed.
  • Context Entry #3 failed because there is no space between "Local" and "Variable".

It is hard to identify these kind of errors by eye sight, running validation can help identify errors and the user may perform an easy fix.

Dependency Validation

A decision may require other decisions, input datas and business knowledge models, these relationships are identified by informationRequirement and KnowldegeRequirement connectors.

When the graph is getting complex, it is quite possible that some connectors were missing or the wrong connector type is being used.

In this example, click on the Validate button, EA will pickup:

  • "Decision3" is used by "Decision1" by binding to a parameter of the called BKM2. However, it is not defined. The user may realize that an InformationRequirement connector is missing.
  • Invocation defined in "Decision1" is not valid. The user may realize that the connector type from BKM2 to Decision1 should be an KnowledgeRequirement.

After fix this problems, run the validation again:

Learn more