Test the conditions in a Decision Table to ensure they work as expected. If needed, use the Sample Input panel to mock process variables and Magic Variables enclosed in mustache syntax to test how the Decision Table runs using data you expect in a process.
Permissions
Your user account or group membership must have the following permissions to do testing in a Decision Table unless your user account has the Make this user a Super Admin setting selected:
Decision Tables: Edit Decision Tables
Decision Tables: View Decision Tables
See the Decision Tables permissions or ask your Administrator for assistance.
Test a Decision Table
Watch the following product tour to learn how to test a Decision Table using different policies.
Follow these guidelines to test a Decision Table:
Expand the Preview panel on the right.
Optionally, enter the JSON data model into the Sample Input field using mustache syntax for process variables.
From the Preview panel, select one of the available hit policies to test rule behavior.
Single: Returns a single result based on the selected single-hit policy. | |
---|---|
First | Evaluates rules sequentially and returns the output of the first satisfied rule, ignoring the rest. Users can reorder rules to control priority. |
Unique | Ensures that only one rule is satisfied and returns the output of a single satisfied rule. If multiple rules are satisfied, the decision table returns an error. |
Any | Returns the output when multiple rules are satisfied, but only if they all produce the same result. If conflicting outputs exist, the decision table fails. |
New in Spring 2025
This feature is available in the Spring 2025 release.
Multiple: Evaluates all matching rules and aggregates the results based on the selected multi-hit policy. | |
Collect Sum | Returns the sum of the outputs from all satisfied rules. Outputs must be numerical values or durations. |
Collect Min | Returns the smallest output value among all satisfied rules. Outputs must be comparable, such as numbers, durations, strings, dates, or times. |
Collect Max | Returns the largest output value among all satisfied rules. Outputs must be comparable, such as numbers, durations, strings, dates, or times. |
Collect Count | Returns the total count of outputs of all satisfied rules. Each rule's output can be of any type, but the decision table always returns a number. |
Rule order | Returns the outputs of all satisfied rules in a list, maintaining their evaluation order. |
The hit policy selected in the Decision Table editor is for testing purposes only. The policy that actually applies is the one configured in the Modeler when the Decision Table is used in a process. This flexibility allows designers to reuse a single decision table across multiple scenarios, dynamically adjusting the policy based on specific business requirements.
Click Run.
If the Decision Table evaluates successfully, its output displays in the Output panel.
If the Decision Table does not evaluate successfully, an error is displayed.
Use a Decision Table in a Process
Decision Tables can be used in processes using a Decision Task. For complete information on Decision Tasks, see Decision Task’s documentation.
Follow these steps to add a Decision Task to a process:
Edit a process in the Modeler.
Expand the Decision Tables setting. For information on configuring other settings see, Decision Task Connector.
Click the
icon to connect to a Decision Table.
From the Select a Table setting, select your Decision Table.
From the Hit Policy setting, select the required policy.
Optionally, select the Execute Conditionally setting to use the decision table only when a certain condition is meet. Use the FEEL Expression syntax to create this condition.
Click Save to save your changes, otherwise click Cancel.