Back Forward Decision Table form
Completing the Table tab

About Decision Table rules

 zzz Show all 

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.

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

 zzz Basics

Follow these steps to complete this tab:

  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. Next, complete rows with comparisons, actions, and results. The order of rows is significant; when it evaluates this rule at runtime, Process Commander evaluates rows from the top down.
  3. Finally, enter in the Otherwise row a result to be returned if no rows evaluate to true.

 zzz 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

zzz

Insert a new row before (above) the selected row.

zzz

Insert a new row after (below) the selected row.

zzz

Delete the selected row or rows. Focus moves to the row above.

zzz

Insert a new column before (to the left of) the selected column.

zzz

Insert a new column after (to the right of) the selected column.

zzz

Delete the selected column or columns. Focus moves to the column at its left.

zzz

Insert OR'd tests in one cell, to the left of the current test.

zzz

Insert OR'd tests in one cell, to the right of the current test.

zzz

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.

Hide properties

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 Delete button (or Delete button) 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 Microsoft Excel.

Button

Function

 Show Conflicts  

Marks with a warning icon (zzz) any rows of the table that are unreachable, and any rows that are completely blank. For example, if two rows are identical, the second row will never evaluate to true and so is unreachable.

NoteIf 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 (zzz) the other rows that cause that row to be unreachable. The selected row is highlighted with a yellow background (zzz).

zzzIn 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.

 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 (zzz). They are only suggestions; you can alter or eliminate them.

 Edit in Excel  

Edit the contents of the table using Microsoft Excel. By design, you can't use Excel sort capabilities, because the order of rows in the decision table is significant.

 zzz Completing the heading row

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.

Settings

These values are available for headings in the Conditions area.

Field

Description

Property

Enter the condition you want to evaluate. This may be a Single Value property, a property reference to a single value, or a more complex expression. Use SmartPrompt to see a list of all the properties available in the Applies To class of this decision table rule (and in its parent classes).

Click the magnifying glass icon (Expression Builder) to start the Expression Builder. See About the Expression Builder. (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.)

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. 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.

Security

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. The column background changes to gray for users who cannot update it.

  • 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.

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 (zzz). To create another column to the left of a column, click the Insert Column Before button (zzz).

Optionally, to identify one or more property to be set as it the decision tree row is processed, click the zzz button. Complete the top cell to the right of the Return column with a label and property name.

 zzz 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 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.

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.

TipAs 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 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.)

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.

SmartPrompt You can use SmartPrompt to access a Local List of values (if any) defined on the 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 (zzz) to start the Expression Builder. (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 (zzz) to the left of the row. Another row appears, titled else if.

TipAs 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.

Actions

These fields follow the comparison cells in the row and the Arrowseparator.

Field

Description

Return

SmartPromptEnter the result to be returned to the application when all the comparisons in the row are true. Enter a constant or a property reference.

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 zzz 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:

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

For guided assistance in entering expressions, click the magnifying glass icon (zzz) to start the Expression Builder. (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.

 zzz 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 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

SmartPrompt 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 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.

AdvancedDuring 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.)

 zzz 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.

 zzz 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 into a single cell.

zzzThe Insert Or Before (zzz) and Insert Or After
(zzz) 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.

zzz About Decision Table rules