Types of business rules

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.

Derivation rules
These rules use an algorithm to return a value. These rules return any type of value that makes sense in the business context in which they are used. For example, a derivation rule can calculate a discount or compute the total price of an order.
Constraint rules
These rules confirm that an operation has met all of its obligations and that a particular constraint or edit has been met. For instance, a constraint rule can check that a value entered by an external user is within legal bounds. Business Rule Beans (BRBeans) provide a special return type, com.ibm.websphere.brb.ConstraintReturn, which can be returned by a constraint-type rule. A ConstraintReturn object contains a boolean value so that if it is false, it can contain information that can be used to produce an external message explaining what constraint was not met.
Invariant rules
These rules ensure that multiple changes made by an operation are properly related to one another.
Script rules
These rules implement "micro-workflow" or electronic performance support. They are small, variable pieces of a business process that provide assistance to end-users to get the most from the application.

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.


Related concepts
Overview of Business Rule Beans
Situational trigger point



Searchable topic ID:   cbrb_rtypes
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/brb/concepts/cbrb_rtypes.html

Library | Support | Terms of Use | Feedback