Business Rule Beans are used to create and modify rules that keep pace with complex business practices. This enables your application's core behavior and user interface objects to remain intact and untouched, even as business practices change.
The Business Rule Beans (BRBeans) framework enables you to organize rules in folders. Folders provide a structure similar to the file system on your computer's hard drive. For example:
When naming rules and folders, adhere to the Java package naming convention. That is, name rules and folders based on the domain name of the organization for which the rules are developed. For example, ACME's isSeniorCitizen rule's fully qualified rule name ("full rule name"), might be com/acme/ageRules/isSeniorCitizen. In this example, the com/acme path is used by all of the rules developed by ACME and the ageRules folder is used to separate "age" rules from rules of other kinds. The root folder has no name; therefore, fully qualified path names never start with a forward slash ('/').
A fully qualified rule name consists of the following:
This fully qualified rule name is used by a trigger point to identify the rule to trigger. Trigger points are small pieces of code that interface with the Business Rule Beans trigger point framework to run business rules during application execution. See Placing a trigger point for more information.
By default, trigger points can only trigger rules that are currently in effect based on the current date and time when the trigger point is called. A business rule has a start date and an end date (see Rule attributes for more information) that together define the interval during which the rule is in effect (see Rule states for more information). This behavior can be overridden by specifying a date on the trigger point. This date is referred to as the "As Of Date". If no start date is specified, the rule is not valid and cannot be found by trigger points. Conversely, if no end date is specified, the rule never expires. Dates and times with a precision of one second can be assigned using the "Rule Management Application".
When there is more than one rule with the same fully qualified name, all of the rules with that name that are currently in effect are triggered and the results are combined using the combining strategy specified on the trigger point. See the CombiningStrategy method for more information.