1. Home
  2. Decision Model and Notation Decision Table

Decision Model and Notation Decision Table

◷ Reading Time: 3 minutes

A Decision Model and Notation decision table consists of:

  • name
  • set of inputs, each input optionally associated with a type and list of input values
  • set of outputs, each output optionally associated with a type and list of output values
  • list of rules in rows or columns of the table, where each rule is composed of the specific input entries and output entries of the table row (or column)
  • hit policy
  • Aggregation – only applicable in a Decision Table with a multiple hits policy (by setting ‘processAll’ or Process All Rows to true) Check API

Multiple Hits Policy for Single Output Decision Table

There are three types of multiple hits policies for a single output Decision Table (Multiple Hits Policies for Single Output)

  1. No order: Returns all hits in a unique list in arbitrary order
  2. Output order: Returns all hits in decreasing priority order. Output priorities are specified in an ordered list of values
  3. Rule order: Returns all hits in rule order (i.e., dependency on the order of the rules)

When a multiple hits table returns output entries from multiple rules, the output entries have to be aggregated into a single result. An Aggregation specifies the function to handle the multiple output entries.

  1. Collect: The result of the Decision Table is the list of all the outputs, ordered or unordered, per the hit policy
  2. Sum: The result of the Decision Table is the sum of all the outputs
  3. Min: The result of the Decision Table is the smallest value of all the outputs
  4. Max: The result of the Decision Table is the largest value of all the outputs
  5. Count: The result of the Decision Table is the number of outputs
  6. Average: The result of the Decision Table is the average value of all the outputs, defined as the sum divided by the count.

Automatic Collection

In a Multiple Hits Policies for Single Output, the expression for the action can be left empty. The Decision Table automatically creates a collection for the output parameter and you can collect the result later. This collection is a generic ‘List’ and the results will be added to this list and then the aggregate function will be run on top of it when the Decision Table execution is finished. For more examples, please have a look at http://www.flexrule.com/archives/decision-table-aggregation/

What’s next?

  1. Introduction to decision tables
  2. Preparing a decision table
  3. Modeling decision table
  4. Decision Model and Notation – decision table
  5. Check overlaps
  6. Decision Table final logic
  7. Multilingual decision table
  8. Decision Table 101

Tutorials

  1. Decision Table Hello World
Updated on December 17, 2019

Was this article helpful?