Business rules are procedures, decisions, and parameters that govern business operations. They are always under control of the business. (This is true even when imposed by external regulations. The business controls some aspects of how those rules are followed.)
Business rules analysis involves defining, validating, and organizing business rules. Business rules can describe the actions taken, the decisions made, and the criteria that govern those decisions.
Like requirements, business rules must be expressed in a succinct, declarative, unambiguous way, that allows them to be understood, implemented, and executed in a way that can readily be judged. They should be expressed using appropriate terms of art (see discussion of a glossary here). Rules should be expressed separately from how they will be enforced. For example, a rule might state that for all orders reaching sixty days from fulfillment without having been paid, will result in a message being sent to the account holder. That describes the rule, but doesn’t say anything about the mechanisms that might be instituted to complete the various actions needed to follow it. There are many ways to express business rules, and multiple rules can be chained together.
In the discussion we had in our weekly Tampa IIBA study group, we identified some of the following bases for establishing business rules. We identified only a small handful when we defined them as generally as show. Can you think of any more that would be equally general?
- Follow defined procedures: The actions taken in the organization can be defined by business rules. In terms of the flowchart shown above, think about the overall shape of the process, the nature of processes and decisions in each box, and the nature of the entities that move within and through the process.
- Sort based on immediate characteristic: Different actions may be taken based on defined but unchanging qualities (e.g., location, customer type, product, job function, etc.) of every entity. Such rules tend to be written as If A do X, Else If B do Y, Else do Z.
- Sort based on changing characteristic: Different actions may be taken based on defined but changing qualities (often based on time) of every entity. These items are often held someplace, and are periodically checked to see if they’ve changed in a way that requires action, e.g., If Less Than 30 days do nothing, but when 30 days have passed change the status to overdue and send a message to the customer. Another example might involve quantities, e.g., If shelf quantity goes below three, Then order five more items.
- Changeable parameters governing the above: In programming it’s usually a good idea to create named variables and constants for defined parameters rather than hard-coding them. This way, if the value is used in many places, it only needs to be changed once. Moreover, the name of the parameter gives insight into its potential meaning. For a business rule, and organization might change the time at which a payment is considered to be overdue from 30 days to 45 days. This might affect many decisions or only one, but it is defined and managed in a clear, modular way.
For those of you nerds (and I ask your forgiveness if my Javascript is a bit rusty), here is how the rules for the upper right corner of the business process might be expressed in code. This captures the actions taken, the decisions made, and the parameters governing the decisions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
var paramOne; var paramTwo; var paramThree; var listOfEntities[5000]; var numberOfEntitiesInB; function Subprocess_B3(increment) { //ages items in storage, there are many ways to do this //would typically be calculated as current data minus arrival date //then logical flags would be set for (let i = 0; i < numberOfEntitiesInB; i+=increment) { listOfEntities[i].Consectetur++; } } function Subprocess_B2() { for (let i = 0; i < numberOfEntitiesInB; i++) { if (listOfEntities[i] == paramTwo) { listOfEntities[i].Go(); } } } function Subprocess_B1() { for (let i = 0; i < numberOfEntitiesInB; i++) { if (listOfEntities[i].Consectetur > paramOne) { sendToExitB1(listOfEntities[i]); removeFromList(listOfEntities[i]); } } } //Once every paramThree days Subprocess_B3(paramThree); SubProcess_B2(); SubProcess_B1(); |