Use cases are an important part of the requirements picture, but by themselves they are not enough. Use cases capture the interactions between users and the system, but they cannot portray all the subtleties of how a business is run. For this, we need business rules . A list of business rules is not the same thing as a list of requirements. Business rules are the written and unwritten rules that dictate how a company or agency conducts its business. Requirements relate to a specific application being considered or developed. In our methodology, we use a combination of use cases and business rules. Use cases cover a great many of the requirements by specifying interactions between actors and an application. However, these interactions are governed by the business rules that set the tone and environment in which the application operates. Some businesses create lists of business rules for their businesses even though they may not be building any new computer applications. It is simply important to them to document how their business runs. According to Ellen Gottesdiener (2002) author and consultant, there are five categories of business rules: -
Structural facts ” Facts or conditions that must be true. Example: The first customer contact is always with a salesperson. -
Action restricting ” Prohibiting one or more actions based on a condition. Example: Do not accept a check from a customer who does not have an acceptable credit history. -
Action triggering ” Instigating an action when one or more conditions become true. Example: Send the shipment as soon as the pick items (items selected from inventory) have been collected. -
Inferences ” Drawing a conclusion when one or more conditions become true. Example: Members who fly more than 100,000 miles in one calendar year become Elite members . -
Calculations ” Calculating one value given a set of other values. Example: The sales amount is the total retail value of the line items but does not include state or federal tax. Business rules must be atomic : Each business rule should be stated at the finest level of granularity possible. Methods of atomizing tend to be more art than science. The best way to get a feel for business rules is to see lots of examples (see Table 3.3). We've provided some examples from our experiences and our imagination and have categorized them in several ways: Your business rules catalog may look significantly different, depending on the type of data you record and cross-reference. Table 3.3. We-Rent-All Equipment Rentals Co. Business Rules Catalog Sample No. | Rule Definition | Type of Rule | Static/Dynamic | Source | 001 | Cash, personal check, and credit card are accepted for rental payment. | Action restricting | Dynamic | Management policy | 002 | Customers who rent driving equipment must possess a U.S. driver's license. | Action restricting | Static | Management policy | 003 | Customers who rent driving equipment must provide proof of insurance for the rental. | Action restricting | Static | Management policy | 004 | Rentals must be returned by the next day at the same time as the conclusion of the rental transaction, unless otherwise specified at the time of rental or in a requested extension. | Action restricting | Static | Management policy | 005 | If a rental item is not available, substitute using the substitution part chart. | Action triggering | Static | Management policy | 006 | Customers can make reservations up to six months in advance. | Action restricting | Dynamic; advance limit may change | Management policy | 007 | Rental items will be serviced according to the part service chart. | Action triggering | Static | Management policy | 008 | If a rental item that was reserved is not available to the customer on the day of the rental for any reason, the customer service representative will arrange for the customer to rent it from a competitor at our cost. | Action triggering | Dynamic; customer service level may change | Management policy | 009 | If customers are renting firearms, a background check must be initiated and a 30-day waiting period is required. | Action triggering | Dynamic; law may change | Federal law | 010 | A customer may return an item only if it has not yet been taken out of the store. | Structural facts | Static | Management policy | NOTE: It is easy to slip into the trap of creating a list of business rules that is actually a list of requirements. Remember that business rules always relate to how a company operates; they do not relate to the requirements of a specific application. A requirement is usually phrased, "The system shall," whereas a business rule states, "The business works like this." |