Press "Enter" to skip to content

Rule delegation in Pega



In this post we will see how and why a rule can be delegated to the business users.

Before jumping into the delegation part, let me briefly explain the software life cycle from the developer point of view.

Consider any android application, we do see some updates happen periodically in certain time interval. Every update comes with a new feature and some bug fixes.

Say, Vodafone customer service department is using pega application.

This is how it all starts

  • Vodafone department heads decide to use Pega as a technology to build their customer service application.
  • Bidding occurs and Vodafone identifies the right vendor ( It can be any IT organization)
  • The Vendor sets up a right team with developers, testers, operations engineers and start building the application.
  • The application will be developed, tested and will be rolled out to production.

Production here refers to people in the customer service department. They are the production users who will be start using the developed application.

Once a slice is rolled out or released to production, then the development team will start working on the new features, improvements or bug fixes based on the requirements.

Then the subsequent production releases  happen periodically 🙂

I am going to focus on the 4th point.

  • Normally this release cycle spans across 2 weeks to 6 months. It varies from different organization and different methodology.

Consider Vodafone organization, I am going to give you three business policies.

All three policies are related to customer failing to pay the bill.

  1. When the bill amount is higher than $100, then route the case to special investigation department.
  2. On 5th of every month send out a notification email to the customer.
  3. On failing to pay, send out repeated emails to the customer.

When I see these requirement, I would build these using different components.

This is just a high level solution

  1. When the bill amount is higher than $100, then route the case to special investigation department. – I will build this requirement using decision rules ( decision tree, table  etc)
  2. On 5th of every month send out a notification email to the customer – Since this is time specific, I will build this using service level agreement (SLA) rules.
  3. On failing to pay, send out repeated emails to the customer – to accomplish this, I will use correspondence rule to specify the email template.

Do you think these business policies stay the same forever?!

  • A big NO. Many factors influence change in these business policies.

So tomorrow, there may be some relaxation in the bill arrear amount, it can be increased to $150 or business thinks it is wise to send out the notification at the start of every month and also email template can vary based on the customer response.

Day after tomorrow, again these can be changed.

As I mentioned the release life cycle may vary from 2 weeks to 6 months.

  • Think about Vodafone organization uses waterfall methodology where the production release will be once in 6 months.
  • To accomplish these requirements to production we have to wait for 6 months, but..but before that again the business policies may change 😛 pissed off right.

That is why it is recommended to follow agile methodology where a release can be planned in short sprints.

Personally I am fan of agile methodology, which can adopt to any change with shorter release cycle.

Obviously Pega is Build for change

Now let me pitch in delegation 🙂 I don’t want to talk more about which is the best methodlogy!!

What is rule delegation?

Rule delegation enables business users to update any business policies themselves without any developers involvement.

Let’s think from developer point of view.

Things to note

  1. A rule can be updated only when the ruleset is unlocked.
  2. Whenever a new requirement comes in, developer do the code changes in dev environment then do the testing in testing and staging environment then finally it will go live to production.

In production we cannot unlock any existing ruleset to update a rule. If you do so there are some chances that you may be fired 😉

But how about having a new ruleset, higher in the ruleset hierarchy, which can be kept open all the time so that any rule can be overridden. We can call it production ruleset.

What are the risks involved  in production ruleset?

1. Any users who has access to production can open a rule and update the rule.

Solution: Have a separate access group so that the business users can only make the changes from their user portal. You can also have some approval flow for the changes.

But still in some unavoidable situation we may be urged to save as some rule in production designer studio to fix production bugs. This is highly not recommended. I can still remember my old days when I used to do that!!!!

I feel I made a long lecture…. Let me jump into tutorial

What are the pre-requisites for delegating a rule?

We already knew the answer.

  • A dedicated production ruleset
  • An access group for business users who can update the business policies. You can create a new access group or use some existing access group.

Step 1: Create a production ruleset – DelegatedRules

Records -> Sysadmin -> Ruleset -> Create new

Here you see a new ruleset is created.

I feel, there has been lots of confusion in using production rulesets.

How to use production rulesets?

You need to follow 2 things

a) Add the production ruleset in the application rule ->Advanced ->production ruleset array.

Open your application and add it.

To verify, after adding  click on the operator profile to check the ruleset hierarchy

  • You can see the Added production ruleset – DelegatedRules in still NOT in the ruleset hierarchy.

Now Open your current access group and add the production ruleset in advanced tab.

