Ron Ross recently posted a question “What Happens When Behavioral Business Rules and Decision Logic Collide?” in which he asks whether a behavioral rule or decision logic should “win” when they disagree. The problem is that this is the wrong question.
Take his example about a city charging for its facilities. The behavioral rule is “A senior citizen must not be charged a recreational fee for use of facilities.” The decision logic is a table shown in this image:
But this table is clearly wrong – if Senior Citizens should not be charged recreational fees than this logic is incomplete/inaccurate. Asking if this should “win” relative to the behavioral logic is a pointless question – the logic is broken. This table is just the default or generic calculation and the point of a decision is to decide for any SPECIFIC transaction not for a GENERIC one.
The right question is to ask how the city decides on recreational fees. One of the decisions in this model would be to calculate the base hourly fee. Others would be to identify exclusions (I bet Senior Citizens are not the only exception) and discounts. Each decision would be described by appropriate decision logic. The overall decision model would then decide on the fee correctly in all circumstances.
Ron argues that adding exceptions to decision tables complicates them. Well it can, especially if you do it wrong or build one great big decision table. A decision model handles them just fine.
So, my answer to Ron is simple. Build the right decision logic and then you won’t have to answer the question.