Completing the Table tab

To record the conditions to be tested in each row, complete the Table tab. When all the conditions in the row are true, in the rightmost Return column of each row, enter the result of this decision table.

If the Redirect this Rule check box on the Results tab is selected, this circumstance-qualified rule is redirected and the Table tab is not used.

When the decision table contains more than 500 cells, the system does not automatically display the matrix on the Table tab when you open the rule form. You can download the table in .xlxs format, make your changes, and import the updated file.

Basics

To complete this tab, perform the following steps:

  1. Select and label properties or expressions (in the top of the matrix) first. These become column headings of a matrix, a two-dimensional table.
  2. Complete rows with comparisons, actions, and results. The order of rows is significant; at run time rows are evaluated from the top down.
  3. In the Otherwise row, enter a result to be returned if no rows evaluate to true.

Understanding the grid controls and buttons

Use these controls to change the size and structure of the table. To enable the controls, select any cell in the matrix.

Button Function
Insert a new row above the selected row.
Insert a new row below the selected row.
Delete the selected row or rows. Focus moves to the row above.
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.
Insert OR conditions in one cell, to the left of the current test.
Insert OR conditions in one cell, to the right of the current test.
Delete the selected OR condition.
To set a property to the results of an expression when this row is the source of the decision table results, insert a column in the Actions area to the right of the Results column.

If properties are configured and hidden, click to show the properties columns in the Actions area.

Hide the properties columns in the Actions area.

You can drag a row or column gridline to shrink or expand its width or height.

Place the pointer 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 depending on whether you selected rows or columns, to delete them all. When multiple rows (or columns) are selected, you can drag them up or down (left or right) together.

Other buttons

You can test the completeness or consistency of the decision table or export the table to .xlxs format.

Button Function
Select values Option is enabled when focus is on a cell of the decision table and the column has a defined property. Click Select values to select one or more values for the property. The list displays values that were entered for the property in a case. To insert a row for each selected value into the selected decision table cell, select the desired values and click OK.
Show Conflicts Marks any rows of the table that are unreachable and any rows that are completely blank with a Warning icon. For example, if two rows are identical, the second row never evaluates to true and is unreachable.
Note: If the Evaluate All Rows check box (on the Results tab) is selected, all rows are considered reachable.

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 pale yellow background.

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 use the Guardrails landing page for the application.

Conflicts do not prevent the rule from being validated or executed, but can indicate that the rule does not implement the intended decision.

Show Completeness Displays on the Table tab when the matrix of values is displayed. Automatically adds suggested rows of the decision table that cover additional cases and reduce or eliminate the situations that fall through to the Otherwise Return expression. These rows are only suggestions; you can alter or eliminate them.

When a table has more than 500 cells, the matrix is not automatically displayed on the Table tab. To display this button for such a table, display the matrix of values by clicking Load Table in Rule Form.

Import After you export a decision table, you can make changes in the .xlxs file and import the updated file. The decision table rule form is updated with the changes you made.

You must import the same file that you exported. You can change the name of the exported file and import the renamed file. However, you cannot import a different file from the one you exported.

Export Exports the decision table in .xlxs format. After you make your changes and save this file, you can import it with your changes.

You can modify OR conditions in rows in the exported file, but you cannot add them. You can add OR conditions only in the decision table rule form.

The Otherwise row is locked in the exported file. You cannot delete this row, and you cannot insert rows when you select this column.

The Return column is locked in the exported file. You cannot delete this column, and you cannot insert columns when you select this column.

Completing the heading row

Each column, except for the Return column, corresponds to a property reference or expression. To label a column in the matrix, click a cell in the top row.

  • Headings in the Conditions columns identify properties that are inputs to the decision table.
  • Headings in the Actions column identify the Results value (if present) for a row and the properties to set for when that row is the outcome of the decision table evaluation.

To select a property or expression and a label, complete the pop-up dialog box.

Settings

The following values are available for headings in the Conditions area.

Field Description
Property Enter the condition that you want to evaluate. The condition can be a single-value property, a property reference to a single value, a linked property reference, or a more complex expression. Use the SmartPrompt to see a list of the properties available in the Applies To class of this decision table (and in its parent classes).

You also can use the <current-value> keyword to substitute a cell value into the header for the evaluation, for example:

@String.contains(<current-value>,.pyCusLevel)

To start the Expression Builder click the Open expression builder icon. You can enter complex expressions and use the Expression Builder only when the Allowed to Build Expressions? check box is selected on the Results tab.

