Today you will learn How rule resolution process works in Pega 8.
Rule resolution:
Rule resolution is a search algorithm used to find the most appropriate instance of a rule to execute in any situation.
Rules are the instances of classes derived from the abstract Rule– base class.
Few examples:
- Case types (Rule-Obj-CaseType)
- Properties (Rule-Obj-Property)
Rule resolution Overview:
Find rule in Rules Cache:
In the first step, If rule resolution was already run for the rule, the rules cache has a list of all possible rule candidates.
Find best match 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.
If a subsequent match is found, Pega sends a message that there are duplicate rules and stops processing.
Confirm 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, execution is halted, and an error message is added to the log file.
User has access? :
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.
Rule Availability:
The Availability setting is used to determine if a rule is available for use during rule resolution.
The availability of a rule is also used to determine if you can view, copy, or edit a rule in Dev Studio.
Availability = Available
You can view copy edit and execute rules in Dev Studio when the availability is set to Available.
Availability = Not Available
Not Available indicates the rule may not be used during the rule resolution process.
Rules marked as Not Available can be viewed, copied, or edited in Dev Studio, but do not execute.
Availability = Blocked
An availability of Blocked indicates the rule may be used during the rule resolution process.
Rules marked as Blocked can be viewed, copied, or edited in Dev Studio, but do not execute.
If a blocked rule is selected during rule resolution, execution is halted, and an error message is added to the log file.
Availability = Withdrawn
When a rule marked as Withdrawn is found during rule resolution, the system looks for an instance of the rule in the parent class or next higher ruleset in the application ruleset stack.
Rules marked as Withdrawn can be viewed, copied, or edited in Dev Studio, but do not execute.
Hope you learn How rule resolution process works in Pega 8.