Rule Builder > Managing Decision Trees > Test Link Editing Operations > Editing a Test Link

Once a test link is created, you can edit the value of it. The appropriate value editor is available within the tree or in an automatic pop-up window to input the value. Examples of date and domain values are shown in Figure 13.19.

images/dtree_setdate.png

images/dtree_setcategory.png

Figure 13.19    Test Link Editing

You can also use the Test Link Editor, opened through the shortcut menu, to edit the value as well as its associated predicate.

Figure 13.20 shows an example of how to set date values using the Is Between predicate.
Note
The actual operators displayed in the Operator panel of the Test Link Editor depend on the condition defined for the decision node.

images/tle1.png

Figure 13.20    Test Link Editor -- Setting Date Values

Figure 13.21 shows an example of how to set interval values. Note the change in the predicates displayed.

images/tle4.png

Figure 13.21    Test Link Editor -- Setting Interval Values

This section has the following subsections:

Editing the Operator of a Test Link

By default, a test link is associated with the predicate that has been chosen for the decision node. If the predicate chosen for the decision node does not appear in the Operator panel of the Test Link Editor, it is displayed as the default, see Figure 13.22. You can either use the default value or change to one of the predicates in the list.

images/tle5.png

Figure 13.22    Test Link Editor With Default Predicate Displayed

You can override any predicate for a selected test link by choosing another operator as follows:

When the test link operator is different from the one associated with the other test links in the branch, this predicate is displayed in the tree using a predefined format.
Important
In the Test Link Editor, you can only enter values in the Value text box using <enter a value>. Other choices available in BAL such as field values cannot be used.

In Figure 13.24, the last test link of Customer Age overrides the decision node predicate (isBetween is used for all but one of the test links and isGreaterThan is used for the last one). The operator is displayed as >70 and has replaced the interval 71, 80.

images/dtree_changeoperator.png

Figure 13.24    Changing the Operator of a Test Link

The decision test generated is:

  • If the age of customer is greater than 70
  • Whereas the decision test for the previous test link is:

  • If the age of customer is between than 61 and 70
  • Important
    Being able to override the predefined operator on a test link is only available for primitive types, such as Number, String, Date, and Boolean. For any other type you can only select the Equals, Does Not equal, Is In, or Is Not In operator for the selected test link.

    Editing Test Link Values

    Selecting the Is In operator on a test link allows you to enter a list of values instead of a single value. This ability allows you to group choices to apply a common set of actions.

    For example, if you want to handle Silver and Gold in the same way, you could perform the following steps:

    1. Assign the IsIn operator to the Silver test link in the Test Link Editor dialog box.
    2. Then add Gold to the list, see Figure 13.25.

    3. images/tle3.png
    4. Figure 13.25    Changing the Operator to IsIn

    The branch in Figure 13.26 shows the collection Silver; Gold with Platinum remaining as an individual test link.

    images/dtree_pigrouping.png

    Figure 13.26    Grouping Test Link Values

    See Also

    Decision Table / Tree Predicates | Decision Table / Tree Supported Data Types


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