|
|||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
CombiningStrategy | The job of the CombiningStrategy is to take the results of the rules which were
fired by the FiringStrategy and to combine them to form a reasonable
result to the TriggerPoint caller. |
FilteringStrategy | The job of the FilteringStrategy is to take the list of rules which were
found by the FindingStrategy and
to filter out those rules which should not be fired. |
FindingStrategy | The job of the FindingStrategy is to locate and return those rules which meet the search criteria which is given. |
FiringStrategy | The firing strategy implements the function which takes the rules which were found
by the FindingStrategy , (possibly modified by the FilteringStrategy ),
and fires each of the rules in order. |
RuleImplementor | The Java interface for rule implementations. |
Class Summary | |
---|---|
ConstraintReturn | ConstraintReturn is used to represent the result of firing one constraint type rule. |
RuleExporter | Deprecated. IBM Internal Use Only. |
RuleImporter | Deprecated. IBM Internal Use Only. |
TriggerPoint | The primary interface for triggering rules. |
Exception Summary | |
---|---|
BusinessRuleBeansException | The base exception for all problems encountered by BRBeans. |
ConstraintViolationException | An exception that can be thrown when one or more constraint type rules in a trigger point fail. |
MultipleRulesFoundException | Thrown when a finding strategy finds more than one rule and only was expected. |
NoRulesFoundException | Thrown when a finding strategy does not find any rules and at least 1 rule was expected. |
UnexpectedRulesFoundException | Thrown from a finding strategy when more rules than expected were found. |
Provides the main classes and interfaces to interact with BRBeans rules.
The purpose of the Business Rule Beans (BRBeans) framework is to extend Websphere so that it supports the development, deployment, and management of business applications that externalize their business rules. In the BRBeans context, "business rules" are objects that encapsulate the highly time and context-dependent behavior needed to ensure that work done with the application conforms to current business practices. BRBeans makes it fast and easy to set up the necessary business rules and to change them as the desired business practices change over time.
In BRBeans, a "rule" is actually two objects which work together to provide extensible function to customers. The first object is an EJB which contains the bulk of the data needed to execute a rule; this includes the rule name, start and end dates, initialization parameters, description information, dependent rule names, and other miscellaneous information. It also includes the name of the rule implementor, which is the second portion of a rule. The rule implementor is a Java class which implements the RuleImplementor interface and provides the algorithm that the rule uses. It is the rule implementor which does the real work of the rule, taking as input data from the rule EJB and runtime information provided by the application firing the rule. Rules always exist in a "rule folder". Rule folders are used to organize rules which have different purposes.
There are two types of rules: classifier and non-classifier. Non-classifier rules are the normal kind of rule, which is triggered with the TriggerPoint.trigger() method. Classifier rules are, on the surface, just like non-classifier rules that always return a String, and are only triggered with the TriggerPoint.triggerClassifier() method. But classifier rules have another purpose, and that is to provide a "classification", which is the String that is returned. It is important to note the difference between a non-classifier with a classification and a non-classifier without a classification, as the former is never found via the TriggerPoint.trigger() method.When the TriggerPoint.triggerSituational() method is called, the first of two actions performed is to find and fire a classifier rule, which returns its classification. The second action is to take that classification and find a non-classifier rule which has a classification matching that returned from the first rule. If no such rule exists, a rule with no classification is instead returned.
Rules are generally created by a programmer, who may use the BRBeans Rule Management Application to create a simple rule which wraps a rule implementor. It typically has a name, a description, and possibly a classification. Next an analyst would use the same Rule Management Application to provide additional information, such as start and end date, init parameters, and a business intent.
While the analyst determines values for the business rules, the programmer needs to write the application which uses the rules. All that is needed to create an application that triggers the correct rules is knowledge of the rule name and the folder in which it is located. Since this has already been created, the programmer does not need to know the values which are contained inside the rule, which is one of the advantages of BRBeans.
Applications that trigger BRBeans rules use the classes and interfaces of this package, com.ibm.websphere.abr. The main class is TriggerPoint, which is used to find and fire rules. Strategy objects are used to change how a TriggerPoint functions. The most common strategies to use are FilteringStrategy and CombiningStrategy. The tools RuleImporter and RuleExporter are provided to import and export rules, using an XML format.
|
|||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |