|
Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 | Design for Rules You are now ready to design the rule implementation. The steps you follow to design for rules in the rules capability vary depending on many factors, such as its basic characteristics (data-change-oriented or service-oriented), functionality limitations, rule classification limitations, and performance considerations, for example. There are three steps that are common among most rules products and service- oriented rules products. These include a step for defining the terms used by the rules. In data-change-oriented products, you usually accomplish this by defining a data model (actually, a physical database model) to the product. In service-oriented rules products, you usually accomplish this by defining an object model (actually, an object model with attributes only, not methods). Another common step is translating the rules you have (in natural language form or in template form) and translating them to the rule language or rule interface supported by the product. A third common step is determining if there are rules that you cannot express in the product and for which you need to develop traditional, procedural, or nonrule code. And a fourth common step is the testing of the rules. Differences between these two categories of products include variations in how you organize rules within the rules product and how and if you influence the sequence of rule execution. Another difference is, due to the close tie between the database and a data-change-oriented rules product, you may alter your initial database definition to meet product requirements. It is beyond the scope of this book to show a complete design solution for all relevant products. Please visit the companion Web site for complete coverage of case study solutions by various vendors and products. Step 12.6: Design for Rules in a Commercially Available Data-Change-Oriented Rules Product When working with a data-change-oriented rules capability, rule design and implementation tends to be data-centric. It involves first specifying the tables and columns to the rules product, usually in data or object model form. Then you express rules about the data that the rules capability is to watch out for. Concurrently, you create user interface screens or Web pages through which to test the rules and to design more detailed interfaces. You usually express the rules in declarative form, although you may need to translate your rules in templates into the product's own language. For example, if you followed the approach in this book, you have captured most of your rules as If/Then statements. If your product does not support this syntax, you will need to rethink the expression of the rules for implementation. Rule design for a data-change-oriented rules environment may also involve altering the table specifications to accommodate rule-processing restrictions. The design effort may also involve denormalizing data in the database for functionality and performance reasons. Below is a generic set of design and implementation steps that are common among most commercially available data-change-oriented rules products. This chapter describes the steps, while Chapter 13 provides product-specific details. Step 12.6.1: Organize Your Rules for the Rules Product Most products provide a mechanism for organizing your rules. Usually, this means defining a subject or project area by which to group them for administrative purposes. Typically, this grouping does not imply sequence of rule execution. It is merely for your management purposes. Step 12.6.2: Determine if You Need to Add Additional Data Constructs stock option trading | forex trader | making moneyresearch stock | currency converter | forex trading training stock market news | stock trading | forex trading courses stock trade | forex exchange | option trading stock option trading | money converter | investing stocks If you followed the approach in this book, you have all required terms in your rule- enriched logical data model. Otherwise you may need to add some of them now. For example, if you have rules that reference aggregate values (such as employee average salary), you may need to define to the rules product an entity or object class to contain this term or attribute so your rule within the product can reference it. Confer with your database designer as to whether this term needs to be persistently stored in the database for your product to function correctly. |