Now save the access group and check the ruleset hierarchy from profile.

  • You can see the production ruleset in higher in operator ruleset hierarchy

Important note: Always production rulesets should be added in the application rule and access group.

Step 2: I am going to create a new access group for the business users.

Records -> Security -> access group -> create new

  • As a best practise, always create the access group name as <AppName:RoleName>

For now I provided the manager role and save the access group.

  • In the advanced tab, add the production ruleset – DelegatedRuleset

Save the access group.

For testing purpose, you can also include a operator under the access group.

Okay, now let’s see how to delegate a rule.

What are the rules that can be delegated?

  • Pega doesn’t provide a list of rules that can be delegated and that cannot be delegated.
  • Normally the business rules like – decision rules, SLA, correspondence can be delegated to the business users.

Note: Business users may not have experience in pega development and may not able to handle complex business changes

How to delegate a business rule?

Step 1: Always remember, you should delegate the rule which is saved in production ruleset.

Open the actual rule which has to be delegated. It must be in some application ruleset.

Step 2: Save as the rule in production ruleset – DelegatedRules.

  • Remember, you have to add the production ruleset in the application rule and access group.

Save and check the rule.

Step 3: Go to actions button and click on delegate.

Note: If you don’t have the option to delegate, then it means you don’t have the privilege to delegate. pxCanDelegateRules is the corresponding privilege. This privilege is default shipped with sysadmin4 roles. So an administrator access group can always delegate rules

Step 4: You have to specify 3 things

1. Delegate to access group – Specify the access group of users who can do the changes in business policies. In our case it is FirstApp:BusinessUsers.

2. Title – Specify the meaningful title

3. Description – This should explain in detail as a instruction to business users.

  • Click on Delegate. Now your rule is delegated.

Step 4: Login as business user.

On the left panel – click on the configuration icon.

You will see the delegated instance.

Step 5: Click on edit

This will open the delegated rule. You can edit and save the rule.

I updated the amount to $150.

Note: I added enable check out in the operator rule form and the delegated ruleset, that’s why checkout option is enabled.

Step 6: you can see the changes in the designer studio.

Open the decision rule DetermineInvestigation in DelegatedRuleset

How to promote the delegated rules to production?

  1. Normally the production ruleset will be included in the product rule.
  2. The delegated instance is a data instance under ‘System-User-MyRules’

To check go to app explorer and search System-User-MyRules

Click on the click name highlighted, you will see the instance.

  • You can click and open the instance to get the pzInsKey and include the pzInsKey in the product rule to move the rule delegation to higher environment.

I hope you are clear with the production ruleset usage and rule delegation.

What are the things to remember?

  • When the release cycle is long, then it is highly recommended to use production ruleset.
  • Have a dedicated production ruleset for delegation purpose
  • Always add the production ruleset in the application rule and all the access groups so that the changes will reflect to all users.
  • Delegate only the rules which are saved in delegation specific production ruleset.
  • Use the Configuration option in manager portal and try to customize / mimic the same section in your application.
  • To promote rule delegation to higher environment, don’t forget to include corresponding System-User-MyRules instance

End credits like marvel series.

