Another Solution for DMCommunity Challenge “Recreational Fee”


The DMCommunity Challenge Apr-2019 “Recreational Fee” is based on the following problem provided by Ron Ross:

A city has created a decision table to determine appropriate usage fees for its recreational facilities based on length of usage and when the usage occurs:

The city also has the following behavioral business rule:

A senior citizen must not be charged a recreational fee for use of facilities.

The First Solution

In April-2019 I’ve provided a quick solution to this problem. However, Ron Ross in his response to all provided solutions made the following comments:

  1. Not charging vs. charging $0. No charge is simply not the same thing as a charge in the amount of $0. A robust business solution should distinguish between the concept of usage (of recreational facilities) vs. the concept of charge (for usage). A usage can occur without any corresponding charge. The rule says so explicitly. If we think the business person who came up with the rule doesn’t understand their business, maybe we should at least ask! Am I ‘playing semantics’ here? No, why should anyone, including auditors or senior citizens themselves, ever have to review charges of $0 that were not supposed to be charged at all?! To create charges in the amount of $0 might simplify the problem from an IT perspective, but not a business perspective.

  2. Two decisions, not one. From what I was able to see, all the solutions reduced the problem to a single decision. From a business perspective, however, there are two decisions, not one:

    • Should a person be charged for use of a recreational facility?
    • If so, how much should the recreational facility user be charged?

    The second decision needs to be addressed only if the answer to the first decision is ‘yes’. In our approach, DecisionSpeak™, this kind of dependency is called a relevance dependency. Why is the distinction important? For one thing, you want to avoid the trap of false assumptions (e.g., no charge being the same as a $0 charge). Also, you must do everything possible in practice to keep decision logic simple and free of exceptions. Real business problems, unlike this toy example, are hard. Rushing into implementations will trip you up.

  3. Behavioral business rule untraceable. The recreational facility challenge started with a clear business rule, written out as earlier. Since the rule represents a clear, definitive policy for the business, you’ll want to trace it. Do I see the statement in any of the solutions, or even anything closely resembling it? No, all I see is rows in decision tables! The policy has been translated into a representational dialect, decision-table-ese. Why does it matter? Simply because business friendliness, readability, and traceability matter. In each solution presented, a business person will need someone capable of reading decision-table-ese to bring the policy back to life. Burying business policies in decision tables might not be as bad as burying them in procedural code, but why should that be the measure(!?).

I’ve finally found time to adjust my previous solution trying to address Ron’s concerns. Here is a new solution.

The Second Solution

Ron wrote that there are two decisions, not one:

  1. Should a person be charged for use of a recreational facility?
  2. If so, how much should the recreational facility user be charged?

So, my new high-level decision “DetermineCharges” now consists of two corresponding sub-decisions “DefineCharging” and “DefineRecreationalFee”:

First, we execute sub-decision “DefineCharging” that answers to the first Ron’s question by setting the decision variable “Should be Charged for Use of Recreational Facility” to TRUE or FALSE. The following decision table implements this logic:

Of course, this table can be expanded to cover more complex charging logic, e.g. to add veterans.

If “Should be Charged for Use of Recreational Facility” is TRUE, then the second sub-decision “DefineRecreationalFee” will calculate the Recreational Fee using the following decision table:

After executing this sub-decision, the high-level decision “DetermineCharges” will also print the calculated charge amount, e.g. “Charge: $10”.

If “Should be Charged for Use of Recreational Facility” is FALSE, then nothing will be calculated and “No Charge” will be printed.

To complete this decision model, I just put all used decision variables in the Glossary:

To test this decision model, I created two test cases:

When I executed these test-cases, I received the following results:

I believe this solution properly addresses Ron’s first two concerns.

About the third concern. While this representation uses Excel-based decision tables to describe business rules and then applies OpenRules to test them, I believe it satisfies “business friendliness, readability, and traceability” requirements and a business person is “capable of reading decision-table-ese to bring the policy back to life.”



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.