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:

  1. Create a DMN diagram.

    To do so, add decision elements and connect them. Read more in section Available diagram elements.

  2. 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).

  3. 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.

  4. 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.

Available diagram elements

In the shape repository, you can choose whether to use the core elements or a complete set of DMN 1.1 elements.

Decision

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.

Input data

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.

Knowledge source

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.

Group

Use this element to group diagram elements that belong together.

Text annotation

Use this element to add information to the diagram or a diagram element.

Information requirement

This connector links any input data or decision element to the decision that requires the information.

Knowledge requirement

This connector links any business knowledge model that must be used by the decision logic, to the decision.

Authority requirement

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.

Association (undirected)

This connector links text annotations to other DMN elements.

Create complex input data 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 create a complex input data element, follow these steps:

  1. Select the data input element you want to configure as complex.

  2. In the attributes panel, set the value of the attribute Type definition to Complex type.

  3. To add attributes to the data input element, click the button next to the Attributes attribute.

    The configuration dialog opens.

  4. Type a name and select a type.

    Depending on the type, you can define further properties.

  5. Confirm with Save.

    The attribute is created.

  6. To add more attributes, open the configuration dialog again by clicking the button.

Create a sub decision

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.

Create a multi instance decision

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.

To create a multi instance decision, follow these steps:

  1. Add a Multi Instance Decision element to your diagram and name it.

  2. Add an Input Data element, which represents the list, and name the element.

  3. In the attribute panel, define the input data element as a list in the Is list attribute.

  4. 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.

  5. 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.

  6. Select your input data element as the input list.

  7. Select the aggregation to specify what will happen with the result of the multi instance decision.

  8. 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.

  9. 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.

Next steps

Define a decision logic

Link DMN elements and diagrams