Rule Builder > Managing Decision Tables > Condition Column Editing Operations > Editing a Condition Column |
Editing a Condition Column |
PREVIOUS NEXT |
Double-clicking on the column header or using the Edit Condition Column menu item opens the Condition Column Editor, shown in Figure 12.11.
This section has the following subsections:
The Title text field allows you to specify a title for the column.
If the label
property is defined on the first BOM element selected using the Rule Editor, it is used to assign a value to the column title. This title can still be changed. Note that this assignment occurs only once when first selecting an expression on an empty column.
If the predicate used for this column takes more than one argument, a subpanel is displayed to enter a specific title for each subcolumn, corresponding to each argument of the predicate. The subpanel is shown in Figure 12.12.
To be valid, a condition column must be assigned a test expression. This test expression is made of a criterion (the age of customer1
, for example) and a predicate (is between
, for example). A predicate is a BOM method, either predefined or user defined, that returns a Boolean value.
You can build this test expression with the Rule Editor, using the parts of the BAL rule language that concern conditions, according to the BOM assigned to the current library. An example is shown in Figure 12.13.
Once a criterion is selected, you can select a predicate according to the type of the criterion. An example is shown in Figure 12.14.
Cells of the corresponding column provide arguments of the selected predicate to constitute a condition.
For example, if the first cell is 0 - 10
, the full condition will be:
if the age of customer is between 0 and 10
Depending on the Binding Mode of the class involved in the test expression, you may need to select an existing variable or create a new variable for the selected object. All variables declared in previous condition columns and in guard conditions are available in the Rule Editor.
You can also 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.
is
predicate is automatically set to compare the value of the member you selected and has a true
/false
value.
the age of customer is between <min> and <max>
, min
and max
will be two subcolumns of the Age
column.If something is missing in the test expression (a variable, for instance), an error is displayed in the Rule Editor when validating the expression, as shown in Figure 12.15.
Customer Support | Copyright © 1987-2004 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |