Eight Steps to Crafting a Business Rule — Step 6: Say Something about the Subject (Subject + Verb + Object)
In the prior articles in this series, I talked about choosing the subject of a business rule statement and about choosing "must" or "only" for the rule keyword. If you are grammatically inclined, the next step should be fairly obvious.
Business rules should always be expressed as complete sentences. (Ron Ross maintains that the period at the end of a rule is your reward for writing a complete sentence. Given how hard it can be to write business rules clearly, I'd say a bigger reward is in order!)
You've already identified the subject and the rule keyword, so the next step is to identify a verb and an object to complete the basic part of the sentence structure.
So how do you know which verb to use? And how do you know what the object of that verb should be?
Well, this is where a concept model comes in. A concept model can be used like a road map for building your rule statements. The verb concepts in a concept model are like sentence fragments or building blocks that you can use to build your rule statement. Examples of verb concepts are:
- payment is received for registration
- refund is given for registration
- registration is made for conference
- registration is cancelled
- refund has refund amount
These verb concepts are diagrammed in the concept model in Figure 1.
Figure 1. Verb Concepts diagrammed in a Concept Model
Suppose I already know my rule starts with "A refund must…". By looking at the concept model, I see that the relevant verb is "is given for" and the object is "registration". So I now have:
"A refund must be given for a registration…."
Note that in a more complex concept model, there will likely be multiple verb concepts to choose from. But by using the concept model, you narrow your choices considerably. And, of course, the end result is built on a solid foundation of well-defined and well-structured vocabulary that can be used consistently for expressing all your other rules.
If you have a concept model, but the verb concepts don't suit your purpose, then it is likely that the concept model needs to be refined or extended.
If you don't have a concept model, then I strongly suggest you start to build one, even if only for use in the set of rules you are working on. The resulting rule statements will be of much higher quality.
Computations and Derivations
Back in Step 2, you identified computation and derivation rules in your source material. These two types of business rule require special attention because, as a best practice, we generally do not include the result of computations and derivations in the concept model.
A computation rule starts with the name of the thing being calculated followed by "must be computed as" and then the formula. Some examples:
- The total points for a flight must be computed as the sum of the base points and any bonus points.
- The sales tax amount for a bill must be computed as the total bill amount times the tax rate.
A derivation rule starts with the subject, followed by "must be considered", and then the derived concept. Some examples:
- A customer must be considered a preferred customer if the customer has flown more than 25,000 miles in the last 12 months.
- An item must be considered a heavy item if it weighs more than 50 pounds.
You want to use this computed and derived vocabulary in the other rules so that you don't have to restate the computation or derivation formula in each one. For example, the vocabulary from above has been re-used in the following rules:
- The total points for a flight may be awarded to a customer only if the customer has completed the flight.
- A baggage fee must be charged for a heavy item.
By understanding the type of business rule you are writing as well as leveraging the concept model, you can put together your core sentence structure very quickly. Now all you have to do is add the conditions to the rule, which, of course, I will discuss next month.
Building Business Solutions: Business Analysis with Business Rules, by Ronald G. Ross with Gladys S.W. Lam, An IIBA® Sponsored Handbook, Business Rule Solutions, LLC, October 2011, 304 pp. URL: http://www.brsolutions.com/bbs
For more information on the RuleSpeak® technique, visit www.RuleSpeak.com
Articles on Concept Models:
Ronald G. Ross, "Concept Model vs. Fact Model vs. Conceptual Data Model — Just a Matter of Semantics?" Business Rules Journal, Vol. 13, No. 1 (Jan. 2012), URL: http://www.BRCommunity.com/a2012/b632.html
Ronald G. Ross, "What Are Fact Models and Why Do You Need Them? (Part 1)," Business Rules Journal, Vol. 1, No. 5 (May 2000), URL: http://www.BRCommunity.com/a2000/b008a.html
Ronald G. Ross, "What Are Fact Models and Why Do You Need Them? (Part 2)," Business Rules Journal, Vol. 1, No. 7 (July 2000), URL: http://www.BRCommunity.com/a2000/b008b.html
# # #
About our Contributor:
February 6-8, 2018
April 17-19, 2018