--- title: "Test and Use a Decision Table" slug: "test-a-decision-table" updated: 2025-03-26T21:44:54Z published: 2025-03-26T21:44:54Z canonical: "docs.processmaker.com/test-a-decision-table" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.processmaker.com/llms.txt > Use this file to discover all available pages before exploring further. # 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](/v1/docs/request-variable) and [Magic Variables](/v1/docs/magic-variables) enclosed in [mustache syntax](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/mustache.5(9).html) 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](/v1/docs/permission-descriptions-for-users-and-groups#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. [Embedded content](https://demos.processmaker.com/embed/cm8ep09tg00011w0iu3bdpu8m?embed_v=2) Follow these guidelines to test a Decision Table:‌ 1. ​[Open a Decision Table for editing.](/v1/docs/manage-a-decision-table#edit-a-decision-table) ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/Test Decision Table.png) 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. SingleMultiple | 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. | > [!NOTE] > 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. | > [!NOTE] > - [See an example of using different decision policies](/docs/See%20an%20example%20of%20using%20different%20decision%20policies.). > - 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](/v1/docs/test-a-decision-table#use-a-decision-table-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. 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](/v1/docs/decision-task-connector). 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](/v1/docs/decision-task-connector#add-a-decision-task-connector-to-the-process-model). 3. Expand the **Decision Tables** setting. For information on configuring other settings see, [Decision Task Connector](/v1/docs/decision-task-connector). ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/DT - Tables to Run.png) 4. Click the ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/49415d2b-6624-4223-97ef-b55a1cd6eafe.png) icon to connect to a Decision Table. 5. From the **Select a Table** setting, select your Decision Table. ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/DT - Execute Conditionally.png) 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](/v1/docs/feel-expression-syntax) to create this condition. 8. Click **Save** to save your changes, otherwise click **Cancel**. ![](https://cdn.document360.io/2d311614-fcb7-4424-8b4c-d4d3091eebeb/Images/Documentation/Decision Table Saved.png) ## Related - [Decision Table Best Practices](/decision-table-best-practices.md) - [Decision Table Categories](/decision-table-categories.md) - [Create a New Decision Table](/create-a-new-decision-table.md) - [Import and Export a Decision Table](/import-and-export-a-decision-table.md) - [Manage a Decision Table](/manage-a-decision-table.md)