WebSphere Commerce DeveloperWebSphere Commerce Enterprise

Configuring the registry and proxy for the WebSphere ILOG JRules rule engine

To complete the integration of WebSphere ILOG JRules with WebSphere Commerce, you must modify two properties files.

About this task

Certain configuration parameters relate to JMX, which is the Java Management Extension. The console for the Rule Execution Server uses the JMX API as its underlying architecture. The JMX API is packaged and installed with the Rule Execution Server.

Procedure

  1. On the server that you are integrating with ILOG JRules, configure the external rule registry:
    1. Do one of the following, depending on whether you are on a development machine or an instance:
      • WebSphere Commerce DeveloperOpen the following properties file in an editor:

        WCDE_installdir/workspace/WC/properties/ExternalRuleEngineConfiguration.properties

      • WebSphere Commerce EnterpriseCopy the following properties file to a temporary directory:

        WC_eardir/properties/ExternalRuleEngineConfiguration.properties

    2. Change the Enabled value from false to true.
    3. Remove the # character from the following three lines so that they are no longer commented out:
      #RuleEngineIdentifier=ILogJRules
      #RuleEngineProxyClass=com.ibm.commerce.ruleengine.external.jrules.ILogJRulesProxy
      #RuleEngineConfigurationFile=ILogJRulesConfiguration.properties

      The properties in the file should now look like this:

      Enabled=true
      RuleEngineIdentifier=ILogJRules
      RuleEngineProxyClass=com.ibm.commerce.ruleengine.external.jrules.ILogJRulesProxy
      RuleEngineConfigurationFile=ILogJRulesConfiguration.properties
    4. Save and close the file.
  2. Configure the proxy for the WebSphere ILOG JRules rule engine:
    1. Do one of the following, depending on whether you are on a development machine or an instance:
      • WebSphere Commerce DeveloperOpen the following properties file in an editor:

        WCDE_installdir/workspace/WC/properties/ILogJRulesConfiguration.properties

      • WebSphere Commerce EnterpriseCopy the following properties file to a temporary directory:

        WC_eardir/properties/ILogJRulesConfiguration.properties

    2. Update the property values as required.
      Properties are:
      session.type
      The rule session type. Use either POJO or EJB3.
      res.jmx.host
      The host name of the Rule Execution Server.
      res.jmx.port
      The port number to connect to the Rule Execution Server.
      res.jmx.protocol
      The protocol to use for connectivity to the Rule Execution Server. SOAP is the only valid value.
      datasource.jndi.name
      The JNDI name of the data source to access the Rule Execution Server database. This property is required when data source persistence is used.
      rulelist.expiration.time
      The expiration time for a rule list in seconds. After the time expires, any requests to get the list will trigger retrieving the rule list from the rule repository.
    3. If you enabled WAS global security, configure the following properties (remove the # character from the beginning of each line):
      res.jmx.security.enabled
      Optional: Set to true to enable security on the Rule Execution Server. This is required only if you enabled WAS global security.
      res.jmx.user
      Optional: The administrator ID of the Rule Execution Server. This parameter is required only when you set the res.jmx.security.enabled property to true.
      res.jmx.password
      Optional: The administrator password for the Rule Execution Server. This parameter is required only when you set the res.jmx.security.enabled property to true. Encrypt the password using the wcs_encrypt utility before adding the password to the properties file.
    4. If this WebSphere Commerce server is a staging server, configure properties required for connectivity to the production Rule Execution Server (remove the # character from the beginning of each line):
      propagation.res.jmx.host
      The host name of the production Rule Execution Server.
      propagation.res.jmx.port
      The port number to connect to the production Rule Execution Server.
      propagation.res.jmx.protocol
      The protocol to use for connectivity to the production Rule Execution Server. SOAP is the only valid value.
      propagation.res.jmx.security.enabled
      Optional: Set to true to enable security on the production Rule Execution Server. This is required only if you enabled WAS global security.
      propagation.res.jmx.user
      Optional: The administrator ID of the production Rule Execution Server. This parameter is required only when you set the res.jmx.security.enabled property to true.
      propagation.res.jmx.password
      Optional: The administrator password for the production Rule Execution Server. This parameter is required only when you set the res.jmx.security.enabled property to true. Encrypt the password using the wcs_encrypt utility before adding the password to the properties file.
    5. Save and close the file.
  3. Do one of the following, depending on whether you are on a development machine or an instance:
    • WebSphere Commerce DeveloperRestart the WebSphere Commerce server so that your configuration changes take effect.
      Tip: If you change the configuration files and want your changes to take effect without restarting the WebSphere Commerce server, you can follow these steps to refresh the external rule engine registry:
      1. Open the Administration Console and select Site on the Administration Console Site/Store Selection page.
      2. Click Configuration > Registry.
      3. Select ExternalRuleEngineRegistry, and then click Update.
    • WebSphere Commerce EnterpriseDeploy the two updated properties files to the WebSphere Commerce application.

What to do next

Import sample rule projects into ILOG JRules Rule Studio.