Business Rule Beans allow you to create three different types of rules:
Base rules are rules are not classifier or classified rules. Base rules generally perform a specific business computation like calculating a discount or determining whether an order qualifies for free shipping.
The following are some common examples of base rules. Note that these are just examples. A base rule is free to perform any function that makes sense to the business.
Classifier rules can be used to determine the ways in which variables are classified by a business. Classifier rules are triggered by the TriggerPoint.triggerClassifier method.
A classifier rule is used to compute a classification for a particular business situation. The classification returned is required to be of type string. For example, bank customers may be classified into gold, silver, and bronze categories, based on their spending history or the amount of money they have in their account. Classifier rules are a key component used in a situational trigger point. For more information on this type of rule, refer to Situational trigger point.
Classified rules are very similar to base rules. The difference is that a classified rule has an associated classification that specifies the business situation to which it applies. For example, say you have the situation, discussed previously, in which customers are classified into gold, silver, and bronze categories, and you want to calculate a discount for each customer. You would most likely have three versions of the calculateDiscount rule: one for the gold classification, one for the silver classification, and one for the bronze classification.
Classified rules are used in conjunction with classifier rules when using a situational trigger point. See Situational trigger point for more information.