CMW Lab Blog

DMN Decision Tables: Build Rules and Check Their Coverage

Validated completeness and service class feed a Unique decision table that returns a handling route. The workflow performs the resulting work.

A decision table represents a decision as combinations of input conditions and their corresponding results. Decision Model and Notation (DMN) provides a standard way to describe business decisions and their logic, including decision tables. To build a useful table, define the question, the allowed inputs, the returned result, and what should happen when rules overlap or no rule matches.

Name the decision before drawing the table

Consider a fictional internal service desk. It needs to determine the handling route for a request. The decision question is “Which handling route applies?” It does not assign a person, wait for their response, or complete the request. Those activities belong to the surrounding workflow.

The example uses two inputs: whether the request details are complete, and whether the requested service is standard or nonstandard. Its result is one route: request missing information, use the standard queue, or seek specialist review. These labels are invented for teaching, not a recommended service policy or a CMW customer implementation.

The completeness flag is itself a required input. “Incomplete” means the request lacks business details; it does not mean the flag is absent. Before evaluating the decision, validate the flag and service class against their allowed values. An unknown service class requires a validation hold instead of being silently treated as standard.

The Object Management Group’s DMN specification is the standards reference. DMN covers decision modeling more broadly than a spreadsheet grid. A decision model can show the information and other decisions on which a result depends, then express the logic used to produce it. Tool support and executable expression syntax need to be verified separately.

Original conceptual diagram of a fictional service-desk decision. This explains responsibilities and is not an executable DMN model or product screenshot. Select the image to view the full-size diagram.

Write three rules with a defined result

For this small example, each row below is a rule. Both input conditions in a row must match. “Either allowed class” means standard or nonstandard after input validation. The table is a readable design illustration, not an importable DMN file or literal FEEL code.

Handling route: illustrative Unique hit policy
Request detailsService classReturned route
IncompleteEither allowed classRequest missing information
CompleteStandardStandard queue
CompleteNonstandardSpecialist review

A complete request for a nonstandard service matches the third row. An incomplete request for that same service matches the first row. The result changes because the input facts change, not because someone moves a row higher in the table.

Keep the output vocabulary small and explicit. If the workflow expects a route code, define that code and its meaning rather than returning an informal sentence that different integrations might interpret differently. In this article the descriptive labels make the logic easy to inspect.

Use Unique to expose conflicting rules

A hit policy defines how matching rules contribute to the decision result. With Unique, at most one rule may match. The policy does not mean “take the first match.” Camunda’s DMN hit-policy documentation explains both the single-match constraint and the possibility that no rule matches.

Now imagine adding a rule that says “Complete request; either allowed service class; standard queue” while retaining the specialist rule. A complete, nonstandard request would match both rules. That is an overlap to repair under Unique. Changing their order would not make the table valid under that policy.

One repair is to keep the standard-queue rule restricted to standard services, as in the table above. Choosing a different hit policy is a separate design decision, not a way to conceal an accidental conflict. First, Any, and Collect have different meanings; choose them only when those meanings match the business requirement and the implementation supports them.

Our business rules engine and workflow engine comparison discusses execution responsibilities and includes an ordered First-policy purchasing example. This service-desk table instead uses disjoint conditions to explain how to build and inspect a decision table.

Check coverage separately from overlap

Two inputs with two allowed values each produce four combinations here. The first row covers both incomplete-request combinations. The other two rows cover complete/standard and complete/nonstandard. Every valid combination therefore has exactly one result in this particular table.

That coverage comes from the rules and the declared input domain. Unique alone does not establish it. If the nonstandard-service row were removed, complete/nonstandard would have no matching rule. Decide whether that result should create an exception, request additional information, or follow another explicitly defined route. Do not let “no match” become an implied approval.

Missing input, an unrecognized value, and a valid input with no matching rule are different conditions. Keeping them separate makes the problem easier to diagnose. Test them separately even if the workflow ultimately sends all three to the same accountable review team.

Review the decision as a small model

To create a decision table, write the question and output first, define the input domains, express the rules, select the hit policy, and then test the combinations and exceptions. For this example, record the expected route for each of the four valid combinations, plus a missing completeness flag and an unknown service class. Deliberately introduce the overlapping broad rule to check that your review or chosen tool detects the conflict.

Keep the approved table version with the decision’s rationale and test expectations. When a policy changes, identify which results should change and which should remain stable. A table that fits on one screen can still encode a consequential mistake.

If you are evaluating CMW’s workflow engine, use the decision question and expected outputs to discuss how the surrounding process will use the result. Confirm any DMN import, evaluation, expression-language, and versioning requirements directly during evaluation.

Get a 30-day trial!

About the author
Pavel Grebeshkov

Pavel Grebeshkov has more than 15 years of experience in IT projects. His background includes CMO roles at CMW Lab and Familoop, bringing a marketing perspective to the needs of business software buyers and vendors.

He is the CEO of Softosaur, a platform for the B2B software and IT community. His articles on the CMW Lab blog focus on workflows, business processes, and the practical questions teams face when evaluating business software.

Exit mobile version