Skip to content

Hit Policy

Pragyan Das edited this page Nov 17, 2017 · 1 revision

A rule is hit if it is matched and the hit policy indicates that the matched rule's output value should be included in the decision table result. Each hit results in one output value (multiple outputs are collected into a single context value). Therefore, multiple hits require aggregation. The hit policy is specified using the initial letter of one of the following boldface policy names.

Single hit policies:

  • Unique – only a single rule can be matched
  • Any – multiple rules can match, but they all have the same output
  • Priority – multiple rules can match, with different outputs. The output that comes first in the supplied output values list is returned
  • First – return the first match in rule order

Multiple hit policies:

  • Collect – return a list of the outputs in arbitrary order
  • Rule order – return a list of outputs in rule order
  • Output order – return a list of outputs in the order of the output values list

The Collect policy may optionally specify an aggregation, as follows:

  • C+ – return the sum of the outputs
  • C# – return the count of the outputs
  • C< – return the minimum-valued output
  • C> – return the maximum-valued output

The aggregation is defined using the following built-in functions specified in 10.3.4.4 List functions: sum, count, minimum, maximum. To reduce complexity, decision tables with compound outputs do not support aggregation and support only the following hit policies: Unique, Any, Priority, First, Collect without an operator and Rule order.

Courtesy: 10.3.4.6 clause DMN 1.1 specification

For detailed information, check :

DMN Specification Document

Clone this wiki locally