Test and Use a Decision Table

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

  1. Open a Decision Table for editing.

  2. Expand the Preview panel on the right.

  3. Optionally, enter the JSON data model into the Sample Input field using mustache syntax for process variables.

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

  1. Click Run.

  2. If the Decision Table evaluates successfully, its output displays in the Output panel.

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

  1. Edit a process in the Modeler.

  2. Insert a Decision Task object in the process.

  3. Expand the Decision Tables setting. For information on configuring other settings see, Decision Task Connector.

  4. Click the icon to connect to a Decision Table.

  5. From the Select a Table setting, select your Decision Table.

  6. From the Hit Policy setting, select the required policy.

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

  8. Click Save to save your changes, otherwise click Cancel.