Do behavioral business rules and decision rules ever cross paths? Yes, indeed, all the time! What happens when they do? Which rules 'win'? Understanding this question brings significant clarity to how business logic should fundamentally work. Indeed, it is basic to handling real-world rules. Having problems handling exceptions in your decision logic? Read this Column
In the real world (not software), rules can be broken. Why two decades into the 21st century that obvious reality is still not taken into account in software (e.g., rule engines) is a complete mystery to me. It needs to be corrected!
Rules that people or organizations can break are called behavioral business rules. Think laws, regulations, contracts, service level agreements, etc., etc.
The second major category of business rules is definitional rules. As the name suggests, this kind of rule pertains to the meaning of concepts. Definitional rules cannot be broken; they indicate how things have to be understood.
Definitional rules often take the form of decision rules – rules by which decisions are made. The rules you find in decision models and decision tables are decision rules. Decision rules imply new facts from existing facts – that is, they are about logical implication, able to perform what is commonly called inference. Do behavioral business rules and decision rules ever cross paths? Yes, indeed! All the time.
What happens when they do? Understanding this question brings significant clarity to how business logic should fundamentally work. Indeed, it is basic to handling real-world rules.
Example
To understand the issue, let's take a relatively simple example. Suppose a city is operating its recreational facilities and needs to assess usage fees. The city has the following behavioral business rule (expressed in RuleSpeak®1):
A senior citizen must not be charged a recreational fee for use of facilities.
The city also has also created a decision table to determine appropriate usage fees for its recreational facilities based on length of usage and when the usage occurs.
The decision table is actually a set of decision rules, specifically nine of them (in green). These nine rules could, of course, have been written out as nine individual statements. With a well-formed decision table like the above, however, there is no need to do so2. For example, the statement in the lower right-most cell could have been written as follows (also in RuleSpeak®):
The recreational fee for use of facilities must be deemed $15 if during peak hours on a weekend and for more than 2 hours.
In the case of senior citizens, the earlier behavioral rule is in direct conflict with all the decision rules in the decision table. A senior citizen is never to be charged a recreational fee no matter what the circumstances of usage. So, which rule 'wins' in any given case of usage by a senior citizen?
The answer is it depends. Which rule do you want to win? What's correct according to the business? Let's consider each of the two possible scenarios.
Scenario 1. The Decision Logic Should Win
Let's suppose you want the decision logic to override the behavioral business rule. That seems a bit odd, but no matter for this discussion. Achieving this result is a whole lot easier than you might imagine.
To see how the decision logic could win you need to understand about enforcement level, a unique feature of behavioral business rules that arises because they can be broken. How strictly you want a behavioral rule enforced is a different question from the logic it expresses.
A set of common-sense enforcement levels is given in Table 1.3 To save you a bit of reading, the enforcement level that would satisfy the present scenario is the very last one in the table.

Table 1. Enforcement Levels for Behavioral Rules and Their Implications for Designing Procedures
1Refer to www.RuleSpeak.com.
2Refer to TableSpeak Primer (free download) http://www.brsolutions.com/b_ipspeakprimers.php.
3Reference: Business Rule Concepts: Getting to the Point of Knowledge (4th ed), by Ronald G. Ross 2013, p. 135.
Speak Your Mind