|
|
The following are examples of rules that apply to a single business object and often only to a single row of data.
Table: | INVENTORY |
Description: | Quantity on order cannot be less than minimum-order quantity. |
Rule Logic: | MIN_QUANTITY_ORDER <= QUANTITY_ONORDER |
Table: | INVENTORY_HISTORY |
Description: | If number of orders placed is zero, the quantity ordered must also be zero. |
Rule Logic: | IF NUM_ORDERS_PLACED = 0 THEN QUANTITY_ORDERED = 0 |
Table: | SUPPLIERS |
Description: | The date a supplier is established must not be later than the last order placed with this supplier. Both dates must not be later than the current date. |
Rule Logic: | DATE_ESTABLISHED <= DATE_LAST_ORDER AND |
Note: | Essentially three rules are put here. One is an object rule and the other two are column rules. It is often easier to put all date-ordering rules into one rule for ease of review and efficiency of execution. |
Table: | SOURCE |
Description: | The order mode must match the ordering information. If the mode is M for mail, an order address must be provided. If the mode is I for Internet, an e-mail address must be provided. If the mode is E for EDI transactions, the EDI communication address must be provided. |
Rule Logic: | IF ORDER_MODE = ‘M’ THEN ORDER_ADDRESS != BLANK OR |
Note: | This rule does not require that columns that do not apply to the mode be blank. Tolerating them is certainly not a quality problem, and keeping them around in case a mode is changed in the future may be helpful. It is up to the business analyst to determine whether they should be blanked out if not appropriate to the mode. |
Table: | PURCHASE_ORDER |
Description: | Various fields have affinities to states. Date shipped and quantity shipped require a status code of shipped, received, or returned. Date received, quantity received, received by, and received by text require a status code of received or returned. Date and quantity returned require a status code of returned. Reason code requires a status code of returned or cancelled. |
Rule Logic: | IF STATUS = ‘P’ THEN (DATE_SHIPPED = NULL AND |
Note: | This is an example of process rules that govern when data is placed in an object. |
|
|