Skip to main content
This content is now archived and is no longer updated. Progress is not calculated. Pega Cloud instances are disabled, and badges are no longer awarded. Click here to continue your progress in the latest version.

The Rule resolution process

How the rule resolution process works

Rule Resolution is the process Pega uses to determine the most appropriate rule to execute.

Rule Resolution Overview

When a rule is referenced in a Pega application, rule resolution attempts to locate instances of the rule in the rules cache. If instances of the referenced rule are found, rule resolution finds the best instance of the rule and checks for duplicates. Then Pega confirms the rule is available for use. Finally, Pega verifies the user is authorized to use the rule.

If instances of the rule are not found in the rules cache, Pega runs a special sub-process to populate the rules cache.

The point of the rule resolution is to return the most appropriate rule to satisfy the need of a specific user for a specific purpose.

Find the rule in the rules cache

If rule resolution was already run for the rule, the rules cache has a list of all possible rule candidates.

For example, the referenced rule is a section rule named CreateRequest for a Purchase Request case. The requestor (the user working on the case) has the Purchasing:02-01-05 ruleset in their ruleset stack.

Pega searches the Rules Cache for a list of all possible rule candidates for the rule in question.

The rules cache contains three rule candidates.

Apply to: class Rule type Rule name Availability Ruleset Version Qualifier Privilege
TGB-Purchasing-Work Rule-HTML-Section CreateRequest Available Purchasing 02-01-05 Supplier=Restricted  
TGB-Purchasing-Work Rule-HTML-Section CreateRequest Available Purchasing 02-01-05 < 01 June 2019  
TGB-Purchasing-Work Rule-HTML-Section CreateRequest Available Purchasing 02-01-05    

Find the best instance and check for duplicates

In this step, the rule resolution algorithm determines which rule candidate is a first, best match. A first, best match is determined by an exact match of a property or date circumstance, or a default rule if no exact circumstance matches are found.

When a rule that matches any of these conditions is found, the rule resolution algorithm checks whether the next rule in the list is equally correct. If a subsequent match is found, Pega sends a message that there are duplicate rules and stops processing. If no other matches are found, Pega prepares to use the rule that matched the listed conditions.

In the example, the value of .Supplier in the Purchase Request case is set to Open. The first condition — .Supplier=Restricted — is not met, so the rule candidate is skipped and Pega moves to the next rule in the list.

Apply to: class Rule type Rule name Availability Ruleset Version Qualifier Privilege
TGB-Purchasing-Work Rule-HTML-Section CreateRequest Available Purchasing 02-01-05 Supplier=Restricted  
TGB-Purchasing-Work Rule-HTML-Section CreateRequest Available Purchasing 02-01-05 < 01 June 2019  
TGB-Purchasing-Work Rule-HTML-Section CreateRequest Available Purchasing 02-01-05    

The next rule candidate has a date circumstance defined, so Pega compares the date circumstance against the current system date.

In the example, the next condition is a date range specified as Before 01 June, 2019. Assume the current system date is 15 August 2019.

Apply to: class Rule type Rule name Availability Ruleset Version Qualifier Privilege
TGB-Purchasing-Work Rule-HTML-Section CreateRequest Available Purchasing 02-01-05 < 01 June 2019  
TGB-Purchasing-Work Rule-HTML-Section CreateRequest Available Purchasing 02-01-05    

The date range circumstance is not met, so the rule candidate is skipped and Pega moves to the next rule in the list. The next rule candidate does not have a qualifier, so the system selects this rule.

Apply to: class Rule type Rule name Availability Ruleset Version Qualifier Privilege
TGB-Purchasing-Work Rule-HTML-Section CreateRequest Available Purchasing 02-01-05    

Confirm the rule is available for use

In this step, the rule resolution algorithm checks to see if the rule Availability is set to Blocked. If the rule is blocked, execution is halted, and an error message is added to the log file.

In the example, the availability of the rule candidate is set to Available, so the rule is considered available to run.

Apply to: class Rule type Rule name Availability Ruleset Version Qualifier Privilege
TGB-Purchasing-Work Rule-HTML-Section CreateRequest Available Purchasing 02-01-05    

Verify the user is authorized to use the rule

In this final step, the rule resolution algorithm verifies that the user has authorization to access the selected rule. If the user has all of the privileges required by the selected rule, the rule is executed. If the user does not have any of the privileges required by the rule, Pega sends a message that the rule is not authorized for execution.

The rule does not list a required privilege, so the rule is selected and executed.

Apply to: class Rule type Rule name Availability Ruleset Version Qualifier Privilege
TGB-Purchasing-Work Rule-HTML-Section CreateRequest Available Purchasing 02-01-05    

This Topic is available in the following Module:

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