Rule Builder > Managing Decision Trees > Action Node Editing Operations > Editing an Action Node

To edit an action node, do one of the following:

The Action Set Editor opens as shown in Figure 13.28.

images/dtree_editaction.png

Figure 13.28    The Action Set Editor

This section has the following subsections:

Editing the Action Node Rule Title

The Rule Title text field allows you to specify a title for the action node and the rule it represents.

To edit the action node title:

  1. Click in the Rule Title field to activate it and then type in the title for this action node.
  2. The title is added to the node in the Decision Tree Editor, see Discount 10% in Figure 13.29.

  3. images/dtree_actiontitle.png
  4. Figure 13.29    Editing the Action Node Rule Title

If you do not define a title for an action node, it is given the title Rule 0 - n by default.

Editing the Action Node Expression

To become a valid rule, an action node must be assigned a set of action expressions. You can add one or more action expressions to an action node to create an action set.

Each action expression must be a Void method of the BOM, applied to a variable bound to a decision node, or to a new variable. The action expression can also be the assignment of an attribute of an object bound to a variable. An example is shown in Figure 13.30.

images/actionsetattrib.png

Figure 13.30    Selecting an Action Expression

You can build this action expression using the Action Set Editor and the BAL rule language, according to the BOM assigned to the current library.

To edit the action expression:

  1. Click the blue arrow icon images/blueArrow_icon.gif to make the field <select an action> appear in the Action Set Editor.
  2. Click <select an action> to display a drop-down menu and select one of the options, see Figure 13.31.

  3. images/dtree_newvariable.png
  4. Figure 13.31    Building an Action Expression
  5. Type in a value for the <enter a value> field and select the relevant <shoppingCart>.
  6. Build your rule by adding other action expressions in the same way until your action set is complete. An example is shown in Figure 13.32.

  7. images/dtree_actionset.png
  8. Figure 13.32    Example Action Set

Values of the corresponding decision nodes provide arguments for the selected action member to constitute an action.

For example, in the expression:

  • Apply discount: <enter a value> to <shoppingCart>
  • if the first value is 10, the full action will be:

  • if ... then Apply 10 discount to the shoppingCart
  • Depending on the Binding Mode of the class involved in the action expression, 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 Action Set Editor.

    If the variable is omitted, the Action Set Editor displays an error in red when validating the dialog box, see Figure 13.16.

    See Also

    Business Object Models | 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