Decision Table form
|
Complete the Table tab to record the conditions to be tested in each row. In the rightmost Return column of each row, enter the result of this decision table rule when all the conditions in the row are true.
If the Redirect this Rule box on the Results tab is selected, this circumstance-qualified rule is redirected and the Table tab is not used. PROJ-229
Follow these steps to complete this tab:
Understanding the grid controls and buttons
Use these controls to change the size and structure of the table. Select any cell in the matrix to enable the controls.
Button |
Function |
Insert a new row before (above) the selected row. |
|
Insert a new row after (below) the selected row. |
|
Delete the selected row or rows. Focus moves to the row above.R-19341 |
|
Insert a new column before (to the left of) the selected column. |
|
Insert a new column after (to the right of) the selected column. |
|
Delete the selected column or columns. Focus moves to the column at its left.R-19341 |
|
Insert OR'd tests in one cell, to the left of the current test. B-19721 slow SR-2592 |
|
Insert OR'd tests in one cell, to the right of the current test. |
|
Insert a column in the Actions area to the right of the Results column, to set a property to the results of an expression when this row is the source of the decision table results. C-1675 |
|
Hide (or show) the properties columns in the Actions area. |
As in Microsoft Excel, you can drag a row or column grid line to shrink or expand its width or height.
Place the mouse on the top bar and drag to select multiple rows (or on the left bar to select and drag multiple columns) and then click the button (or button) to delete them all. When multiple rows (or columns) are selected, you can drag them up or down (left or right) together.
You can test the completeness or consistency of the decision table or export the table to Microsoft Excel.
Button |
Function |
Show
Conflicts
|
Marks with a warning icon () any rows of the table that are unreachable, and any rows that are completely blank. B-20320 For example, if two rows are identical, the second row will never evaluate to true and so is unreachable. BUG-787 If the Evaluate All Rows checkbox (on the Results tab) is selected, all rows are considered reachable. BUG-3063 Click any warning icon on a row to highlight with an orange background () the other rows that cause that row to be unreachable. The selected row is highlighted with a yellow background (). C-1121 NORIR In this example, the third row is unreachable and the value 3 is never returned. The first two rows together make the third row unreachable. A decision table that contains no such unreachable rows is called consistent. (The presence of unreachable rows does not prevent you from saving the rule.) Conflicts are reported as warning messages when you save the form and when you run the Application Preflight check for the application. Conflicts do not prevent the rule from validating or executing, but may indicate that the rule does not implement the intended decision. C-2286 |
Show Completeness |
Automatically adds suggested rows of the decision table rule that cover additional cases and reduce or eliminate the situations that fall through to the Otherwise Return expression. Suggested additions appear with a light green background (). They are only suggestions; you can alter or eliminate them. C-1121 |
Edit in
Excel
|
Edit the contents of the table using Microsoft Excel. B-19173 By design, you can't use Excel sort capabilities, because the order of rows in the decision table is significant. SR-3303 |
Each column except the Return column corresponds to a property reference or expression. Click a cell in the top row to label a column in the matrix.
Complete the pop-up dialog box to select a property or expression and a label.
These values are available for headings in the Conditions area.
Field |
Description |
Property |
Enter the condition you want to evaluate. This may be a
Click the magnifying glass icon () to start the Expression Builder. See About the Expression Builder. AKGOK Clinic 2/24/06 (You can enter complex expressions and use the Expression Builder only when the Allowed to Build Expressions? checkbox is selected on the Results tab.) You can add or modify a property value by dragging an instance from the Application Explorer and dropping it on the Property field. The rule name populates the Label field. Click the icon to select the rule. v6.1, proj179 GRP-2259 |
Label |
Enter a text label for the column. |
Use Range |
Select to require two values defining an open or closed range for the column. Choose the < or <= operator to test the starting value. Choose the > or >= operator to test then ending value. C-2478 5.2 In each cell, enter two values to set the limits of the range. |
Use operator |
Select an operator for the comparisons in this column. The default is equality (=). If you choose an operator other than =, the operator appears in the column head. An operator in a cell can override the operator you select here, for that cell. C-2478 5.2 |
These fields are available for column headings in both the Conditions and Actions areas:
Field |
Description |
Allow Changing values in cells |
Select a radio button to control who can change the contents of cells in this column. C-2478 5.2 The column background changes to gray for users who cannot update it.
This field is not available to users who are delegated this rule. |
Click Save . The label you entered appears at the top of the column.
To create another column to the right of a column, click the Insert Column After button (). To create another column to the left of a column, click the Insert Column Before button ().
Optionally, to identify one or more property to be set as it the decision tree row is processed, click the button. Complete the top cell to the right of the Return column with a label and property name. C-1675
Enter comparison values in each cell in each row.
You can use Windows drag-and-drop operations to reorder one or more columns. Reordering columns does not affect the outcome of the decision table, but may cause evaluation of some rows to end earlier, or later, when a condition in a cell is not met.
You can also use Windows drag-and-drop operations to reorder one or more rows. As rows are evaluated in order from the top until one is found where all cell conditions are true, reordering rows may affect the outcome of the decision table.
Hold the CTRL
key down and drag to copy (rather than
move) a row or column. BUG-2763 BUG-2764
If you prefer, you can edit the table in Microsoft Excel. Click Edit In Excel . Close the Excel window to save your results in this tab.
As a best practice, list the more likely outcomes in rows above the rows for outcomes that are less likely.
Field |
Description |
if / else if / |
Define in each row the conditions to be met for each cell. At runtime, the row evaluates to true only if the conditions in each cell evaluate to true. The label when in this column indicates that at runtime, decision table processing evaluates all rows, rather than stopping at the first row for which all conditions are met. The label appears when you click the Evaluate All Rows option on the Results tab. |
(Column) |
Enter a match value for the property identified at the top of each column. Alternatively, enter a comparison operator and an expression, such as a literal value or property reference. The comparison operators are <, >, =, <=, >=, and !=. If you don't enter an operator, the system uses the operator or operators associated with the column head. (The equality operator = does not display in the column head.) SR-7326 B-25586 For columns that require a range, enter both a starting value and an ending value. If you enter literal constants for these values, check that the starting value is less than or equal to the ending value. You can use SmartPrompt to access a Local List of values (if any) defined on the Table Type fields on the General tab of the property rule. Do not type a period. For example, if the property Size has values such as XS, S, M, L, XL, and XXL defined, click the Down Arrow key to access this list. To the right of the comparison operator, enter a literal constant, a property reference, or an expression. For guided assistance in entering expressions, click the magnifying glass icon () to start the Expression Builder. (You can enter complex expressions and use the Expression Builder only when the Allowed to Build Expressions? checkbox is selected on the Results tab.) To add more rows, click the Insert Row After button () to the left of the row. Another row appears, titled else if. As a best practice to simplify the form, delete any blank rows. They cause a warning when you save the Decision Table form. Blank rows have no effect on the results of the rule. B-20345 |
These fields follow the comparison cells in the row and the separator.
Field |
Description |
Return |
Enter
the result to be returned to the application when all the
comparisons in the row are true. Enter a constant, a property
reference, an expression, or the keyword
You can enter values in this column only when the Allowed to Return Values checkbox is selected on the Results tab. |
() |
Optional. If you used the button to create a column to the right of the Return column, enter a constant value, property reference or expression here, or use one of three shorthand forms: PROJ-355
For guided assistance in entering expressions, click the magnifying glass icon () to start the Expression Builder. (You can enter complex expressions and use the Expression Builder only when the Allowed to Build Expressions? checkbox on the Results tab is selected.) The system evaluates this expression when the decision rule returns based on the current row. The results of the evaluation are set as the new value of the property identified in this column. C-1675 |
Optional. Complete the bottom row of the table to determine the result of the decision table when no higher row evaluates to true.
Field |
Description |
Otherwise | |
Call base decision |
This checkbox appears only for decision table rules that are circumstance-qualified. When selected, causes Process Commander to execute the base (or non-qualified) decision tree rule of the same name, RuleSet, and Version to obtain the result. |
Actions |
Enter the result to be returned to the application if none of the rows in the table evaluate to true. Enter a constant, a property
reference, or the keyword You can enter values in this field only when the Allowed to Return Values checkbox is selected on the Results tab. If this field is blank and no return value is computed from higher rows, the system returns a null value. NORIR 10/31/05 During backward chaining computations for Declare Expression rules, if the Otherwise value can be computed, but properties needed for other parts of the form are not defined, the Otherwise value is returned as the value of the decision table rule. (In Process Commander releases before 5.3, this condition produced an exception that ended processing.) B-21294 BUG-1155 |
Using date properties as columns
A preferred way to include dates in a decision table is to use a property rather than a constant. Instead of a constant date, enter something like .myDateProperty as the value in the date column. However, to enter a fixed date as a condition in your table, use one of the following formats:
Application users need not match this format when they enter a date into a work object form.
Entering an OR condition in a single cell
C-1786 Often two rows of a decision table are identical except for the contents in one input column (to the right of the Return column). SR-7326 B-25586 BUG-671
To reduce the number of rows in the table, you can place two or more comparisons into a single cell.
The Insert Or Before () and Insert Or After
()
buttons both apply the Java operator || for inclusive OR. The
comparisons are presented stacked in a column within a single cell.
The order is not significant, as the cell evaluates to true if any of
the comparisons are true.