Pega Ruleset Validation-AV and RV

Ruleset validation

Ruleset validation is being performed each and whenever a rule is saved. It ensures that referenced rules are accessible on the target system when the ruleset is advanced. 

Ruleset validation doesn't influence rule resolution at the run time however it is applied at design time.

Validation mode

Two options available for the validation mode:

  •          Application Validation (AV)
  •          Ruleset Validation (RV)

The chose validation mode applies to all variants of the ruleset. 

The New Application wizard makes rulesets that are set to both Application Validation (AV) and Ruleset Validation (RV) modes. The rulesets that contain the application rules are set to AV mode to lessen the distinction among design and run time. 

On the other hand, the organizational rulesets made by the New Application wizard are set to RV mode. RV guarantees to execute validation on prerequisite rulesets when migrated.

Application Validation mode

When the AV mode is selected, rules in the ruleset can reference all rules in the rulesets in the: 

  1. Same application 
  2. Rulesets built on any application 

In this AV mode, Rules in the ruleset can't reference rules outside the present application stack or over the defining application. AV mode does not affect rule resolution at runtime.

Application validation mode with example

For example, from the below screenshots, OneHelp is an implementation application that is built on Framework application OHFW. OHFW is built on UIKit App and UIKit app is built on PegaRULES.

The OneHelp application is built on an OneHelpFrameWork.

We need to understand the rulesets created by the application wizard. When the wizard creates the application, it includes two rulesets one is for Application and another one is for the organization. See the below application OneHelp created by the wizard and it has two sets of rulesets.
  1. OneHelp,OneHelpInt - application ruleset for application configuration.
  2. PH, PHInt - organizational ruleset contains reusable organizational assets, such as data structures.
Application validation mode


Application validation mode framework


Application Validation mode allows for co-dependent rulesets within the same application.
From the below screenshot, From OneHelp application rules in OneHelp:01-01 ruleset can access rules in other rules which are in the same application and build on the application, which means rules in OneHelp:01-01 can access the rules in OneHelpInt:01-01 and OHFW:01-01 and OHFW:01-01. 

But the rules in the ruleset belongs to FrameWork application (OHFW) can not access rules in implementation application rulesets. OHFW rulesets can access other rulesets in the same application. OHFW:01-01 can access OHFWInt:01-01 and OHFW:01-01 can access 
OHFW:01-01.
Application validation mode example

Ruleset validation mode

In Ruleset validation mode, we need to define a 
prerequisite ruleset version for each ruleset and its version. 
From the below screenshot: If we want to use the rules from OneHelpInt and PH rulesets in the OneHelp ruleset, we just need to add them as required prerequisite ruleset and versions. Otherwise, pega will throw rule set prerequisite error.

Ruleset validation mode

















From the below screenshot: Prerequisite ruleset and versions for OneHelp:01-01-01 are 
OneHelpInt:01-01-03 and PH:01-01-02

What does it mean? 

Rules from OneHelp:01-01-01 version can use/reference rules from OneHelpInt:01-01-01, OneHelpInt:01-01-02 and OneHelpInt:01-01-03.
And rules from the OneHelp:01-01-01 version can use/reference rules from PH:01-01-01 and PH:01-01-02.

Ruleset validation mode - versions

For each ruleset version, we have to define at least one Prerequisite ruleset and version. If we don't have any  Prerequisite ruleset and versions to define use Pega-ProcessCommander:08-04-99 as a prerequisite that contains all pega product rulesets.

We should avoid the ruleset cycling process. For example, we have defined OneHelpInt:01-01-01 as a Prerequisite ruleset for OneHelp:01-01-01 so we should not define OneHelp:01-01-01 as a Prerequisite for OneHelp:01-01-01. If we define this circular way, pega will throw an error 
"Rule-RuleSet-Version.Validate-PreReqCircular".

ruleset Prerequisite




















Mixing AV and RV modes

We can combine ruleset validation modes with a bracket and in the bracket, we need to specify the prerequisite ruleset name.
For example, OneHelp is built on the OHFW framework application, and below is the Application ruleset stack for both the applications.

OneHelp: Built on OHFW framework application
App Ruleset stack:  OneHelp              - is using AV mode.
                                 : OneHelpInt         - is using AV mode.
                                 : Online [Offline]  - Online is using RV mode and Offline is the prerequisite ruleset.

OHFW: Built on PegaRULES application
App Ruleset stack: OHFW                   - is using AV mode.
                                 : OHFWInt              - is using AV mode.
                                 : Offline[Pega-ProcessCommander] - Online is using RV mode and Pega-ProcessCommander is the prerequisite ruleset.

We will see how the rulesets can reference rules in other rulesets.

OneHelp Ruleset is using AV mode and can reference rules in the Same application and Rulesets belonging to any built-on application (OHFW framework application is then built on application).
  • OneHelpInt
  • Online [Offline]
  • OHFW
  • OHFWInt
  • Offline[Pega-ProcessCommander]
OneHelpInt Ruleset is using AV mode and can reference rules in:
  • OneHelp
  • Online [Offline]
  • OHFW
  • OHFWInt
  • Offline[Pega-ProcessCommander]
Online [Offline] is using Ruleset Validation (RV) mode and can reference rules in :
  • Offline because Offline is the prerequisite ruleset for Online.
  • Can not reference rules in OHFW, OHFWInt, and Offline[Pega-ProcessCommander]
OHFW is using AV mode and can reference rules in:
  •  OHFWInt 
  •  Offline[Pega-ProcessCommander] 
OHFWInt is using AV mode and can reference rules in:
  • OHFW 
  • Offline [Pega-ProcessCommander] 
Offline [Pega-ProcessCommander] is using Ruleset Validation (RV) mode and can reference rules in :
  • Pega-ProcessCommander rulesets because Pega-ProcessCommander is the prerequisite ruleset for Offline.



2 comments: