Prev Next

DMN Simulation

After a Decision Model is created, you can:

  • Configure a DMN Simulation Artifact and Validate, Run, Step-through or Debug the model
  • Do what-if analysis to ensure the model meets the requirements of the business by switching data sets
  • Generate code for the DMN Server with any of the supported languages: Java, JavaScript, C++ and C#
  • Simulate BPMN and DMN together.

This Help topic covers the process of configuring and running a DMN simulation.

Configure a DMN Simulation

To configure a DMN simulation you need to create a DMNSimConfiguration element:

  • Open a Decision Requirements Diagram
  • Drag the DMNSimConfiguration element from the toolbox onto the diagram

  • Double-click to open the DMN Simulation window.

All DMN elements in this Package (Decision, BusinessKnowledgeModel, InputData ItemDefinition) will be loaded to the Simulation window. The 'Target Decision' combo box will be filled with all the Decisions:

  • Choose a target decision - the dependent InputDatas will be filled in the list
  • Choose a defined dataset by clicking on the Dataset cell in the list
    For example, choose Dataset 'Income5000' for InputData 'Applicant data'; choose 'default' for InputData 'Requested product'.

Simulate a DMN Model

  • When a Target Decision is specified, the 'Simulation' page will be filled with the decisions, in dependency order
  • Click on the Run button to evaluate all the decision values based on the values for Input Data
  • Click on the Step button to evaluate a single decision and watch the DMN Expression window, which clearly shows the input value for the decision and output based on the input; the diagram containing the decision hierarchy will highlight the executed decisions and show the runtime results on a label

In this example, the decision 'Eligibility' returns a string 'ELIGIBLE' and invokes BusinessKnowledgeModel 'Eligibility rules' by binding the parameters as shown:

  • Bind 'Pre-Bureau Affordability' to the dependent decision 'Pre-bureau affordability' (runtime value: True)
  • Bind 'Pre-Bureau Risk Category' to the dependent decision 'Pre-bureau risk category' (runtime value: VERY LOW)
  • Bind 'Age' to the field 'Age' in dependent input data 'Applicant data' (runtime value: 40)

An example DMN Expression in a Business Knowledge Model using Sparx Systems Enterprise Architect.

The BusinessKnowledgeModel 'Eligibility rules' has a Hit Policy P (Priority), meaning that multiple rules can match, but only one hit should be returned; the ordering of the list of output values is used to specify the (decreasing) priority.

In this run time case ('Pre-Bureau Affordability' = true, 'Pre-Bureau Risk Category' = VERY LOW, 'Age' = 40), only one rule with output 'ELIGIBLE' matches.

Learn More