Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Prev | Next |
Simulate DMN Model
A DMNSimConfiguration Artifact contains information to simulate a DMN model depicted by Decision Requirements diagrams.
Access
Ribbon |
Simulate > Decision Analysis > DMN > Open DMN Simulation | Simulate Page |
Other |
Double-click on a 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, you have some unfinished Decision elements in the Package; as they have no relationship to 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 results will be represented on the diagram and shown in the 'Runtime values' column. |
|
![]() |
Click on this button to step through the decision hierarchy in order. One click will evaluate one decision element. With this feature, you will be able to see the decision-making process; the decision logic and runtime values will be displayed clearly 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 Stepping Through 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
You 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 Enterprise Architect provides a validation feature to help you locate many modeling issues and DMN expression issues, the simulation might still fail (rarely but possible) due to uncaught issues.
However, Enterprise Architect provides the ability to debug the code that is running behind the simulation. You can also modify the code and run it in cycles until the issue is found and fixed.
The
on the toolbar displays a menu with these options:- Generate New Script (Scripting Window)
- Update Selected Script (Scripting Window)
- Run Selected Script (Scripting Window)
- Edit DMN Template
If you select 'Generate New Script (Scripting Window), the Scripting window displays showing a script created in a Package named 'DMN'.
- The default script name is composed of these parameters: 'ArtifactName - TargetDecision - InputData1(DataSet)_ InputData2(DataSet)_...'
Double-click on this file to open it in the Enterprise Architect Script editor, set a breakpoint, and debug the file.
By selecting the script in the Scripting Window, and if the script matches the model (by the 'Simulation Script Identifier' in the script), you enable the menu option 'Run Selected Script'.
You can customize the DMN Template to generate the correct script for simulation.