Understanding DMN inputs

Objectives

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.

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.

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

Enumeration

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

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.

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

Hierarchy

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

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