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

You can chain decision trees 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 trees. 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. Now edit the decision trees to incorporate the parameter as a chaining mechanism.
  3. In the decision tree that will come first in the ruleflow: add an action node and edit the new node to set the action to set <attribute> to <value>, as shown in Figure 13.59.

  4. images/dtree_setattvalue.png
  5. Figure 13.59    Selecting `set <attribute> to <value>'
  6. 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.
  7. In the decision tree that will come second in the ruleflow: add a decision node and edit the new decision test to set the decision test to the new parameter and the operator to the operator that you want to use for the test (see Figure 13.60); then click OK.

  8. images/dtree_paramis.png
  9. Figure 13.60    Selecting a Decision Test
  10. Finally, to chain the decision trees, create two rule tasks and deploy the decision trees in them.
    Tip
    The decision tree setting the parameter should come first in the ruleflow, then the decision tree featuring the decision test on the parameter. Make sure each rule task uses the properties sequential algorithm and literal ordering.

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