Understanding DMN inputs

Objective

After completing this lesson, you will be able to describe DMN inputs

Types of Input Data

Different data types can be used as inputs for the decision logic. Possible input data types are:

  • Boolean
  • Number
  • Enumeration
  • Text 
  • Date
  • Hierarchy

Boolean

A boolean input has two possible values: true or false. Boolean input types can be used for simple checks.

Diagram showing a boolean option: regular customer.

In the example the question whether the customer is a regular customer has two possible answers. It can either be true or false.

Number

The number input type contains numeric values, in ranges or single values. Numbers are compared by operators, and they can have a unit of measure.

In the diagram, the purchase value (number) input type is highlighted. Unit of measures are percentage, weight ,length, temperature, and currency.

Interval types

Numbers can be used in value ranges by using different interval types. For intervals, use the "included" (⊂) symbol:

  • Brackets for closed intervals
    • [1..5] between 1 and 5, including both 1 and 5
  • Parenthesis for open intervals
    • (1..5) between 1 and 5, excluding both 1 and 5
  • Mixed (half-open) intervals
    • (1..5] between 1 and 5, excluding 1 and including 5
    • [1..5) between 1 and 5, including 1 and excluding 5
Row 2 callout: If the Total value is €750, the Discount is 15%. If on the other hand, the Total value is €749,99, the Discount is 10%. So in rule two, €750 is included, denoted by the [. In rule three, €750 is excluded, denoted by).

Enumeration

Enumeration input data is a predefined list of values or classifications. You can compare lists or classifications with input values by using operators.

In the diagram, the Type of shipment option is highlighted. The type of shipment options shown are Express delivery or Standard delivery.

Text (string)

The text input data type is used for notations and other textual information. If possible, text input data should be replaced by enumerations. Choosing a value is less error-prone than typing its name.

In the diagram, the Name option is highlighted.

Date

A date is used to define a specific date or a point in time. By using operators the value can be compared to other dates (often the current date).

In the diagram, the Order date option is highlighted. A date picker is shown.

Hierarchy

A hierarchy input type lists values that can be grouped into different categories. The values have hierarchical dependencies.

In the diagram, the Kind if goods option is highlighted. In a checkbox list, Clothes is selected.

In the example, the kind of goods can be Groceries, which further contains Drinks and Food. The other category is Goods, which contains Clothes and Electronics. The decision logic can select categories or individual items in a category. This may be important when, for example, different packaging types are required for different kind of goods.

Examples of input data

Examples of input data: Part 1

BooleanNumeric
Order application complete?Purchase of more that $10,000
Regular customer?Older than 18

Examples of input data: Part 2

EnumerationHierarchy
Production status (Online, Maintenance, Fault)Geographical locations (content, country, city)
Type of customer (VIP, Gold, Regular)Goods classification (groceries, drinks, fruit juice)

Examples of input data: Part 3

Text (String)Data
Product description (highest quality)Payment within 30 days of approved invoices
Name (Neilson, John, Howard)Delivery by 12:00, 30 September 2016

Log in to track your progress & complete quizzes