IBM Integration Bus, Version 10.0.0.3 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS


Processing messages with a decision service

Use a decision service to process a message by creating a message flow that contains a DecisionService node.

Before you begin

  1. Create a decision service by following the instructions in Creating a decision service.
  2. Write business rules by following the instructions in Writing rules.

Alternatively, you can import a rule application archive from IBM® Operational Decision Manager by following the instructions in Importing a rule application archive file. The imported rule application archive is converted to a decision service (.rules file), which you can use to configure the DecisionService node.

About this task

A decision service contains a set of business rules and parameters. You can associate a decision service with a node in a message flow. You can then pass a message through that flow, and the business rules in your decision service are run against the message.

The order in which you create your decision service and your DecisionService node is flexible.
  • If you open the New Decision Service wizard from a DecisionService node, the decision service that you create is associated with that node. You can then use the node in a message flow to control operations like routing, validation, and transformation.
  • If you create the decision service from a menu option, or you import a rule application archive from IBM Operational Decision Manager, drag the decision service file onto a DecisionService node to configure the node. By creating the decision service first, you can then use it with multiple message flows. You can also associate an existing decision service with a node by using the Decision Service property of the node.

The following steps describe how to associate an existing decision service with a DecisionService node.

Procedure

  1. Create a message flow and add a DecisionService node by dragging it from the node palette onto the canvas. Select the node so that you can set its properties.
  2. On the Basic properties tab, click Browse, then navigate to the decision service that you want to use with this message flow.

    The Ruleset field is populated automatically. If the selected decision service was created in IBM Integration Bus, it contains a single rule set. If the decision service was created from an imported rule application archive, it can contain multiple rule sets. Select the appropriate rule set to see its parameters.

    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.

    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, and add an XPath expression in the Data location field for each updated parameter.

    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.

  3. Specify an XPath expression for each parameter. The XPath expression specifies the location in the inbound message of the data for each parameter; for example, $Root.
    1. Select a parameter and click Edit.
    2. In the Data location field, specify an XPath expression. For help, open the XPath Expression Builder by clicking Edit or pressing Ctrl+Space.
    3. Click OK.
  4. Optional: 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 the node property Use DecisionServiceRepository configurable service. For more information, see Retrieving business rules at run time from an IBM Operational Decision Manager repository.
  5. When you complete your changes, save the message flow.
  6. Before you deploy your decision service ensure that you have enabled decision services by using the mqsimode command.
    mqsimode -x DecisionServices
    For more information, see Developing business rules.
  7. Deploy the application, library, integration project, or flow that contains the decision service.

    For more information about deployment, see Deployment rules and guidelines.

What to do next

When you are using your decision service to process messages, you can monitor their behavior by using the activity log and resource statistics. For more information, see the following topics: For details of the data that you can capture for decision services, see the following reference topics:

bc23813_.htm | Last updated 2015-11-27 00:01:02