About Decision tables
Use a decision table to derive a value that has one of a few possible outcomes, where each outcome can be detected by a test condition. A decision table lists two or more rows, each containing test conditions, optional actions, and a result.
The following tabs are available on this form:
At run time, the system evaluates the rows starting at the topmost row:
- If any conditions in a row evaluate to false, processing continues with the next row. The Actions and Return columns for that row are ignored.
- If all the conditions in a row evaluate to true, then the Actions
and Return columns of that row are processed. What happens next
depends on the Evaluate All Rows check box on the
- If the Evaluate All Rows check box is not selected, processing ends and the system returns the value in the Return column as the value of the entire rule.
- If the Evaluate All Rows check box is selected, processing continues through all remaining rows, performing the Actions and Return calculations for any rows for which the conditions are all true.
- If no row in the table has all conditions evaluate to true, the system returns a default result.
- When a cell with an OR condition has an empty cell, the parser ignores that cell and parses only the cell that contains a value.
- In a table with text properties and an operator that overrides the default operator (=),
an empty cell is treated as "". Additionally, the following code is generated:
columnProp.compareTo("")>0). If the property type is not text, an empty cell generates a validation error.
Four other types of rules can reference decision tables:
- In a flow rule, you can reference a decision table in a decision shape, which is identified by the Decision shape .
- In an activity, you can evaluate a decision tree by using the Property-Map-DecisionTable method.
- A Declare Expression rule can call a decision table.
- A collection rule can call a decision table.
Use the Application Explorer to access decision tables that apply to work types in your application. Use the Records Explorer to list all the decision tables available to you.
When creating a rule that is to return only one of a small number of possible values, complete the Results tab before the Table tab.
After you complete initial development and testing, you can delegate selected rules to line managers or other non-developers. Consider which business changes might require rule updates and if delegation to a user or group of users is appropriate. For more details, see Delegating a rule or data type.
Decision table rules are instances of the Rule-Declare-DecisionTable class. They are part of the Decision category.
- Creating decision tables
To better adjust to the varied factors in your business processes, you can create a decision table. Decision tables test a series of property values to match conditions, so that your application performs a specific action under conditions that you define.
- Completing the Pages & Classes tab
The system uses this tab at runtime to locate properties on the clipboard.
- Completing the Results tab
Complete the fields on this tab to restrict the possible values returned by this decision table. Additional options allow you to control the actions that other users can take on the Table tab.
- 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.
ArticleViewing rule history