DMN - Decision Models
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
- 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 must first create a DMNSimConfiguration element:
- Open a Decision Requirements Diagram
- Drag the 'Simulation Configuration' icon from the 'DMN Components' page of the Toolbox onto the diagram
- Double-click to open the DMN Simulation window at the 'Simulate' tab
All DMN elements in the selected Package (Decision, BusinessKnowledgeModel, InputData and ItemDefinition) will be loaded to the DMN Simulation window. The 'Target Decision' combo box will list all the Decisions.
- Choose a target Decision - the dependent InputData elements will be listed in the 'Element' column
- Set a defined dataset by clicking on the 'Value' drop-down arrow in the list
For example, we might choose the dataset 'Income5000' for the InputData element 'Applicant data', and choose 'default' for the InputData element 'Requested product'
Simulate a DMN Model
- When a Target Decision is specified, the 'Simulate' tab will list the Decisions, in dependency order
- Click on the to evaluate all the decision values based on the values defined for the Input Data elements
- Click on 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 to evaluate a single decision and watch the
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: HIGH)
- Bind 'Age' to the field 'Age' in dependent input data 'Applicant data' (runtime value: 40)
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' = HIGH, 'Age' = 40), only one rule with output 'ELIGIBLE' matches.