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:
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).
Sum is just an example and you can use all the other functions (e.g., Collect, Sum, Min, Max, Count and Average).
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.