Use the DecisionService node to create a set of business rules.
The following sections describe the DecisionService node:
A decision service is a collection of business rules that process a message. A DecisionService node implements those business rules to provide operations like routing, validation, and transformation. An example of a business rule for a bank is that a credit check is not required when an account is opened for an existing customer. These business rules are organized in a decision service file (.rules). When you deploy the BAR file that contains your decision service, the decision service is compiled into a rule set (.ruleset). You can store a decision service in an application, library, or integration project.
The DecisionService node is contained in the Business Decisions drawer of the message flow node palette, and is represented in the IBM Integration Toolkit by the following icon:
You can view information about samples only when you use the product documentation that is integrated with the IBM Integration Toolkit or the online product documentation. You can run samples only when you use the product documentation that is integrated with the IBM Integration Toolkit.
The DecisionService node terminals are described in the following table.
Terminal | Description |
---|---|
In | The input terminal that accepts a message for processing by the node. |
Out | The output terminal to which the original message can be routed when processing completes successfully. |
Failure | The output terminal to which the message is routed if a failure is detected during processing. |
When you put an instance of the DecisionService node into a message flow, you can configure it. For more information, see Configuring a message flow node. The properties of the node are displayed in the Properties view. All mandatory properties for which you must enter a value (those properties that do not have a default value defined) are marked with an asterisk.
If you double-click the DecisionService node, and it does not have an associated decision service file, you open the New Decision Service wizard. If the node does have an associated decision service file, double-clicking the node opens the file in the Decision Service editor, where you edit your rules.
The following tables describe the node properties. The column headed M indicates whether the property is mandatory (marked with an asterisk if you must enter a value when no default is defined). The column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the BAR file to deploy it).
Property | M | C | Default | Description |
---|---|---|---|---|
Node name | Yes | No | The node type, DecisionService | The name of the node. |
Short Description | No | No | A brief description of the node. | |
Long Description | No | No | Text that describes the purpose of the node in the message flow. |
Property | M | C | Default | Description |
---|---|---|---|---|
Decision Service Name | Yes | No | None | To select an existing decision service, click Browse,
then select the appropriate file from the available files. To create a decision service, double-click the node to open the New Decision Service wizard. When you complete the wizard, the Decision Service Name property is set to the name of the new decision service file. |
Ruleset | Yes | No | None | This property is populated automatically when
you select a decision service. A decision service that you create in IBM Integration Bus contains a single rule set. A decision service that is created from an imported rule application archive can contain multiple rule sets. In this case, you can select a rule set to view its parameters. |
Parameters | Yes | No | None | A decision service rule set can contain one
or more parameters. Most parameter values are read-only, except for
the Data location value, where you must enter an XPath expression.
The XPath expression specifies the location in the inbound message
of the data for each parameter; for example, $Root.
To set the data location, select a parameter, then click Edit.
For help, open the XPath Expression Builder by clicking Edit or
pressing Ctrl+Space. When you add data location XPath expressions,
avoid accessing parent and child nested fields in a message tree.
(A change that you make to a nested structure can be overwritten by
a change to the parent structure.) The direction of the parameters can be IN, OUT, or INOUT. For decision services that are created in the IBM Integration Toolkit, only INOUT parameters are supported. For decision services that are created by importing a rule application archive from IBM Operational Decision Manager, IN, OUT, and INOUT parameters are supported. The Verbalization column contains a natural language name (or alias) for the parameter; for example, "the customer". This value is used to refer to the parameter when you write a rule. If the decision service was created by importing a rule application archive, the verbalization value is not visible. If the parameters in the decision service file change, an error message is shown in the Problems view to indicate that the parameters on the node do not match the parameters in the decision service file. To correct this error, reselect the decision service file and the rule set on the node. |
Use DecisionServiceRepository configurable service | No | Yes | Cleared | If you are using rules that were created in IBM Operational
Decision Manager, you can retrieve those rules
at run time from an external repository. To connect to an external
repository, you must configure the DecisionServiceRepository configurable
service and select this property. If this check box is selected, the
node retrieves rules from the external repository. If the check box
is cleared, the node uses the local decision service. For more information, see Retrieving business rules at run time from an IBM Operational Decision Manager repository. |
Property | M | C | Default | Description |
---|---|---|---|---|
Events | No | No | None | Events that you have defined for the node are
displayed on this tab. By default, no monitoring events are defined
on any node in a message flow. Use Add, Edit,
and Delete to create, change or delete monitoring
events for the node; see Configuring monitoring event sources using monitoring properties for details. You can enable and disable events that are shown here by selecting or clearing the Enabled check box. |
Element name | Data type | Description |
---|---|---|
decisionService | String | The fully qualified name of the decision service that is referenced by the node. If the decision service is in an application or library, this fully qualified name is prefixed with the application or library name. |
ruleSet | String | The name of the rule set that is contained in the decision service. |
rulesMatched | Integer | The number of rules that are triggered (matched) by the messages that are processed by the decision service. |