ODM Server policy (ODMServer)

Use an ODM Server policy with an ODMRules node or JavaCompute node to configure access to either a remote Operational Decision Manager (ODM) rule execution server or a locally-stored ruleset archive.

You can use ODMRules or JavaCompute nodes in a message flow to execute a set of business rules. The policy is used to configure access to the rulesets that are to be run by the nodes; either to the IBM Operational Decision Manager Rule Execution Server that hosts the rulesets or to a locally-stored ruleset archive that has been downloaded previously from the ODM Rule Execution Server.

To attach an ODM Server policy to an ODMRules node, set the Policy property of the node to the name of the policy, in the form {policyProjectName}:policyName. To attach an ODM Server policy to a JavaCompute node, execute the getODMServer method in the JavaCompute node's onSetup method, supplying the name of the policy in the form {policyProjectName}:policyName. You must deploy the policy before the associated message flow is started.

If you redeploy an ODM Server policy, all message flows that are using the policy will be stopped and restarted.

For more information, see Using Operational Decision Manager (ODM) business rules.

Table 1. Properties of the ODM Server policy
Property Property name in .policyxml file Description of properties
Rule Execution Server URL resServerURL This property specifies either the URL of the remote Operational Decision Manager Rule Execution Server or the location of the downloaded ruleset archive on the local file system. For example:
http://localhost:9080/res/
or
file://Users/admin/ACE/rulesets/ruleApp_Sale_1.0.jar
or
file://c:\Users\Administrator\Downloads\ruleApp_Sale_1.0.jar
ODM JARs URL odmJarsURL This property specifies a URL that defines the file location (directory path) of the IBM Operational Decision Manager Execution Server Client JAR files to be used by the policy. For example: C:\IBM\ODM\executionserver\lib
Security identity (DSN) securityIdentity This property specifies a security identity containing the credentials to be used for accessing the Rule Execution Server. Credentials must be created with type odm and mqsisetdbparms identities must have the prefix odm::
Ruleset refresh mode rulesetRefreshMode This property specifies the method to be used for updating rulesets, and can be set to one of the following values:
  • manual (default)

    In manual ruleset refresh mode, rulesets are not updated automatically, but you can update manually by using the administration REST API.

  • polling

    In polling ruleset refresh mode, the rule execution server (RES) is polled for updates at the frequency that is specified by the Ruleset refresh polling interval property.

This property applies to rulesets that are loaded from the rule execution server (RES) and to rulesets that have been downloaded to the local file system.

Ruleset refresh polling interval rulesetRefreshPollingInterval This property specifies how often (in seconds) the rule execution server (RES) is polled for updates to rulesets. This property can be set to any positive integer value, and the default is 600 seconds (10 minutes).

This property applies to rulesets that are loaded from the rule execution server (RES) and to rulesets that have been downloaded to the local file system.

Ruleset refresh update strategy rulesetRefreshUpdateStrategy This property specifies how a ruleset update is applied, and can be set to one of the following values:
  • immediately (default)

    If this property is set to immediately, flows are paused immediately when a ruleset is updated, to wait for the new or updated ruleset to be compiled. Updates are then applied in sync across all ODM runtime engines.

  • whenReady

    If this property is set to whenReady, updated flows continue to run with the old version of the ruleset until the updated ruleset is compiled.

    If a ruleset is associated with multiple ODM runtime engines, which each have to compile the updated ruleset, the update might be applied to different flows at slightly different times.

This property applies to rulesets that are loaded from the rule execution server (RES) and to rulesets that have been downloaded to the local file system.

Ruleset load strategy rulesetLoadStrategy This property species when a ruleset is to be compiled for the first time, and can be set to the following values:
  • onFirstMessage (default)

    The referenced rulesets are loaded when the first messages tries to execute them, which can delay the first message.

  • onFlowStart

    The referenced rulesets are loaded when the flow starts, which can delay the startup of the flows.

This property applies to rulesets that are loaded from the rule execution server (RES) and to rulesets that have been downloaded to the local file system.

If you are using rulesets in a JavaCompute node, this property is relevant only if you call the MbODMRuleset with the getRuleset method during the onSetup method, because the onSetup method is called during the flow setup. If you call the MbODMRuleset with the getRuleset method during the evaluate method (when a message is being processed and calls the ruleset to be loaded), the compilation time occurs on the first message. For more information, see Executing ODM business rules by using a JavaCompute node.