
Silverston c08.tex V2 - 11/21/2008 3:12am Page 451
Level 3 Business Rules Pattern 451
RULE FACTOR). For example, you may need to influence the price based on
a factor of whether the party has been a customer for between 5 and 10 years.
For this factor, you can maintain a RULE FACTOR TYPE name instance of
‘‘Number of years that party has been a customer’’ with two values: one RULE
FACTOR VALUE factor value of ‘‘5’’ with a FACTOR VALUE TYPE name
of ‘‘Minimum number of years’’ and another RULE FACTOR VALUE factor
value of ‘‘10’’ with a FACTOR VALUE TYPE of ‘‘Maximum number of years. ’’
NOTE
In our experience, many generalized factors have a single value. Also,
some factors that have multiple values can be managed by specifying multiple
factor instances. For example, in the preceding example, we could have had two
RULE FACTOR TYPE(s) of ‘‘Minimum number of years as a customer’’ and
‘‘Maximum number of years as a customer.’’ Thus, an alternative data model
structure is to have a factor value attribute in the BUSINESS RULE FACTOR entity
(as we did in Figure 8-2), instead of maintaining the entity of RULE FACTOR VALUE.
However, the way that we have modeled generalized factors in Figure 8-5 provides
much more flexibility to accommodate many different scenarios.
NOTE
An issue with having generalized RULE FACTOR TYPE(s) and BUSINESS
RULE FACTOR(s) is that not all of the different RULE FACTOR TYPE(s) are applicable ...