Prev Next

Simulate DMN Model

A DMNSimConfiguration artifact contains information to simulate a DMN model depicted by Decision Requirements Diagrams.

Access

Ribbon

Simulate > DMN > Manage > Open DMN Simulation, Simulate Page

Other

Double-click on an DMNSimConfiguration element, Simulate Page

Toolbar Options

Option

Description

See also

Click on this button to validate all the dependent DMN elements based on the Target Decision.

Note: A Decision/BusinessKnowledgeModel/InputData/ItemDefinition that is on the target decision hierarchy will not be considered.

For example, the user has some unfinished decision elements in the package, since they have no relationship the target decision, they will not impact the simulation.

DMN Decision Table Validation

Click on this button to execute the decision hierarchy in order. The result will be represented on the diagram and show in the "Runtime vallues" column.

Click on this button to step run the decision hierarchy in order, one click will evaluate one decision element. With this feature, the user will be able to see the decision-making process, besides, the decision logic and runtime values will be displayed cleared in the DMN Expression window.

Click on this button to exit the simulation mode.

Simulation Overview

When a Target Decision is specified, the simulation page will be filled with the decisions, in dependency order.

When Executing or Step the Decision Hierarchy, the decisions will be evaluated in order:

  • The runtime result will be showing in the decision row
  • The runtime result will be displayed on the diagram
  • The decision logic and input/output data will be presented in the DMN Expression window.

Invocation Hierarchy

The user can expand the Decision in the list to see the invocation hierarchy.

For example,

  • Decision "Pre-bureau affordability" invokes BusinessKnowledgeModel "Affordability calculation"

  • BusinessKnowledgeModel "Affordability calculation" further invokes another BusinessKnowledgeModel "Credit contingency factor table"

Advanced Debugging

Although EA provided a validation feature to help the user pickup many modeling issues and DMN expression issues, rarely but possible, the simulation may still fail due to some uncaught issues.

Luckily, EA provided the user an ability to debug the code that is running behind the simulation. The user may also modify the code, run it until the issue is found and fixed.

The Execute button on the toolbar has a menu with following items:

  • Generate New Script (Scripting Window)
  • Update Selected Script (Scripting Window)
  • Run Selected Script (Scripting Window)
  • Edit DMN Template

Click "Generate New Script (Scripting Widnow)" will open the Scripting window with a script created in a package named "DMN".

  • The default script name is composed as "ArtifactName - TargetDecision - InputData1(DataSet)_ InputData2(DataSet)_..."

Double click on this file to open it in EA script editor, set a breakpoint, and debug the file.

By selecting the script in the Scripting Window, the menu "Run Selected Script" will be enabled if the script matches the model (by the "Simulation Script Identifier" in the script).

The user may customize the DMN Template to generate the correct script for simulation.

Learn more