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


Writing rules

Configure parameters and write business rules in the Decision Service editor.

Before you begin

About this task

When you create a decision service in the IBM Integration Toolkit, it contains a list of the schema parameters that you selected with the wizard. You can configure those parameters, provide natural language aliases for them, and use the content assist tool to write business rules. In the Decision Service editor, use the Rule sequence tab to add rules and specify the order in which they are run. Use the Parameters tab to add, edit, and delete parameters. Use the Additional Info tab to specify the version of the decision service and to provide a description.

If your decision service is created from a rule application archive that was imported from IBM Operational Decision Manager, you cannot add, edit, or delete parameters. Nor can you see or edit the rules that are contained in the rule set. When you open an imported decision service in the Decision Service editor, you see only the Parameters and Additional Info tabs, and you cannot edit the information that is on these tabs.

The following steps describe how to configure parameters and write rules in a decision service that was created in the IBM Integration Toolkit.

Procedure

  1. Open the decision service file in the Decision Service editor.

    The decision service file (.rules) is available in the Application Development view, in a Decision Services folder under the application, library, or integration project.

  2. To customize the parameters that are available to the decision service, click the Parameters tab.

    The parameters that you selected in the wizard are listed in a table. A parameter is created for each schema type that you selected; for example, customer. A verbalization is also provided. The verbalization is a word or phrase in natural language that you can use as an alias for the parameter when you are writing rules. Initially, the verbalization is the same as the parameter name.

    For example, for the parameter customer, you might change the verbalization value to the customer so that it reads more naturally when included in a rule. You can customize a parameter in the following ways:
    • To edit a value, click the table cell and edit the value in the cell.
    • To add parameters, click Add parameters (Icon to add another parameter to the table), select the appropriate parameters from the available schema, then click OK.
    • To delete a parameter, select the relevant parameter, then click Delete parameter (Icon to delete a parameter).
  3. To write rules by using your chosen parameters, click the Rule sequence tab. Use the vocabulary that you created in the previous step to write your rules.

    Initially, one empty rule is provided for you to populate. A business rule typically consists of definitions, conditions, and actions. Use content assist to help construct your rules. To access content assist, press Ctrl+Space to display a list of available options. The options that you see are based on the schema parameters that you selected.

  4. To add another rule, click Add Rule.
    When you have multiple rules, you can manipulate them in the following ways:
    • To save space in the editor, and view a high-level list of rules, you can collapse individual rules.
    • Rules are processed in the order in which they are listed in the decision service. You can reorder rules by clicking the Move up or Move down icon (Icon to move a rule upIcon to move a rule down) next to the relevant rule.
    • To delete a rule, click the Delete icon (Icon to delete a rule) next to the relevant rule.
  5. When your rules are complete, save the decision service.

What to do next

To use the business rules in your decision service to process a message, create a message flow by following the instructions in Processing messages with a decision service.


bc23812_.htm | Last updated 2015-03-27 19:27:48