Skip to main content

Decision tree or Decision table

Both Decision tables and Decision trees evaluate properties or Conditions to return results when a comparison evaluates to true. While Decision tables evaluate against the same set of properties or Conditions, Decision trees evaluate against different properties or Conditions.

Decision tables

In a Decision table, the values in a column evaluate against the same property/operator pair, such as Account type =, to return a value or property. Developers can use a Decision table when they have to evaluate many combinations of the same set of properties or Conditions to return one value or property. For example, a company uses the number of years at the company and ratings on five employee evaluation metrics to determine bonus eligibility.

Decision trees

Each branch in a Decision tree evaluates the property/operator pair against a single value to perform an Action, such as return a value or evaluate a nested Condition. Developers can use a Decision tree to evaluate Conditions on different properties that might depend on other Conditions. Each branch in a Decision tree is evaluated, and all branches that evaluate to true perform the Action that is described afterward, such as continuing the evaluation to the nested Condition. For example, a language learning app runs extensive A/B testing, where some users receive hearts, and other users receive stars for their efforts. The values for hearts and stars are collected in separate properties. A Decision tree evaluates the different rewards for which users are eligible based on the number of hearts or stars that are associated with the account.

In the center of the following image, slide the vertical line to compare the interface for setting up a Decision table and a Decision tree:

Considerations for use and configuration

Decision trees and Decision tables perform similar functions. However, you cannot always use Decision tables and Decision trees interchangeably within Pega Platform™ applications. To select which logic to configure, consider what Conditions you want to evaluate and where you need to use the Decision table or Decision tree.

For example, you can reference a Decision table or Decision tree on Flow Rules, declare Expressions, activities, or routers. Some configurations, such as cascading approvals with an authority matrix, support only evaluation of Decision tables.

It is preferable to use a Decision tree when configuring conditions that evaluate against different properties and to use a Decision table when evaluating against many of the same properties. Using a Decision table when evaluating against different properties can result in empty boxes and using a Decision tree when evaluating against the same properties can result in duplicate Conditions.

In the center of the following image, slide the vertical line to compare the Decision table and the Decision tree for an account type Decision:

Check your knowledge with the following interaction:


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice