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
Procedure
- On the server that you are integrating with ILOG JRules,
configure the external rule registry:
- Do one of the following, depending on whether you are
on a development machine or an instance:
- Open the following properties file in an editor:
WCDE_installdir/workspace/WC/properties/ExternalRuleEngineConfiguration.properties
- Copy the following properties file to a temporary
directory:
WC_eardir/properties/ExternalRuleEngineConfiguration.properties
- Open the following properties file in an editor:
- Change the
Enabled
value fromfalse
totrue
. - 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
- Save and close the file.
- Do one of the following, depending on whether you are
on a development machine or an instance:
- Configure the proxy for the WebSphere ILOG JRules rule
engine:
- Do one of the following, depending on whether you are
on a development machine or an instance:
- Open the following properties file in an editor:
WCDE_installdir/workspace/WC/properties/ILogJRulesConfiguration.properties
- Copy the following properties file to a temporary
directory:
WC_eardir/properties/ILogJRulesConfiguration.properties
- Open the following properties file in an editor:
- Update the property values as required. Properties are:
- session.type
- The rule session type. Use either
POJO
orEJB3
. - 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.
- 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 totrue
. - 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 totrue
. Encrypt the password using the wcs_encrypt utility before adding the password to the properties file.
- 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 totrue
. - 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 totrue
. Encrypt the password using the wcs_encrypt utility before adding the password to the properties file.
- Save and close the file.
- Do one of the following, depending on whether you are
on a development machine or an instance:
- Do one of the following, depending on whether you are on
a development machine or an instance:
- Restart 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:
- Open the Administration Console and select Site on the Administration Console Site/Store Selection page.
- Click Configuration > Registry.
- Select ExternalRuleEngineRegistry, and then click Update.
- Deploy the two updated properties files to the WebSphere Commerce application.
- Restart the WebSphere Commerce server so that
your configuration changes take effect.