Model a decision
Before you start modeling a decision, it is helpful to answer the following questions:
Which decisions have to be made?
What is the goal of a decision?
Can a decision be split into partial decisions?
Which requirements are needed to make a decision?
Is the logic for a decision determined by external laws or internal guidelines?
Modeling a decision involves the following steps:
Create a DMN diagram.
To do so, add decision elements and connect them. Read more in section Available diagram elements.
For each decision, add rules to decision table and define a hit policy.
Read more in section Define a decision logic. The section also describes how to create simple literal expressions.
To calculate sums using literal expressions, read more in section Using advanced literal expressions (functions in DMN decision elements).
You can simulate the DMN diagram.
To do so, apply data to it and check the results. Read more in section DMN simulation.
In addition, you can run test cases to check whether your DMN diagram meets specific requirements.
Read more in section The DMN Test lab.
You can integrate your decision model with a BPMN business process.
Read more in section Link a DMN diagram to a BPMN diagram.
In this section, the diagram elements and editing functions that are only available for this notation are described.
For general creation and editing options that are available for all notations, read more in section Modeling.
In the shape repository, you can choose whether to use the core elements or a complete set of DMN 1.1 elements.
A decision element determines a result based on input data and a decision logic. Each decision element provides a table for the decision logic. You can open the decision table by clicking in the decision element.
To describe a decision, use a question-answer-scheme. By default, the attribute panel provides the attributes Question and Answers for documenting this scheme for each decision.
You can split a decision into one main and several sub decisions. To do this, you link several decision elements in the necessary order. Read more in section Create a sub decision.
Via the input data element, you provide information for decisions. One input data element can be used by multiple decisions and business knowledge models.
If you must model numerous data input elements, you can simplify this by using the complex data input element. Read more in section Create complex input data elements.
Business knowledge model
With the business knowledge model element, you add a function containing business knowledge, for example, in form of business rules, an additional decision table, or an analytic model.
Via this element, you can reuse decision logic. Read more in section Reuse decision logic via business knowledge models.
With the knowledge source element, you describe the source of rules for a decision, for example laws, regulations, and guidelines.
Multi instance decision
A multi instance decision is a sub decisions which is executed several times. The result of a multi instance decision is a value or a list that is used as input for another decision. Read more in section Create a multi instance decision.
Use this element to group diagram elements that belong together.
Use this element to add information to the diagram or a diagram element.
This connector links any input data or decision element to the decision that requires the information.
This connector links any business knowledge model that must be used by the decision logic, to the decision.
This connector links any diagram element that acts as a source of guidance or knowledge to another diagram element.
You can connect an input data element with a dependent knowledge source or a knowledge source element with any dependent decision.
This connector links text annotations to other DMN elements.
If a decision requires numerous input data, you must model many input data elements. You can simplify this by creating a complex input data element in which you define all input data as attributes.
To determine a discount, you need data on the purchase value and the customer status. Instead of creating an input data element for both pieces of information, you create one complex data input element and configure the purchase value and the customer status as its attributes. In the decision table, both attributes are available.
To create a complex input data element, follow these steps:
Select the data input element you want to configure as complex.
In the attributes panel, set the value of the attribute Type definition to Complex type.
To add attributes to the data input element, click the button next to the Attributes attribute.
The configuration dialog opens.
Type a name and select a type.
Depending on the type, you can define further properties.
Confirm with Save.
The attribute is created.
- To add more attributes, open the configuration dialog again by clicking the button.
When a lot of information has to be considered for a decision, you can outsource part of the information to sub decisions. This makes the diagram easier to understand as the dependencies and input values are easier to see. The logic of each decision is also easier to define.
For sub decisions, the decision element is used. To create a sub decision, add a decision element and connect it with the decision that needs the result of the sub decision as input.
Multi instance decisions are sub decisions that provide input for other decisions. They are similar to a for-loop in a computer program: They iterate decisions and expressions over a selected list. The list is contained within the input data where the input data is either a list or a complex input data type.
Each position of the purchase agreement is validated to determine the validity of the entire agreement.
To create a multi instance decision, follow these steps:
Add a Multi Instance Decision element to your diagram and name it.
Add an Input Data element, which represents the list, and name the element.
In the attribute panel, define the input data element as a list in the Is list attribute.
Connect the two elements.
To do so, select the multi instance decision element and from its shortcut menu, drag the connector icon to the input data element.
To specify the list over which the multi instance decision must iterate, click in the element.
The configuration dialog opens.
You can also open this dialog via the Iteration attribute in the attribute panel.
Select your input data element as the input list.
Select the aggregation to specify what will happen with the result of the multi instance decision.
Confirm with Save.
In the multi instance decision, an input data element is added representing the values of the list.
Don't define this element as a list, otherwise the multi instance decision is set up incorrectly.
Define the internal logic of the multi instance decision.
To do so, add a decision and place it in the multi instance decision. Connect the decision with the input data element that is also located in the multi instance decision.
Setting up the multi instance decision is complete.
Now, you can link it to the decision that needs the result of the multi instance decision as input.
Is this page helpful?