Decision Table
In ProcessMIX, a decision table is a visual metaphor that allows to quickly define large amount of decision logic (business rules) in a compact and easily manageable tabular format—a spreadsheet.
Unlike a flow, which allows to develop rules of any complexity with the help of its conditional nodes, expresions and so on, business logic that can be expressed by a decision table is simpler. Every row in it contains a set of simple property condition checks, each represented by its own condition column. If all conditions in the row a satisfied, a data structure with the rule's result is created, with properties populated from the values contained in result columns.
Below is an example of a decision table:
It evaluates details of a credit application and makes approval decision and assignment to the credit tier. The "YearlyIncome" and "CreditScore" are condition columns, while the "Approve" and "DecisionCode" are the result columns.
In this case it is designed so that the table's evaluation stops after reaching the first row with all satisfying conditions. Decision tables can also be configured to execute every satisfactory rule until the end of the table is reached.
The n/a is a special instruction to skip the check because the value of some property is irrelevant to the logic of a given row. For example, in the first row all applications with insufficient income are automatically rejected, regardless of their credit score. And in the last row, all conditions are skipped, because it serves as a catch-all check to assign a default credit tier to all applicants not already covered by the previous rules.
When a decision table asset is created in ProcessMIX, the system automatically generates two backing data structures—one to hold all condition properties (input data), and another one to hold the resulting properties (output data). As you edit condition and result properties in the decision table, those backing structures are automatically updated to stay in sync.
The condition and result properties must have simple data types:
String
Integer
Float
Boolean
Date
A flow that wants to apply a decision table needs to have a "decision table" node to be added to it. In there, input structure with condition parameters needs to be provided.
The result of the table execution (an array with execution results from all activated table rows) will become available as a node variable in the remaining part of the flow.
You can learn more about creating and editing decision tables in the Decision Table Builder section.
Last updated