Rule Builder > Managing Decision Trees > Decision Node Editing Operations > Editing a Decision Node

To edit a decision node, do one of the following:

The Decision Node Editor opens as shown in Figure 13.11. The value in the Title field is augmented by one letter each time you add a new decision node.

images/dtree_testcriteditor.png

Figure 13.11    The Decision Node Editor

This section has the following subsections:

Editing the Decision Node Title

The Title text field allows you to specify a title for the decision node.

To edit the decision node title:

If the label property is defined for the first BOM element selected using the Rule Editor, it is used to assign a value to the Title field. This title can still be changed. Note that this assignment occurs only once when first selecting an expression on an empty decision node.

Editing the Decision Node Decision Test

To be valid, a decision node must be assigned a decision test. This decision test is made of an expression, for example, the age of customer1, and a predicate, for example, is between. A predicate is a BOM method, either predefined or user defined, that returns a Boolean value.

You can build the decision test with the Decision Node Editor, using the parts of the BAL rule language that concern decision tests, according to the BOM assigned to the current library. An example is shown in Figure 13.13.

images/dtree_criterion.png

Figure 13.13    Selecting a Decision Node Decision Test Expression

Once an expression is selected, you can select a predicate according to the type of the expression. An example is shown in Figure 13.14.

images/dtree_predicate.png

Figure 13.14    Selecting a Decision Test Predicate

Together the expression and the selected predicate constitute a decision test.

For example, if the first test link is 0 - 10, the full decision test will be:

  • if the age of customer is between 0 and 10
  • Selecting Variables

    Depending on the Binding Mode of the class involved in the decision test, you may need to select an existing variable or create a new variable for the selected object. All variables declared in previous decision nodes and in preconditions are available in the Decision Node Editor.

    Selecting Predicates

    You can select a static predicate or a user-defined predicate. A user-defined predicate is a method that returns a Boolean value on a nonprimitive type.

    Errors

    If something is missing in the decision test (a variable, for instance), an error is displayed in the Decision Node Editor when validating the expression, as shown in Figure 13.16.

    images/dtree_emptyfield.png

    Figure 13.16    Decision Test Error

    See Also

    Decision Table / Tree Predicates | Decision Table / Tree Supported Data Types | Decision Tree Operations | Editing Preconditions | Editing the Operator of a Test Link


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