When running Decision Table, you may receive multiple results as part of the execution. Sometimes you need all those results and at other times you need an aggregation as the result. In this post, I am going to explain Decision Table Aggregation operators (i.e., Multiple Hit Policy and Aggregation) that allow you to apply these as the result of your Decision Table.

Let's consider a decision table that handles the eligibility of annual leave for an employee. For example:

Decision Table Aggregation

The standard behaviour when this table is run (e.g., for a person aged up to 50 and with 25 years of service) will return a result of (20, 5, 10).

Now if you check the properties of the decision table…
Decision Table Aggregation

…you will see Decision Table Aggregation operators and Order settings when you simply set the aggregation of the table to Sum
Decision Table Aggregation-Sum

Now instead of a list of the results (20, 5, 10), your result will be 35, which is the summation of those values.
Decision Table Aggregation result

Sum is just an example and you can use all the other functions (e.g., Collect, Sum, Min, Max, Count and Average).

If you are using spreadsheets (e.g., Excel) to model the Decision Table, what you need to do is to add aggregation=sum to the settings of the table.

To apply the operator in order to have an aggregated result, there are other ways, such as those we had shown in a table like https://www.flexrule.com/archives/execute-decision-model-and-notation-dmn/ as well (to calculate base premium and auto premium). But this aggregation on the Multiple Hits section is doing the job just as the Decision Model and Notation (DMN) expected.

Last updated January 14th, 2020 at 07:44 am, Published May 5th, 2015 at 07:44 am