The Rule resolution process
Pega Platform™ uses rule resolution to determine the most appropriate rule to run.
When a rule is referenced in a Pega Platform application, rule resolution attempts to locate the suitable instances of the rule present in the rules cache. Pega Platform uses a multi-step process to select the most appropriate rule to satisfy the need of specific users for a particular purpose.
In the following image, click the + icons to learn more about the rule resolution process.
Rule candidates in the rules cache
Pega Platform searches the Rules Cache for a list of all possible rule candidates for the rule in question.
If rule resolution is 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.
In this example, the rules cache contains three rule candidates.
Rule candidate best match
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 Platform sends a message that there are duplicate rules and stops processing. If no other matches are found, Pega Platform 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 Platform moves to the next rule in the list.
In the center of the following image, drag the vertical line to see the skipped rule candidate.
The next rule candidate has a date circumstance defined, so Pega Platform 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.
The date range circumstance is not met, so the rule candidate is skipped, and Pega Platform moves to the next rule in the list. The next rule candidate does not have a qualifier, so the system selects this rule.
In the center of the following image, drag the vertical line to see the skipped rule candidate.
Rule availability
In this step, the rule resolution algorithm checks to see if the rule Availability is set to Blocked. If the rule is blocked, the run is halted, and an error message is added to the log file.
In the example, the rule candidate's availability is set to Available, so the rule is considered available to run.
Note: In the open rule form, click Actions > View Siblings to view a table of all rules with the same name that the rule resolution might select rather than the current open rule. To learn more about sibling rules, see Finding rules by name.
User authorization
In this final step, the rule resolution algorithm verifies that the user has the authorization to access the selected rule. If the user has all of the privileges required by the selected rule, the rule is run. If the user does not have any of the privileges required by the rule, Pega Platform sends a message that the rule is not authorized for the run.
The rule does not list a required privilege, so the rule is selected and run.
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.
Want to help us improve this content?