Rulesets and Rule Resolution
Rulesets and Rule Resolution
LEVEL – LEARNER
RuleSet and Rule Resolution: Overview
• Introduction:
2
Objectives
3
Do You Know
• What is a Rule?
• What is Locking?
4
Fundamentals of RuleSet
5
Standard RuleSets
In addition, any application developer who can check out rules has a private RuleSet which holds
the temporarily checked out rule. The system creates each private RuleSet automatically, named to
match the developer's Operator ID value.
6
How To Create RuleSet
• While creating a new RuleSet, use a single key which appropriately describes
the group of rules it contains.
• Guidelines
– The following guidelines should be followed while naming a
RuleSet:
• Start the RuleSet name with a letter and use only letters, digits, and
dashes. Choose names that are short and easy to remember.
• Don't choose a name that starts with the four letters Pega, or other
variations of this text with different case. Such RuleSets have special
capabilities and are reserved for use by PegaSystems Inc.
• RuleSet names may be up to 64 characters long, but normally are less
than 20 characters long.
• A RuleSet name must be unique system-wide.
7
How To Create RuleSet Cont…
• In the Rules Explorer, in the SysAdmin category, right-click RuleSet and select
New.
8
How To Create RuleSet Cont…
• RuleSet: Security Tab Select this check box if you want the rules in
this RuleSet to override, and extend an
application, rather than define an application.
A local customization RuleSet should not be
moved to other Process Commander
Systems.
9
What is RuleSet Version
10
RuleSet Version - How To Create It
• While creating a new RuleSet Version, you need to give 2 keys. The 1st key is
the name of the RuleSet for which this new version is being created. The 2nd
key is the concatenated two digit values of the major, minor and the patch
version. RuleSet Version Form: Each of the major, minor or patch versions can
range from 01 to 99.
11
RuleSet Version - Locking
12
RuleSet Version - Pre-requisites
• The Rule Resolution algorithm scans through the PegaRULES database to find
all rule instances matching the name and type of the rule to be executed. This
is followed by various phases of filtering where the system narrows the search
to one rule instance and executes it. The search criteria of each phase is
applied to the result set obtained from the previous phase.
14
How Rule Resolution Works Cont…
In this stage, the system searches all the rules which contain an Applies To
class as the key part, starting from the lowest level of the class hierarchy that
matches the class key part of the partially specified rule instance, and works up
to the top (the ultimate base class) gathering all the matches on the name as
found. The system considers both Pattern and Direct inheritance to search for
a rule in the class structure with Pattern inheritance taking precedence over
Direct inheritance.
For rules that do not contain an Applies To class as a key part, such as Rule-
HTML-Fragment, every rule with the supplied name (at all levels) is found.
15
How Rule Resolution Works Cont…
In this phase of the search, the system scans the result set of Phase 1 and
excludes all rules marked as Not Available, Blocked or Withdrawn.
For the remainder, the RuleSet Name and Version associated with the rule
instance are matched against the RuleSet list of the user. Those rule instances
with RuleSet names and versions not matching the RuleSet list of the user are
excluded.
The RuleSet list of a user is defined in the Application rule associated with the
user’s Operator ID. It is possible to restrict the Rule Resolution search for a
user to the exact RuleSet Version. To know more about how the system
assembles the RuleSet list, please refer to the PRPC Help file or PDN.
16
How Rule Resolution Works Cont…
Some rules, known as time-qualified rules, are in effect only during a specific
time interval. If any of the candidate rule instances produced by Phase 2 above
are time-qualified, the system uses the current system date and time to find
those that are in force. Any others are eliminated.
If two or more time-qualified rules are both candidates at the current time and
date, the system selects the ones with the nearest end date. Of these, if
multiple candidates have the same end date, the system picks the candidate
with the most recent start date.
17
How Rule Resolution Works Cont…
18
How Rule Resolution Works Cont…
Phase 5 excludes rules that the user (or requestor process) cannot execute for
security or access control reasons. Every user holds one or more access roles
and optionally one or more privileges (as defined in the Access of Role to
Object via Access Group referenced in the user’s Operator ID). Access of Role
to Object rules for these access roles determine which classes the user with
that rule can operate on, and how.
In addition, flow rules, correspondence rules, and a few other rule types may
contain an associated list of privilege requirements. The requestor process
must have access to one of the privileges before execution can start. Some
rules also reference one or more When condition rules that must all evaluate
to true before the rule can be executed.
19
How Rule Resolution Works Cont…
If no rule instances survive the above five phases, the user process is notified
of the "no rule found" condition. If only one rule instance survives, it is
selected and executed. If more than one is found, the one lowest in the class
hierarchy — closest to the Applies To class — is performed.
20
Exceptions to Rule Resolution
• A few rule types have instances that are not associated with a
RuleSet and version and no rule resolution processing occurs
when an instance of these classes is needed. For example, access
roles (Rule-Access-Role-Name rule type) must have names that
are unique system-wide.
21
Exceptions to Rule Resolution Cont…
• Certain rule types do not come under the purview of the Rule
Resolution algorithm.
– Rule-Access-Deny-Obj
– Rule-Access-Role-Obj
– Rule-Application
– Rule-Connect-BPEL
– Rule-Method
– Rule-Obj-Class
– Rule-RuleSet-Name
– Rule-RuleSet-Version
– Rule-Service-BPEL
– Rule-Template-
– Rule-Utility-Library
22
Benefits of Rule Resolution
23
Types of RuleSet and their role in Rule Resolution
24
Types of RuleSet and their role in Rule Resolution
26
Questions
27
Welcome Break
28
Lend a Hand
29
Test Your Understanding
• What are RuleSet and how are they different from RuleSet
versions ?
• RuleSet version is an instance of which class ?
• What are the different categories for each RuleSet?
30
Summary
31
PRPC V6.1