Completing the Decision tab (Advanced format)
Record the
if.. then..
logic of the decision tree in the three-column
array. These unlabeled columns are known as the comparison, action, and next value columns.
This help topic describes the advanced format of the Decision tab. If you encounter a Decision tab that does not contain an Evaluate Parameter or Evaluate property name see Completing the Decision tab (Basic format).
At run time, the system evaluates the if portion of the array, starting at the top row,
and continues until it reaches a
Return
statement. If the system processes
the entire tree but does not reach a
Return
statement, it returns the
Otherwise
value.
The Evaluate field at the topic identifies the Property value, if any, from the Configuration tab. When this field is blank, the value is taken from a parameter of the Property-Map-DecisionTree method. If this decision tree was created in basic mode or if the Allowed to Evaluate Properties? box on the Configuration tab is not selected, the Evaluate field does not appear
If the Redirect this Rule? check box on the Configuration tab is selected, this circumstance-qualified rule is redirected and tab is blank.
Understanding the branch structure
Each indent level supports comparisons against a single value, which are determined by context:
- The top (leftmost) level tests values against the value of the property that is identified on the Configuration tab, or a parameter value specified in the method that calls the decision tree. Comparisons are implicit: the property on the Configuration tab (or the parameter in the method) is not displayed on this tab.
- An indented level tests values against a property identified in the Evaluate field of the statement above the indented level.
- Each text box can contain a value, a comparison operator followed by a value, or a Boolean expression. The context is not relevant when a Boolean expression is evaluated.
Using the controls
To display controls for that row or field, click it.
Control | Action |
Collapse All | Click to hide subtree structures, or to hide specific subtree structures, click the minus sign. |
Expand All | Click to show all the subtree structures, or to display specific subtrees, click the plus sign. |
Open expression builder icon | Click to start the Expression Builder. This tool provides prompting and guidance when you create complex expressions involving functions. See Using the Expression Builder. |
Open icon | Click to review a property for a field that contains a property reference. |
Add row and Delete row buttons | Click to select a row. Then click the appropriate buttons to insert, append, or delete a row, respectively. |
Show Conflicts |
Click to analyze the consistency of the tree. This button displays a
Warning
icon next to any parts of the tree that are
unreachable. For example, a branch that extends below the two mutually contradictory
tests (if Width > 100) and (if Width < 100) is unreachable.
To highlight the parts of the tree that cause that branch to be unreachable, click the Warning icon. A decision tree that contains no unreachable parts is called consistent. The presence of unreachable portions of the tree does not prevent you from saving the rule. Comparisons involving two properties such as Width > Length are ignored in this analysis. Conflicts are also checked when you save the form, and when you use the Guardrails landing page for the application. Conflicts do not prevent the rule from being validated or executed, but could indicate that a rule does not work as intended. |
Show Completeness | Click to automatically add suggested portions of the decision tree that cover additional cases and reduce or eliminate the situations that fall through to the Otherwise Return expression. Suggested additions are displayed with a light green highlight and can refer to values that you must modify such as Result or DecisionTreeInputParam. These additions are only suggestions; you can alter or delete them. |
Modifying branches with drag and drop operations
To move a subtree structure, drag the small circle at its left.
To copy a subtree structure, drag while holding down the CTRL key, and drop it on the destination node.
Completing fields in a branch
Field | Description |
if / if value is |
Enter a value for the current context, or a comparison starting with one of
the six comparison operators: <, >, =, !=, >= or <=.
The value can
be an expression, such as a literal value between quotations or a
If the
Action
field is set to
|
(action) |
Select an action from the selection list. The action that you choose
determines which branch of this decision tree the system follows at run time when
the condition to its left is reached and evaluates to true. Select a keyword:
|
(next value) |
Identify a target based on the action value.
If you selected
Otherwise, enter a value or expression here that allows evaluation of the decision tree to continue. You can reference a property on any page, but be sure to enter any page you reference on the Pages & Classes tab. Enter a value that depends on the one of the following action value keywords:
This input field is not displayed when the action value is
To open a referenced decision tree, map value, or decision table, Click the
Open icon. (The
|
Click to access an optional array of properties and values. To hide this array, click . When the system evaluates the decision tree at run time and this row is the source of the results, the system also recomputes the value of the target properties that are identified in this array. Order is significant. This capability is not available for decision trees that are created in basic mode, or for decision trees when the Allowed to Set Take Action? check box on the Configuration tab is not selected. | |
Property | Optional. Identify a property reference corresponding to a value to be set. |
Value | Enter a value for that property — a constant, property reference, or expression. |
Completing the Otherwise branch
Field | Description |
Otherwise | |
Return |
To define the outcome of this decision tree when no result is determined by the
tree structure above, choose
Return
or
Take
Action . If this field is blank and no other return value is computed, the
system returns the null value.
|
Previous topic Creating decision trees Next topic Completing the Decision tab (Basic format)