A decision table expression is used to compare a given input against a list of predefined combinations of conditions. Each combination has an individual result assigned which is returned as the expression result when the input data matches the particular combination.
Structure
The decision table is built up as a table with the following elements and settings:
One or more columns representing the different conditions against which the input data is compared
One or more columns used to hold the result that is returned by the expression if all the conditions in a row are satisfied
One or more rows that are unique in terms of their combined conditions
Features
General Concept
A decision table expression sequentially processes business rules based on a set of inputs. At runtime, the input data that is supplied to the decision table is compared against the defined conditions, starting with the first row. All cells are evaluated by checking the column value against a number of range comparisons. For each cell, a boolean result is returned. If all cells in a row are evaluated as true, the evaluation stops and the expression returns the result associated with the current conditions. Otherwise, processing continues with the next table row until either a matching set of conditions is found or the end of the table is reached.
The decision table data consists of a set of nested expressions for each table cell. With the cells in condition columns, the expressions are typically value ranges or constants, and they use the corresponding column data object as a test parameter. Normally, a condition column is defined by assigning a data object to it. However, condition columns can also be derived from nested expressions. Each cell in a row can be either a single value, an enumeration of distinct values, or a range of values against which the inputs are checked.
The data structure of the result column is derived from the result data object. A decision table can also have multiple result columns. This can be achieved either by assigning a structure data object as the result data object, or simply by providing several elementary data objects as result columns. In the latter case, the system offers to create a new structure data object containing the selected elements. This structure is then automatically assigned as the decision table's result data object.
For special purposes, it is also possible to define the result column as Action Column. In this case, you define an action for each combination of conditions that shall be triggered if the input data matches the condition defined in a table row.