Featured post

GetNextWork functionality in pega

What is GetNextWork in pega? Pega provided a functionality to get the most urgent assignment(task) for user to work on. This is configured o...

Pega Ruleset Validation-AV and RV

Ruleset validation

Ruleset validation is being performed each and every time when 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 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 executing 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 below screen shots, OneHelp is an implementation application which 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 a 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 other one is for organization. See the below application OneHelp created by wizard and it has two set 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 below screenshot, From OneHelp application rules in OneHelp:01-01 ruleset can access rules in other rulests which are in same application and build on application, 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 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 below screenshot: If we want to use the rules from OneHelpInt and PH rulesets in OneHelp ruleset, we must need to add them as required prerequisite ruleset and versions. Otherwise pega will throw  rule set prerequisite  error.

Ruleset validation mode

















From 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 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 which contains all pega product rulesets.

We should avoid 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 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 the 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.



1 comment: