Rule Builder > Managing Decision Tables > Executing Decision Tables > Chaining Decision Tables in a Ruleflow Using a Parameter

You can chain decision tables in a ruleflow by using a parameter added to the rule package. You need to start with a repository that contains functions and two decision tables. Then perform the following procedure:

  1. Add a parameter to the rule package. In the Project Explorer right-click the package and click Add Parameter on the shortcut menu.
  2. Name the parameter and set its type in the Property Sheet.
  3. You now edit the decision tables to incorporate the parameter as a chaining mechanism.
  4. In the decision table that will come first in the ruleflow, add an action column and edit the new column to set the Action to set <attribute> to <value>, as shown in Figure 12.77.

  5. images/use02.png
  6. Figure 12.77    Selecting `set <attribute> to <value>'
  7. In the <select an attribute> list, select the parameter you just created and click OK. The action will now set your parameter to the value you enter in the action cell.
  8. In the decision table that will come second in the ruleflow, add a condition column and edit the new column to set the Test condition to the new parameter and the operator to the desired operator that you want to use for the test (see Figure 12.78). Click OK.

  9. images/use03.png
  10. Figure 12.78    Selecting a Test Condition
  11. Finally, to chain the decision tables, create two rule tasks and deploy the decision tables in them.
    Tip
    The decision table setting the parameter should come first in the ruleflow, then the decision table featuring the condition on the parameter. Make sure each rule task uses the sequential algorithm and literal ordering.

See Also

Ruleset Parameters | Creating a Ruleflow


Customer Support | Copyright © 1987-2004 ILOG S.A. All rights reserved. Legal terms. PREVIOUS   NEXT