Blog Posts BPMN DMN

The Quiet Battle for Decision Tables

Blog: Method & Style (Bruce Silver)

Decision logic can take many forms: constraint rules, if-then rules, decision trees, decision tables, and more.  Over the years, decision management vendors have gradually allowed decision tables to nudge the other forms aside, for a number of reasons.  Decision tables are easy for business people to understand.  Their logic is declarative, meaning there is no prescribed order of evaluation.  They can be analyzed, either by visual inspection or software, for completeness and consistency, meaning every combination of input values generates a consistent outcome regardless of the order of evaluation.  Moreover, normalization principles analogous to those of the relational model in database design can be applied to decision tables, eliminating unnecessary rules or unnecessary inputs in selected rules.

These benefits, however, come at a price.  They impose constraints on what can be put in a decision table cell.  In the case of DMN, these constraints are called unary tests.  They do not allow condition cells to contain functions or complex expressions or reference other variables at all, other than by simple equality or inequality.  And this in turn limits the kind of logic possible in a decision table.  In DMN 1.0, this was a conscious choice.  It enabled all those benefits I just mentioned.  After all, decision tables are not the only form of decision logic, and the others are able to use the full power of the FEEL expression language, so there is no practical limitation on DMN’s decision logic.  I wasn’t on the task force back then, but actually I am surprised that the unary tests constraint was able to pass.  I’m not sure it could pass today, and in fact there is a movement afoot from some members to effectively discard it.

To a number of decision modeling tool vendors, DMN just means DRDs and decision tables.  They have no interest in FEEL, BKMs, contexts, or XML serialization – all the things that make DMN a true standard.  If their tool can create something that looks more or less like a DRD and some kind of decision table, that’s good enough to call it DMN.  I am hopeful that the DMN TCK will one day convince the marketplace that this is insufficient, but that is for the future.  The issue right now is that for those vendors, decision tables are their only form of decision logic, and they cannot live with the unary test constraint.  It’s true that if you allow functions and variables and arbitrary FEEL expressions inside a condition cell, decision table logic can be much more powerful.  But it means you can no longer test for completness, consistency, and normalization violations.

This is one of the issues under discussion now for DMN 1.2, which is due for summer of 2018.  There is some merit to it, but on balance I am opposed, because it would eliminate the powerful static analysis possible with decision tables constrained to unary tests.  And here is an interesting fact:  The DMN spec does not require a decision table to be complete or declarative, or to contain the minimum number of rules, or to conform to first, second, or third normal forms.  While those things are considered best practice by decision table experts, they are all considered to be matters of “method and style” by the DMN spec.  Violating them does not prevent execution, but it does make the logic harder to understand and maintain.

So my DMN Method and Style Basics training spends some time explaining these issues, how to recognize problems like gaps in the rules, hit policy errors, subsumption, rule masking, and normal form violations, and how to fix them.  Some of these “style errors” are easy to make by mistake and hard to detect by eye, so Method and Style Decision Table Analysis is built right into the Trisotech DMN Modeler.  In one click, the tool warns you of these problems and suggests how to fix them.  In the diagram below, the decision table for Loan Approval contains a gap, hit policy violation, and subsumption (rules could be combined).  Click Method and Style Decision Table Analysis, and the Log Viewer lists the problems.

If you’re interested in how to use decision tables in DMN, the DMN Method and Style Basics training is available now as on-demand eLearning, including 60-day use of the Trisotech DMN Modeler and post-class certification.  Click here for more information and registration details.  You can sample the training for free, including hands-on with the tool, simply by registering at www.trisotech.com/MethodandStyleTrial.  That gets you an eval login to the software, and the free eLearning is accessible from the Learning menu.

The post The Quiet Battle for Decision Tables 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/the-quiet-battle-for-decision-tables-2/?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

×