Blog Posts BPMN DMN

DMN: What’s a Hit Policy?

Blog: Method & Style (Bruce Silver)

Newcomers to the Decision Model and Notation (DMN) standard may be put off by the notion of a decision table’s “hit policy.”  What the heck is that?  It sounds technical.  Add to that the idea that the modeler is supposed to select the “best” one.  Too complicated!

Well, it’s actually not.  Here is what’s going on.

Each row in a decision table is a rule.  The columns represent inputs and, at the end, one (or occasionally more than one) output.  Each input cell in a rule represents a true/false condition for the input: Does it match a particular value, fall into a specified range, etc.?  (A hyphen in the cell means the input is irrelevant in this rule; the cell value is true by default.)  If all input cells for the rule evaluate to true, the rule is said to match, and the output cell value is selected as the decision table output.  OK, we all get that.

Hit policy comes into play when more than one rule matches.  In that case the rules are said to overlap, but that’s not necessarily an error.  Sometimes it’s easier to create decision tables with rule overlap, and those tables rely on the hit policy to select the proper output value.  There are 5 different hit policies that select a single output value, plus a few more that create a list of output values.  The 5 are:

Modelers need to understand the relative advantages and disadvantages of U, A, and P tables.  While some experts tend to recommend always using a particular one of these, they each have their place.  Compare the two decision tables below, which perform a loan prequalification prior to obtaining the credit score.  The output value is “Need credit score” if the loan-to-value (LTV) ratio is less than or equal to 80%, the Affordability Category is “Medium” or “High”, and the Borrower Risk Category is “Low” or “Medium”.  Any other combination of input values results in “Decline”.

The U table has the advantage that any combination of input values matches exactly one rule, so the resulting output is always crystal clear.  But the A table below it is not only simpler to construct, but has the advantage, in this case, of isolating each reason for declining the loan in a separate rule.  A loan application with LTV>80%, low affordability, and high borrower risk will actually match all of the first three rules, but they all have the same output value, “Decline.”

The P table above is similar to the A table, and even simpler, because rule 4 has all inputs hyphen, meaning this rule always matches.  Such an “else” rule, with all inputs hyphen, is fine as long as its output value – here “Need credit score” – is the lowest priority.  That means it must be listed last in the allowed output values in the column heading… which it is.  In decision tables, simpler is usually better, and so P tables of this sort are often the best choice.  But there is another form of P table I call P2, which is even simpler.

The P2 table has only two rules, including an “else” rule.  Notice in this one “Decline” is the lowest priority, unlike the first P table.  P2 is in a sense the simplest, but it does not isolate each reason for decline in a separate rule.  In most tables with two possible output values, I would probably favor the first P table – call it P1 – over the others, but a case could be made for each of them.

When there are more than two possible output values, P tables can be misleading to untrained users.  This is a point often made by Jan Vanthienen, a noted decision table expert.  For example, he might ask, in the P table below, when is the output value “Referred”?

If you said, when RiskCategory is “Medium” that would be incorrect.  The correct answer is more obvious from the equivalent U table below:  When isAffordable is true and RiskCategory is “Medium”.

The issue with the P table comes about when a rule whose output value is not the lowest priority includes a hyphen cell.  Here rule 4, output value “Declined”, has a hyphen in RiskCategory, so its value has higher priority than rule 2 when RiskCategory is “Medium” (and isAffordable is false).

Want to learn all the ins and outs of DMN?  DMN Method and Style training, including lots of exercises, quizzes, and post-class certification, is available now, web/on-demand.  Click here to get started.

The post DMN: What’s a Hit Policy? appeared first on Method and Style.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/dmn-whats-a-hit-policy/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×