A Pega Rule set defines application behavior using rules

 Rule set in Pega

Rule sets in Pega are a fundamental concept crucial in developing, managing, and executing applications within the Pega platform. Here are some key aspects of Rule sets in Pega.

What is a Rule set?

  • A Rule set functions as a container for storing rules, which are the fundamental building blocks of Pega applications.
  • Next, A Rule set serves as a container for storing rules, which are the building blocks of Pega applications. Moreover, it allows for versioning, organizing, and effectively managing rules within a Pega application.
  •  Firstly, Rule sets ensure that only the correct version of a rule is executed at runtime, thereby maintaining consistency and reliability in Pega applications.

Key Components of a Rule set

 Rule set in Pega
Rule set in Pega
  1. Rule set Name: The unique identifier for a Rule set.
  2. Rule set Version: Indicates the version of the Rule set, typically in the format X-Y-Z (Major-Minor-Patch).
  3. Rule set Stack: The ordered list of Rule sets available to an application. Pega uses this stack to determine which rule to execute.

Types of Rule sets

  1. Application Rule sets: Contain rules specifically tailored to a Pega application’s requirements and functionalities.
  2. Shared Rule sets: Contain reusable rules that can be shared across multiple applications.
  3. System Rule sets: Contain rules provided by Pega, including core functionality and utilities.

Rule set Management

  • Rule set Versions: Each Rule set can have multiple versions, allowing for version control and the ability to make updates without affecting other versions.
  • Check-out/Check-in: A developer can check out rules for modification and then check back in to ensure changes are tracked and controlled.
  • Rule set Validation: Pega validates rules to ensure they work correctly together and adhere to best practices.
Rule set Hierarchy and Inheritance
Inheritance:

Pega uses class and Rule set inheritance to effectively determine which rules are applicable and should be executed based on the application’s context and configuration.

Rule Resolution:

The process by which Pega determines the most appropriate rule to execute based on the context, including Rule set version and inheritance.

 

Additionally, the rule set functions like a container of rules, enabling us to perform versioning of regulations effectively.

Moreover, A Rule set allows a developer to create rules in different versions.

A Rule set enables a developer to create rules in various versions, facilitating flexibility and version control.

When we create a new application PRPC creates multiple rule sets. Each of them has an initial version 01-01-01.

Versioning increment Order will be like below.

01-01-01,01-01-02,01-01-03……01-01-99,01-02-01…..01-99-99-,02-01-01……. 99-99-99.

Example 01-09-50

01->Major Version

09->Minor Version

50-> Patch Version.

How to create a new version of an existing rule?

 Rule set in Pega
Rule set in Pega

If we have the customer details section in version 01-01-01, and our intention is to modify it for the upcoming production release, it is crucial that we save this rule to the subsequent version, 01-01-02, and then proceed with the necessary modifications accordingly.

Now, Customer Details section is in two versions in production, 01-01-01 and 01-01-02.

At Run time PRPC always tries to pick latest version.

Check in-check out of Rules:

Check-in/check-out prevents parallel development.

By default, the rule set lacks the check-in/check-out feature.

To enable check-in/check-out for all rules, follow these steps:

Initially, open the rule set.

Subsequently, you should navigate to the security tab, then select “use Check out,” and proceed to save your changes accordingly.

Firstly, open the rule set.

Next, go to the security tab, select “use Check out,” and save your changes.

Now Open Any rule,

Status- Check Out failed. Original Record already locked by Adminimpl@pashon.com on 20190214T230758.338 EST

DONE.

For all rule sets of all applications, This Check in /check out feature be enabled. 
Locking  A Rule Set Version :-

Thus, locking a Rule Set Version prevents users from creating, updating, and deleting rules in that specification version.

Make sure to check in all the rules in the version before locking a rule set version.

Click on tick mark beside search to see all the check out rules.

To check in all these rule at a time, Click on Bulk actions.

“Select All”, Enter some text in Bulk Prefix Field and Click in Insert.

Click on start to start check in process.

Close.

Locking 01 of Org Rule Set :

Before Locking, if we create any rule in Organization rule set, it displays Version 01 and 02.

Let’s lock version 01.

Expand Version 01.

Click on lock and save.

Submit

Save. Done

Now if we try to create a rule, PRPC will show only 02 Version.

Locked is Version ONE. Done.

Conclusion

Finally,to develop robust and maintainable applications in Pega, it is crucial to understand and effectively manage rule sets. Therefore, it ensures that applications can be updated, extended, and maintained efficiently without introducing errors or inconsistencies. Consequently, it ensures that applications can be updated, extended, and maintained efficiently without introducing errors or inconsistencies.

More topics in technology click here

 

 

Leave a Comment