Rule Quality ~ The Route to Trustworthy Business Logic
Rule Quality
Rule quality refers to the fitness of business rules. Assessing rule quality falls into two general areas: validation and verification, as discussed below. Exciting new opportunities are emerging in this area, especially using automated tools. Never before has the business been in a position to shape and refine its own guidance and know-how so directly and proactively.
Validation means assessing fitness with respect to business purpose. The goal is not only to ensure correctness of the rules from the perspective of business people, but also to ensure that when applied, the results will be appropriate in all relevant circumstances. Validation is largely a matter of diligent analysis, but automated analysis tools can help in many ways. For example, diagrams can depict logical or computation dependencies between rules; test scenarios can be retained so prior results can be compared with new results for modified rule sets; rules can be analyzed to identify all events where they need to fire to ensure complete coverage; etc.
Verification means assessing fitness with respect to logical consistency. Verification is always performed on a set of rules, looking for two or more rules that in combination exhibit some anomaly. Below is a quick sampler of common anomalies along with simple examples.
Linguistic Equivalences
- A permanent employee must receive a salary.
- An employee who is permanent must receive a salary.
Modal Equivalences
- An order over $1,000 must not be accepted on credit without a credit check.
- An order over $1,000 may be accepted on credit only with a credit check.
Logical Equivalences
- A high-risk customer must not place a rush order.
- A rush order must not be placed by a high-risk customer.
Subsumations
- A rush order must have a destination.
- An order must have a destination.
Conflicts
- A shipment must include more than 1 order.
- An out-of-state shipment may include only 1 order.
An additional area of concern in rule quality is completeness -- that is, whether there are gaps or holes in coverage. As a simple example, consider the clarification: An order $1,000 or less may be accepted on credit without a credit check. A missing rule might be: An order over $1,000 must not be accepted on credit without a credit check.
In practice, rules are often captured by different people at different points in time, so anomalies such as the above can appear even in the best-coordinated efforts. By the way, such anomalies are not the result of a rule-based approach; rather, they're just a lot easier to spot.
Fortunately, comprehensive detection of such anomalies can be automated. There are only two caveats in that regard, but they are big ones:
- You must coordinate the business vocabulary the rules use.
- You want to ensure quality before rules are translated into an implementation language (so business people can better understand them) and/or are used in production (so you don't have to detect anomalies live).
# # #
About our Contributor:
Online Interactive Training Series
In response to a great many requests, Business Rule Solutions now offers at-a-distance learning options. No travel, no backlogs, no hassles. Same great instructors, but with schedules, content and pricing designed to meet the special needs of busy professionals.
How to Define Business Terms in Plain English: A Primer
How to Use DecisionSpeak™ and Question Charts (Q-Charts™)
Decision Tables - A Primer: How to Use TableSpeak™
Tabulation of Lists in RuleSpeak®: A Primer - Using "The Following" Clause
Business Agility Manifesto
Business Rules Manifesto
Business Motivation Model
Decision Vocabulary
[Download]
[Download]
Semantics of Business Vocabulary and Business Rules