Writing Natural Language Rule Statements — a Systematic Approach Part 16: More Activity Rules
About this series of articlesWhile my first series of articles on writing natural language rule statements[1] explored a wide variety of issues in a rather organic and hence random manner, this series takes a more holistic and systematic approach and draws on insights gained while writing my recently-published book on the same topic.[2] Rule statements recommended in these articles are intended to comply with the Object Management Group's Semantics of Business Vocabulary and Business Rules (SBVR) version 1.0.[3]
The story so far
In previous articles in this series (see the "Language Archives" sidebar) we have looked at standardised rule statements for various types of data rule,[4] as well as activity rules,[5] in particular activity restriction rules.[6] Each specific type of rule statement has a common formulation which we have discussed in both a relatively informal way and (except for activity restriction rules) by way of rule statement patterns.
In this article, we will be looking at the remaining types of activity rule:
- activity obligation rules, which require a process or other activity to occur either within some defined time period or when particular conditions apply
- process decision rules, which determine what action a business process or system component is to take in specific situations.
Activity obligation rules
These can place obligations on
- the organisation and its systems (as in RS193 – RS196).
- some other party, such as a customer or supplier (as in RS197 – RS199).
RS193. | Each application must be processed within 1 business day of receipt of that application. |
RS194. | Acknowledgment of a service request that is made before 2pm must occur before 5pm on the day on which that service request is made. |
RS195. | A replenishment order must be raised for a part no later than 24 hours after the quantity on hand of that part falls below the reorder point for that part. |
RS196. | Monthly processing of the transactions for a calendar month must be performed during the first business day after that calendar month. |
RS197. | Each payment must be made on or before the due date for that payment. |
RS198. | Each laptop computer must be removed from any bag before security screening.[7] |
RS199. | Each passenger must wear his or her seatbelt at all times while the seatbelt sign is illuminated. |
Note that
- rule statements RS193 – RS197 each require that the process in question occurs within some defined time period.
- rule statement RS198 requires that the activity occur before some other activity can occur.
- rule statement RS199 requires that the activity occur when some particular condition applies.
- rule statement RS195 requires not only that the process occur when some particular condition applies but also that it occur within some defined time period.
Note also that there is a difference between
- an activity time limit rule (which does not require that the activity occur but restricts it if it does) and
- an activity obligation rule (which requires that the activity occur).
These rules have very similar statements; however, while activity time limit rule statements include may and only, activity obligation rules include must. Compare rule statements RS200 and RS201. While check-in is obligatory, online check-in is optional.[8]
RS200. |
Check-in for a flight |
RS201. | Online check-in for a flight may occur only earlier than 4 hours before the departure time of that flight. |
Since this difference in modal verbs (may and must) is often the only feature distinguishing these rule statements, they are often confused. Indeed, in Part 14 I wrongly categorised rule statement RS173 (reproduced here) as an activity time limit rule; it is in fact an activity obligation rule.
RS173. | Acknowledgment of an order must occur during the 24 hours after the receipt of that order. |
Object status rules
A type of rule that is very similar to an activity obligation rule (in that its rule statement has the same syntax) is an object status rule; this refers to the required status of an object (as in RS202) rather than the process by which that status is achieved (as in RS203). As can be seen in these two rule statements, the same participle (in this case locked) can signify either the process or the resulting status.
RS202. | Each door of the train must be locked while that train is in motion. |
RS203. | Each door of the train must be locked before that train moves. |
While we're looking at doors of vehicles, two interesting rules relate to aircraft doors. "Arming" of aircraft doors after pushback (reversal from the gate) but before take-off ensures that, if a door is opened after a crash or emergency landing, an escape slide automatically inflates. On landing, of course, all doors must be disarmed. I'll have more to say about these rules in a subsequent article.
RS204. | Each door of the aircraft must be armed after pushback and before take-off. |
RS205. | Each door of the aircraft must be disarmed after landing before any door is opened. |
Note the different styling of 'before' (in line with SBVR conventions):
- as a preposition (rendered as 'before') before a term (e.g., take-off) or literal (e.g., 5pm)
- as a conjunction (rendered as 'before') before a complete clause
Defining the activity governed by an activity obligation rule
As with activity restriction rule statements (discussed in the previous article in this series), each activity obligation rule statement needs to define the activity that is governed by the rule, by way of one of the following:
- the term signifying the object of the activity followed by a verb in the passive voice,[10] e.g.,
- Each application must be processed
- A replenishment order must be raised for a part
- Each payment must be made
- Each laptop computer must be removed from any bag
- Each door of a train must be locked
- a verbal noun,[11] usually followed by a phrase signifying the object of the activity, e.g.,
- Acknowledgment of a service request that is made before 2pm must occur
- Monthly processing of the transactions for a calendar month must be performed
- Check-in for a flight must occur
- (less commonly) the obliged party (such as customer) followed by a customer-perspective verb in the active voice,[12] e.g.,
- Each passenger must wear his or her seatbelt
Note that the term signifying the object of the activity may be followed by
- a prepositional phrase, such as of a train, for a calendar month.
- a qualifying clause, such as that is made before 2pm.
The term signifying the obliged party might also be followed by either of these (e.g., in economy class, that has a balance less than $1000).
The verb may also be followed by a prepositional phrase, such as for a part, from any bag.
Describing the circumstances in which the governed activity is obligatory
These circumstances may be described by any of the following:
- a temporal phrase, introduced by one or more temporal prepositions (and optionally preceded by at all times), e.g.,
- during the first business day after that calendar month
- before security screening
- before 5pm on the day on which that service request is made
- on or before the due date for that payment
- at all times while the seatbelt sign is illuminated
- a temporal phrase preceded by an expression signifying an interval, e.g.,
- earlier than 30 minutes
before the departure time of that flight
- during the 24 hours
after the receipt of that order
- within 1 business day
of receipt of that application
- a clause (consisting of a subject, verb, and optional object) preceded by a temporal conjunction, e.g.,
- while that train is in motion
- before that train moves
- a temporal conjunction and clause preceded by an expression signifying an interval, e.g.,
- no later than 24 hours
after the quantity on hand of that part falls below the reorder point for that part
- as a combination of two or more of any the above:
- simply concatenated, as in:
after landing
before any door is opened
- joined by and or or, as in:
after pushback and
before take-off
Process decision rules
A process decision rule determines what action a business process (as in RS206) or system component (as in RS207) is to take in a specific situation:
RS206. | The processing of each order must apply the preferred customer discount to the price of each item in that order if the customer who raised that order is a preferred customer. |
RS207. | Each ticket barrier must retain each ticket that is expired. |
If a process decision rule governs a business process, the rule statement defines that process by any of the means that are available in other activity rule statements. Rule statement RS206 uses the verbal noun processing. If the rule governs a system component, the subject of the rule statement is the term signifying that component (ticket barrier in RS207).
The action to be taken is defined using a verb (apply, retain) followed by a term or terms signifying the object(s) of that verb (preferred customer discount, price in RS206, ticket in RS207). Each such term may be followed by a qualifying clause (of each item in that order, that is expired).
A process decision rule often includes a conditional clause introduced by a conditional conjunction (if, unless). Rule statement RS207 has the conditional clause the customer who raised that order is a preferred customer. In fact, any rule statement can include a conditional clause.
Rule statement patterns for activity rules
In the following patterns, as previously discussed,
- <activity term> signifies
- the object of the activity,
- the activity itself by way of a verbal noun, or
- the party obliged to perform the activity or restricted in when they can perform the activity.
- <activity verb> is
- either undergo or the passive form of the verb signifying the activity, if <activity term> signifies the object of the activity,
- occur or be performed, if <activity term> is a verbal noun,
- the active form of the verb signifying the activity, if <activity term> signifies the obliged or restricted party.
- <time period definition> is any of the possibilities discussed under the heading "Describing the circumstances in which the governed activity is obligatory" above.
P37. | <activity time limit rule statement> ::= {Each | The | A |} <activity term> {<qualifying clause> |} may <activity verb> {<noun phrase> {<prepositional phrase> |}|} only <time period definition> {{if | unless} <conditional clause> |}. |
P38. | <activity exclusion period rule statement> ::= {The | A |} <activity term> {<qualifying clause> |} must not <activity verb> {<noun phrase> {<prepositional phrase> |}|} <time period definition> {{if | unless} <conditional clause> |}. |
P39. | <activity pre-condition rule statement> ::= {Each | The | A |} <activity term> <qualifying clause> |} may <activity verb> {<noun phrase> {<prepositional phrase> |}|} only {if | after} <conditional clause>. |
P40. |
<activity prohibition rule statement> ::= |
P41. | <activity conflict rule statement> ::= {The | A |} <activity term> {<qualifying clause> |} must not <activity verb> {<noun phrase> {<prepositional phrase> |}|} while <conditional clause>. |
P42. | <information retention rule statement> ::= {The | A |} <activity term> {<qualifying clause> |} must not be deleted <time period definition> {{if | unless} <conditional clause> |}. |
P43. | {<activity obligation rule statement> | <object status rule statement>} ::= {Each | The | A |} <activity term> {<qualifying clause> |} must <activity verb> {<noun phrase> {<prepositional phrase> |}|} {<time period definition> |} {{if | unless} <conditional clause> |}. |
P44. | <process decision rule statement> ::= {Each | The | A |} {<activity term> | <system component term>} {<qualifying clause> |} must <activity verb> {<noun phrase> {<prepositional phrase> |}|} {{if | unless} <conditional clause> |}. |
Note that these patterns (and the others that have been described in previous articles in this series) involve various syntactic components that are yet to be defined in detail:
- <qualifying clause>, e.g.,
- for a flight, of an order, of the train, of the aircraft, of each order
- of a service request that is made before 2pm
- of the transactions for a calendar month
- <noun phrase>, e.g.,
- a part, any bag, his or her seatbelt, the preferred customer discount
- each ticket that is expired
- <prepositional phrase>, e.g., to the price of each item in that order
- <conditional clause>, e.g., the customer who raised that order is a preferred customer
All of these syntactic components will be defined in a future article in this series.
To be continued...
The next article in this series will look at party rules.[13]
References
[1] The first of which is: Graham Witt, "A Practical Method of Developing Natural Language Rule Statements (Part 1)," Business Rules Journal, Vol. 10, No. 2 (Feb. 2009), URL: http://www.BRCommunity.com/a2009/b461.html
[2] Graham Witt, Writing Effective Business Rules. Morgan Kaufmann (2012).
[3] Semantics of Business Vocabulary and Business Rules (SBVR), v1.0. Object Management Group (Jan. 2008). Available at http://www.omg.org/spec/SBVR/1.0/
The font and colour conventions used in these rule statements reflect those in the SBVR, namely underlined teal for terms, italic blue for verb phrases, orange for keywords, and double-underlined green for names and other literals. Note that, for clarity, these conventions are not used for rule statements that exhibit one or more non-recommended characteristics.
[4] A rule that constrains the data included in a transaction (a form or message) or a persistent data set (e.g., a database record).
[5] A rule that constrains the operation of one or more business processes or other activities.
[6] A rule that restricts the situations in which the activity can occur, i.e. prohibit that activity in certain situations.
[7] Note that this rule statement is an alternative way of expressing the same rule as RS189 and RS190 in Part 15.
[8] Of course, it could be argued that check-in is optional, in that if one fails to check in, one doesn't fly! However, any operative rule can be violated, often with the result that the process is aborted.
[9] Note that this rule statement is an alternative way of expressing the same rule as RS185 in Part 15.
[10] The use of a verb phrase such that the subject of that verb phrase is the person or thing on which the action is performed (the patient or target), as in "a boarding pass is presented by the passenger".
[11] A noun formed from or otherwise corresponding to a verb phrase.
[12] The use of a verb phrase such that the subject of that verb phrase is the person or thing performing the action signified by that verb phrase (i.e., the actor or agent), as in "the passenger presents a boarding pass".
[13] A rule that makes a distinction between different parties or the roles they play.
*/ ?>
|