WebSphere Commerce Enterprise

Overview of WebSphere ILOG JRules integration architecture for WebSphere Commerce pricing

WebSphere Commerce provides an integration architecture in which WebSphere ILOG JRules manages pricing rules and WebSphere Commerce uses these rules.

WebSphere Commerce interacts with two components of WebSphere ILOG JRules:
  • Rule Execution Server (RES):

    Rule Execution Server is the rule execution engine, which includes a managed deployment and monitoring environment. You deploy the Rule Execution Server to the WebSphere Application Server. During price rule authoring, Management Center retrieves the available rules from the Rule Execution Server.

  • Execution Unit (XU):

    The Execution Unit of the Rule Execution Server is a resource adapter that handles the low-level details of ruleset execution. When a price rule is used to calculate pricing on the storefront, the WebSphere Commerce price rule engine invokes the Execution Unit to execute the WebSphere ILOG JRules ruleset.

WebSphere ILOG JRules integration architecture

Code provided for integration

To support integration with the WebSphere ILOG JRules Rule Execution Server, WebSphere Commerce provides the following code:
  • Integration foundation code that installs when you run the enablement script.
  • Additional integration code snippets that allow you to configure communication between WebSphere Commerce and WebSphere ILOG JRules.
  • A set of sample rule projects.

Data model and data transfer

To create pricing rules in WebSphere ILOG JRules, you require a BOM (Business Object Model) that uses a natural-language vocabulary. When a WebSphere Commerce store uses a WebSphere ILOG JRules rule, the interface that provides the business information to WebSphere ILOG JRules is an XOM (Execution Object Model). WebSphere Commerce provides both the BOM and the XOM in the form of sample WebSphere ILOG JRules projects that you can import into the ILOG JRules Rule Studio. WebSphere Commerce BOM-to-XOM mappings and vocabulary definitions are also included. At runtime, the WebSphere Commerce price rule engine sends the predefined input parameters (XOM objects) to the WebSphere ILOG JRules Execution Unit, which executes the rules on the XOM objects and returns the result.

WebSphere ILOG JRules can store the rules, but does not store any other information. Therefore WebSphere ILOG JRules requires the interface (XOM) to WebSphere Commerce to provide all data required to execute the rules, such as:

  • Price lists
  • Product sets
  • Catalog and attribute information
  • Customer data
  • Store IDs (for extended site stores)

In WebSphere Commerce, this data is represented by existing Service Data Objects (SDOs). These SDOs are used as the XOM that WebSphere ILOG JRules requires.

The integration architecture is designed to optimize the amount of data being transferred between WebSphere Commerce and WebSphere ILOG JRules, which minimizes the performance impact. With the initial rule execution request, only key data is sent to WebSphere ILOG JRules. During rule execution, the WebSphere ILOG JRules rule engine fetches additional data on demand by calling WebSphere Commerce web services.

Rule session types

A rule session is a Java artifact used to execute rules in WebSphere ILOG JRules. When you integrate with WebSphere ILOG JRules, you can choose to configure one of the two types of rule sessions:
  • POJO rule session
  • EJB 3.0 rule session

Both the POJO rule session and the local EJB session are stateless. The POJO session type is recommended because it does not require the EJB container overload and offers better performance.