where Business Processes, Data and Rules meet.
Blog
Home / Business Rule / Decision Table Aggregation

Decision Table Aggregation

1

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.
AnnualLeave-DT

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 http://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.

Recommended Posts

Comments

pingbacks / trackbacks

  • […] table, there are some advanced capabilities like, web editor, conflict and overlap detection and aggregation functions that you can take advantage […]

Leave a Comment

You must be logged in to post a comment
Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.