Prem will return in the next post 🙂

  1. Sivajyothi Sivajyothi

    Very informative post…

    • Premkumar G Premkumar G

      Thank you so much, Sivajyothi. 🙂

  2. shivakumar Hugar shivakumar Hugar

    Good explaination on delegate rules . thanks for sharing

    • Premkumar G Premkumar G

      Thank you so much, Shivakumar. 🙂
      You are welcome!

  3. Soumik Ghosh Soumik Ghosh

    Please share a post on system performance tuning

    • Premkumar G Premkumar G

      Yeah, I’ll take a note of it Soumik Ghosh and I’ll try to post about it soon. Stay tuned.

  4. Ali Ali

    Appreciate your efforts man! Doing a good job.

    • Premkumar G Premkumar G

      Thank you so much for your heartfelt appreciation, Ali. 🙂

  5. Sreenu Sreenu

    Good, everything is very clear

    • Premkumar G Premkumar G

      Glad to hear that, Sreenu. 🙂
      You are welcome. 🙂

  6. Shivaprasad Shivaprasad

    Thanks for wonderful post

    • Premkumar G Premkumar G

      You are most welcome, Shivaprasad. 🙂

  7. Sam Sam

    Hi prem. A confusion..
    So there will be a delegate ruleset (locked) which delegates the rules to business users.
    And a production ruleset for developers to work on next requirements or fixes. But production ruleset is locked. So save as a ruleset into new from production ruleset and work?
    Correct me please.
    Thanks in advance 🙂

  8. murty murty

    great work ….

    • Premkumar G Premkumar G

      Thank you so much, Murty. 🙂

  9. Raghu Raghu

    It’s a very useful post, very good explanation on each topic👌… I am following u r every post…
    Thanks bro!!!

    • Premkumar G Premkumar G

      Thank you so much for your heartfelt appreciation, Raghu. 🙂
      I’m glad to hear that you like my posts. 😀
      You are most welcome, Raghu!

  10. Pratyush Jha Pratyush Jha

    Thank you for the knowledge sharing!! Can we delegate the paragraph rule, if so can you please explain with a small example?

  11. somnath somnath

    Hi Prem,

    Thanks a lot for sharing this very in-detail and explanatory topic. Will wait for your next topic and hope you will post frequently now.

  12. Ramakrishna Ramakrishna

    Nice Explanation and clear cut execution of each and every post….it’s very easy to understandable …thank you very much Prem….Doing good job..

  13. Lokesh Lokesh

    Very informative!
    Prem, could you post an article on Tickets pls.

  14. Ajit Ajit

    Thank you for sharing all these topics.

    Could you please tell me how can i connect oracle DB to pega, so that i can see all other table details currently i am using PE7.2

  15. Pranay Pranay

    As usual great explanation, Thanks buddy 🙂

  16. Shah Shah

    Really appreciate your effort. Can you please post articles on listers too? Thanks in advance.

  17. Venkatesh Venkatesh

    hii prem,

    useful info ,thanks
    could you please help me to get the PegaWAI:07-10-29 ruleset For Accessibility

  18. dr dr

    Thank you so much…It’s most helpfull….(:

  19. Mukesh Mukesh

    Nicely explained.

  20. Hema Hema

    Great work!! Please share a post on data flows and data set

  21. Sivajyothi Sivajyothi

    Prem can you please explain why we are using Getcontent Activity in Listview Report Source?

  22. Sivajyothi Sivajyothi

    Prem the above question is wrongly posted here.. This Question i posed is for GETNEXTWORK Post .

  23. Kavita Kavita

    Hi Prem,

    Your Posts Are Really Helpful i need to go through your post before i start working on any rule.Please keep posting.
    Thank You

  24. Ben Ben

    Great content! I am preparing for CSSA exam and love the materials you are creating. This in conjunction with Pega Academy is superb. Kind regards -Ben

  25. Srinivas Gummadi Srinivas Gummadi

    Thank you so much bro for sharing the clear information on delegated rule…

  26. Raam Raam

    Will you please upload about Rule-Admin-Product Rule(RAP)

  27. Bhargav Bhargav

    Plz Upload About RAP

  28. Sandeep Sandeep

    Hi Prem,

    Just wanted to add 1 more point to this blog post. We can move the delegated rules with our application. We can find a check box Custom/Production Ruleset in the Product rule.
    If this box is checked, we can move our delegated rules in Production ruleset alongwith Application.


  29. Rajesh Rajesh

    very good explanation on each topic. your post are highly use full. i will fallow your posts. thanks for sharing Prem.

  30. bhanu bhanu

    Please correct me if I am assuming wrong here:
    In total,

    1. Need to create a rule set and an access group that can have access to this rule set
    2. copy/save as the required rules to the newly created rule set
    3. Delegate the above copied rule (from newly created rule set)
    4. add the rule set to production rule sets(which are going to rollout into production)

  31. Sravan Sravan

    Hi Prem,

    Can I delegate Data Table ?

  32. jaideep jaideep

    Which DB Table stores information about delegated rules ?

    • jaideep jaideep

      answer : pr-sys-user

      i am using 7.3.1 PE and i dont see delegate option, and pxcandelegaterules as well.

      But i am assuming add to favorite and delegate does the same job, is that right ?

  33. Amar Amar

    Thanks for wonderful post. You topics are really helpful and informative. Following all your post .:)

  34. koteswararao koteswararao

    Please explain about types of rule sets and where we are using

  35. Sridhar Sridhar

    Each and every topic in this blog is explained as clearly as spoon feeding. Thanks a lot .

  36. Joseph Joseph

    Thank you for sharing all your knowledge with nice examples.

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!