WebSphere Commerce EnterpriseWebSphere Commerce DeveloperIntroduced in Feature Pack 2

Importing sample rule projects into Rule Studio for pricing

WebSphere Commerce provides a set of ILOG JRules projects that you can import into Rule Studio. These rule projects contain the BOM and the XOM required to create rulesets for WebSphere Commerce pricing. BOM-to-XOM mappings and vocabulary definitions are also included. After importing these projects, you can begin using Rule Studio or Rule Team Server to create ILOG JRules rulesets.

About this task

The sample projects install on your machine when you install WebSphere Commerce Version 7 Feature Pack 2. The projects are:
Project Description
WC_SDO_App The RuleApp project in the sample.
WC-SDO-rules The Rule project in the sample.
WC-SDO-xom The Java project in the sample.

The JAR files you are asked to copy in this task contain java class files that are the XOM (Execution Object Model), which is the base implementation of the BOM (Business Object Model). Through the XOM, the rule engine can access java application objects and methods.

Procedure

  1. Navigate to the following directory containing the three sample projects:
    • WebSphere Commerce EnterpriseWC_installdir/components/foundation/samples/integration/JRules
    • WebSphere Commerce DeveloperWCDE_installdir/components/foundation/samples/integration/JRules
  2. Copy the three project folders (WC_SDO_App, WC-SDO-rules, and WC-SDO-xom) to the workspace in Rule Studio.
  3. Copy the following JAR files:
    List of files to copy Copy from here To here
    • Catalog-Client.jar
    • Catalog-DataObjects.jar
    • Enablement-BaseComponentsLogic.jar
    • Enablement-BusinessContextEngineLogic.jar
    • Enablement-RelationshipManagementData.jar
    • Enablement-RelationshipManagementLogic.jar
    • Enablement-SDO.jar
    • Foundation-Core.jar
    • Foundation-DataObjects.jar
    • Foundation-Extension.jar
    • Foundation-Server.jar
    • Infrastructure-Client.jar
    • Infrastructure-DataObjects.jar
    • Member-Client.jar
    • Member-DataObjects.jar
    • Member-MemberManagementData.jar
    • Member-MemberManagementLogic.jar
    • Price-Client.jar
    • Price-DataObjects.jar
    • WC_installdir/wc.ear/
    • WCDE_installdir/workspace/wc/
    WC-SDO-xom/lib

    Note that you must first create the /lib directory under the WC-SDO-xom directory in your Rule Studio workspace.

    • ILogJRulesLogic.jar
    • Price-Server-FEP.jar
    • WC_installdir/components/foundation/wc.ear
    • WCDE_installdir/components/foundation/wc.ear
    WC-SDO-xom/lib
    j2ee.jar WAS_installdir/lib WC-SDO-xom/lib
    org.eclipse.emf.commonj.sdo.jar WAS_installdir/plugins WC-SDO-xom/lib
  4. In Rule Studio, import the three projects (WC_SDO_App, WC-SDO-rules, and WC-SDO-xom) as existing projects.
  5. Explore the WC-SDO-rules project and create a simple ruleflow:
    1. Expand the rules folder to view some predefined ILOG JRules rules.
    2. Expand the bom folder to view some predefined BOM entries.
    3. Using the Ruleflow Editor, create a simple ruleflow using one of the sample rules, for example, SetPriceBy_PriceList.
    4. Save the ruleflow.
  6. Deploy the RuleApp to the Rule Execution Server:
    1. In the Rule Explorer view, expand the WC_SDO_App project, and then double-click archive.xml.
    2. Complete the deployment wizard.
      If the deployment is successful, a message displays in the console.

Results

Deploying the RuleApp to the Rule Execution Server makes the ruleset available in Management Center to create an external price rule.