Note: You can add or modify a property value by dragging an instance from the Application Explorer to the Property field. The rule name populates the Label field. To select the rule, click the Dot icon.
Label Enter a text label for the column.
Use Range Select to require two values that define an open or closed range for the column. To test the starting valuem choose the less than operator (<) or the less than or equal to operator (<=). To test then ending value, choose the greater than operator (>) or the greater than or equal to operator (>=). To set the limits of the range, in each cell, enter two values.
Use operator Select an operator for the comparisons in this column. The default is equality (=). If you choose an operator other than =, the operator is displayed in the column head. An operator in a cell can override the operator you select here, for that cell.

Security

The following 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. For users who cannot update a cell, the column background changes to gray.
  • Everyone – Anyone who can edit the table can change the contents of cells.
  • No one – No one (including you) can change the contents of cells.
  • Privilege – Any user who holds the selected privilege can change the contents of cells. Select a privilege in the Applies To class of this rule or in an ancestor class.

This field is not available to users who are delegated this rule.

After you click Save, the label that you entered is displayed 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 properties to be set as 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.

Completing the body rows

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 could 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 could affect the outcome of the decision table.

Press the CTRL key and drag to copy (instead of move) a row or column.

As a best practice, list the more likely outcomes in rows above the rows for outcomes that are less likely.

Conditions

Field Description
if / else if / Define in each row the conditions to be met for each cell. At run time, the row evaluates to true only if the conditions in each cell evaluate to true.

The label when in this column indicates that at run time, decision table processing evaluates all rows, rather than stopping at the first row for which all conditions are met. The label is displayed when you click Evaluate All Rows on the Results tab.

(Column) Enter a match value for the property that is identified at the top of each column.
Note: To select from a list of values that are available for the selected property, click Select values.
Alternatively, enter a comparison operator and an expression, such as a literal value, property reference, or linked property reference. The comparison operators are <, >, =, <=, >=, and !=. If you don't enter an operator, the system uses the operator or operators that are associated with the column head. The equality operator = is not displayed in the column head.

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) that are defined on the Table Type fields on the General tab of the property. Do not enter a period. For example, if the property Size has values such as XS, S, M, L, XL, and XXL defined, to access this list, press the Down Arrow key.

To the right of the comparison operator, enter a literal constant, a property reference, or an expression. For guided assistance in entering expressions, start the Expression Builder by clicking the Expression Builder icon. You can enter complex expressions and use the Expression Builder only when the Allowed to Build Expressions? check box is selected on the Results tab.

To add more rows, click the Insert Row After button ( ) to the left of the row. Another row is displayed, titled "else if".

As a best practice, to simplify the form, delete any blank rows. Blank rows cause a warning when you save the Decision Table form. and have no effect on the results of the rule.

Actions

The following fields follow the comparison cells in the row and the right arrow 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 Call followed by a space and the name of another decision table.

You can enter values in this column only when the Allowed to Return Values check box is selected on the Results tab.

()

Optional. If you used the Set property values 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:

  • To cause the system to add 1 to the current value of the property, enter a +=1 in the cell
  • To add or subtract a constant value to from the current value of the property, enter += or -= followed by a numeric constant.
  • To append a constant value to the current value of the property (assumed to have a Type of Text or Identifier ), enter -= and a text constant.
  • Enter /= for division, *= for multiplication, or %= for the remainder function.

For guided assistance in entering expressions, start the Expression Builder by clicking the Expression Builder icon. You can enter complex expressions and use the Expression Builder only when the Allowed to Build Expressions? check box 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.

Completing the Otherwise row

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 check box displays only for decision tables that are circumstance rules. When selected, the base (or non-qualified) decision tree of the same name, ruleset, and version is executed to obtain the result.
Actions If none of the rows in the table evaluate to true, enter the result to be returned to the application.

Enter a constant, a property reference, or the keyword Call followed by a space and the name of another decision table. If results are restricted to those values listed on the Results tab, select from the choices presented.

You can enter values in this field only when the Allowed to Return Values check box 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.

Note: During backward chaining computations for Declare Expression rules, if the Otherwise value can be computed, but properties that are needed for the other parts of the form are not defined, the Otherwise value is returned as the value of the decision table

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 text such as .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:

  • yyyymmdd
  • mm/dd/yy

Application users do not need to match this format when they enter a date on a user form.

Entering an OR condition in a single cell

Often, two rows of a decision table are identical except for the contents in one input column (to the right of the Return column).

To reduce the number of rows in the table, you can place two or more comparisons in 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, because the cell evaluates to true if any of the comparisons are true.