Photo
Advanced Enterprise Middleware

 

Business Rule Beans (BRBeans)

The Business Rule Beans (BRBeans) project, formerly Accessible Business Rules (ABR), is concerned with effectively managing the inevitable changes that occur over time. The first generation of BRBeans has been focused on assisting designers, developers, and administrators deploy middleware solutions enabled for variability.

Introduction

Rules that effect an enterprise come in many different varieties and from many different sources. Some are imposed by others, such as government laws and regulations. Others are self-imposed, such as industry business practices or policies adopted by an organization. Many of these rules become embedded in the software applications upon which an enterprise relies to carry out its daily activities. However, embedded rules are problematic: they may be difficult to locate and identify; they may be inconsistently applied or implemented; they may be costly to change, especially when included in distributed applications; and so forth.

Overview

The BRBeans process begins by extending business modeling and analysis to include the identification of rules and points of variability. Where benefits can be realized (reuse, reduced maintenance, consistency, visibility) the rule is externalized and the point of variability is translated into a trigger point, which is a mechanism that facilitates dynamic attachment of the externalized rules.

Next, during the development phase, the necessary BRBeans artifacts are constructed by programmers. Trigger points are placed into applications at the locations that were designated during the modeling and analysis phase. New rule implementations containing actual generic business logic are constructed if they don't already exist in the code library. In parallel, during the administrative phase, parameterized business rules with associated contexts and implementations are built by administrators (non-programmers) according to the modeling and analysis specifications. Subsequent to the development and test phases, the applications can be deployed and managed by administrators who can alter program behavior by manipulating the externalized rules without the need for programming skills.

Framework

The BRBeans framework facilitates the externalization of changeable business logic by providing of the following components:
  1. application program interfaces (API's) for use by clients interested in using business rules;
  2. an API for use by administration applications interested in managing business rules;
  3. an Enterprise Java Beans (EJB) based runtime for serving business rules;
  4. a starter set library of generic rules (e.g., GreaterThan, IsNull, Range) written in Java;
  5. an interactive Rule Management Application to create, retrieve, update, and delete rules;
  6. a batch eXtended Markup Language (XML) based rule loader/unloader to make rules portable.

Patterns

The BRBeans framework is capable of handling a collection of common patterns often encountered when producing rule-enabled applications. The BRBeans framework API's provide the necessary tooling so that application designers/developers can readily incorporate the common patterns described below.

The fixed business context represents a static business situation which does not depend on runtime data. An example of this is an algorithm that is known by name, such as "ComputeTaxLiability".

The situational business context represents a dynamic business situation that has some dependency on runtime data. The correct rules to apply depend partly or entirely on the current situation. An example of this is the classification of a customer as bronze, silver, or gold depending on some runtime criteria (perhaps amount of money invested or number of miles flown) in order to determine what kind of promotional material to offer (dinner for two, a new TV, or a trip around the world).

The jurisdictional business context represents a special case of the situational business context. A jurisdiction determines whether or not it has the authority to assert rules in a given situation and which rules to assert. An example of this is the determination of a price to be charged to a consumer for a product, where the federal authority mandates a minimum charge and the enterprise adds an additional computed amount to arrive at the final answer.

The structural business context represents a circumstance that is somehow structurally based. Some types are constraints (precondition, postcondition, cardinality), measurement conversions, field edits, assertions, etc. An example of this is a precondition on a particular method of a particular class.

Runtime

The BRBeans externalized entity is comprised of a pair of objects: a BRBeans:Rule and a BRBeans:RuleImplementor. The BRBeans:Rule is the link between the trigger point embedded in the application and the external business rules. It is a persistent object that contains both the business context that applies and a link to the BRBeans:RuleImplementor. The BRBeans:Rule persistent object contains the parameterized information necessary to customize the BRBeans:RuleImplementor for the particular invocation. The BRBeans:RuleImplementor is a transient object that contains the generic business logic.

At runtime, when a trigger point is encountered the BRBeans:RuleHome is contacted to produce the exact collection of rules (BRBeans:Rule/BRBeans:RuleImplementor pairs) that need to be fired. The trigger point then fires each BRBeans:Rule and manages the aggregation of results.

Caching techniques are utilized to minimize the need to contact remote locations, the need to re-calculate collections of rules, and the need to re-load and re-initialize already loaded rules.

Administration

The BRBeans Framework provides an administration application that enables one to manipulate BRBeans:Rules using a Graphical User Interface (GUI). It is implemented as a Java application. The administration application can be used by an administrator to construct new rules (BRBeans:Rule/BRBeans:RuleImplementor pairs), find existing rules, expire existing rules, clone existing rules and modify the clone, schedule new rules to become effective, and more.

These kinds of activities can be employed to modify the behavior of rule-enabled applications without the need for programming skills. For example, if the definition of "senior citizen" changes from persons at least 65 years old to persons at least 60 years old, then the administrator would (1) find the appropriate rule, (2) expire it as of the date the new definition takes effect, (3) clone that existing rule, (4) modify a single persistent attribute of the clone from "65" to "60", and (5) schedule the clone to become effective on the appropriate date.

Customized BRBeans:Rule administration applications can be readily developed utilizing the BRBeans programming interface.

Availability

The BRBeans Framework has been / will be shipped as part of IBM WebSphere Enterprise Edition as follows:
Version Implementation Category
1.3 Managed Objects Sample
2.0 Managed Objects Early Test Function
3.0 Managed Objects Early Test Function
3.5 Enterprise Java Beans Early Test Function
4.0 Enterprise Java Beans Fully Supported
5.x Enterprise Java Beans Fully Supported

Portions of the general purpose BRBeans Framework (e.g., the runtime) together with custom crafted components (e.g., a rule editor) form an integral part of the IBM WebSphere Personalization software solution.

More

More details on BRBeans (formerly ABR) can be found in the paper "Extending Business Objects With Business Rules" located on the Advanced Enterprise Middleware Publications page.

BRBeans documentation can be found at the WebSphere InfoCenter page by:

  1. In Version 5 Information Centers - online
    • Product: WebSphere Application Server, Network Deployment,...
    • clicking Version: 5.0.x
  2. In Contents clicking WebSphere Application Server Enterprise
  3. On right hand side under Highlights clicking Business Rule Beans

Use these instructions for running BRBeans under WSADIE 5.0.

See also the WebSphere Application Server Enterprise Edition 4.0 Redbook.

Future

We are currently exploring several extensions to the BRBeans framework, such as: incorporation of the externalization of rules within the modeling and analysis process (e.g., augmenting the Unified Modeling Language (UML) to include trigger points; coupling with modeling and design tools, etc.); utilizing natural language and/or data mining search and generation techniques to enrich our query and description capabilities; the study of trigger point patterns and rule templates specific to a given industry/application; integrating with different user interfaces mechanisms (e.g., spread sheets, speech); integrating with inferencing engines.

Team

The BRBeans project is a collaborative effort by: Lou Degenaro and Isabelle Rouvellou (Hawthorne); Elizabeth Baartman, Liz Dettman, Jon Peterson, and Scott Waldner (Rochester).

Past Contributors

Dave Ehnebuske, Bob Goodman, and Barbara McKee (Austin); Yanina Dubrovskaya and Arun Iyengar [caching] (Hawthorne); Karri Carlson, Shawn Lauzon, Charlie Redlin, and Dianne Richards (Rochester); Kevin Rasmus (Country Companies Insurance).

Contact

For further information on BRBeans, send your e-mail to Lou Degenaro: degenaro@us.ibm.com.