Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

More about decision tables

Updated on May 17, 2024

When you learn more about decision tables, you can better understand how to use decision tables in a way that most efficiently meets your business scenarios. For example, you can understand how decision tables are related to selected methods and activities, and how these connections affect processing at run time.

Evaluating a decision table

In an activity, to evaluate a decision table and derive a value, your application can use the following objects:

  • The Property-Map-DecisionTable method
  • The standard DecisionTable.ObtainValue() function
  • The pxEvaluateDecisionTable utilities library
  • The standard @baseclass.DecisionTableLookup activity

For more information about calling objects from an activity, see Configuring steps in an activity.

Property-Map-DecisionTable method

To evaluate a decision table and save the result as the value of a property, in an activity, call the Property-Map-DecisionTable method. As parameters, enter the target property name and the name of the decision table. For more information, see Property-Map-DecisionTable method.

DecisionTable.ObtainValue standard function

In an activity, you can call the standard DecisionTable.ObtainValue function to evaluate a decision table. Use the following syntax:

Lib(Pega-RULES:DecisionTable).ObtainValue(tools, myStepPage, DecisionTableName)

For more information about calling objects from an activity, see Configuring steps in an activity.

pxEvaluateDecisionTable utility library

In an activity, you can call the pxEvaluateDecisionTable utility library to evaluate a decision table. Use the following syntax:

Lib(Pega-RulesEngine:Utilities).pxEvaluateDecisionTable(PrimaryPageName, DecisionTableName)

For more information about calling objects from an activity, see Configuring steps in an activity.

Performance

Pega Platform does not limit the number of rows in a decision table. However, as a best practice to avoid slow performance when updating the form and also avoid the Java 64 KB code maximum, limit your decision tables to no more than 300 to 500 rows.

Important: When you save a decision table, if you receive an error message that says that the code of a method exceeds the 65535 bytes size limit, you must create the DecisionTable/legacy/splitSizeLimit dynamic system setting (DSS) in the Pega-RULES ruleset, set its value to true, and then save the decision table again. This fix applies only to decision tables for which you configure legacy Java generation instead of the standard Java generation.

Special processing with Declare Expression calls

When you create a Declare Expression rule, you can incorporate the result of a decision table by providing the result property of the decision table in the Set Property To field. Special processing occurs at run time when a property from the decision table is not present on the clipboard. Such decision rules fail with an error message, and the system returns the Otherwise value from the decision table instead.

Not declarative

Despite the class name, the Rule-Declare-DecisionTable rule type does not produce forward or backward chaining. Technically, decision tables are not a declarative rule type.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

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.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us