What is rule availability in Pega?


In this post we will see more in details about the rule availability.

  • Let me start this post with a story.
  • I invited my close friends for a party in a whatsapp group. I asked them to send a confirmation reply.

Friend 1: I am always ready to attend the party (Bestie :D)

Friend 2: I am not available for the party.

Friend 3: I won’t come for the party. I will not allow my friends too !!

Friend 4: I am ready to come for the party, but I got a family function blocking that day

Friend 5: I am coming. This is my decision and no one can change it.

So sad. I got positive response from only two people. I cancelled the party and started writing a new post for you guys. β€˜Rule availability’

  • I find there are many similarities between my friends availability and rule availability.

I asked 5 rules to run πŸ˜€

Rule 1: I will run for you (Available)

Rule 2: I will not run for you. (Not available)

Rule 3: I will not run for you, I will not allow rules in my lower version to run. (Withdrawn)

Rule 4: I can run for you, but I am blocked (Blocked)

Rule 5: I will run for you. You cannot update me (can be updated in same open version)

What is rule availability?

  • Rule availability helps in managing rules. They can determine, if the rule is eligible to run or not. They can also determine the availability of rule in lower versions.
  • In the rule form, you can configure the rule availability.

Why do you use rule availability?

Scenario: there may be some scenario, where don’t want a particular rule to run in the application. You can use the availability feature in the rule form to make the rule not available Β for rule resolution.

  • We know, Pega use different Β rules to support a business process.

For example – when you create a new work item, there are many rules involved to complete the task like flows, activities, when etc. Some rules in the framework can be overridden in the Implementation layer.

  • Rule resolution, helps in picking the right rule.

What are the types of rule availability in Pega?

  1. Available
  2. Not Available
  3. Withdrawn
  4. Blocked
  5. Final

We will explore all the possible by rule availability scenarios with examples.

What are the pre-requisites to test rule availability?

You can test using any rule. In this tutorial I am going to guide you through activity rules.

Create 2 new activities.

  1. ParentAvailable
  2. ChildAvailable

Parent activity – Use β€˜Call’ keyword and call child activity from parent activity.

Child activity – For testing purpose, use a property-set to set pyLabel – “Child rule is available”


  • Create a new section, and include some fields. Have a button control. In the button, On click event add an action set to call the parent activity.

How do you configure rule availability?

You can use Live UI and check the property involved in holding the availability value in rule form. – ‘pyRuleAvailable’.

You can see the property β€˜pyRuleAvailable’ in the rule class contains the availability value.

How do you use different availablity options?

a) Available – As the name suggests, the rule is always available to run.

Here I have configured both the activities, parent & child activitiesΒ  β€˜Available’.

This is very simple to test. The rule will run anyways πŸ˜€

Step 1: Open the section in user portal.

Step 2: Start the tracer & click on the check availability button.

you can see the child activity ran. It is available πŸ™‚

I think its enough for rule available

b) Not Available

  • Using this option, you can make a rule not available in particular version.

For example – Say you have a rule in 2 versions : 01-01-01 & 01-01-02. Default rule resolution always picks the highest version. In our case 01-01-02.

Now, here if you want your rule in 01-01-01 to run, then you can make the rule availability in 01-01-02 to ‘No’

Note: You always use this in development environment. There is no use in moving a rule to higher environment with rule availablity set to ‘No’. You can just delete it right πŸ˜€

So when you actually use?

  • In development environment, say you have a rule in 01-01-01.
  • You saved the rule in higher version 01-01-02 and did some drastic changes. When you test the rule, it throws error.
  • You need to check, how it worked previously πŸ™‚

So instead of deleting the rule in 01-01-02, you can make the rule availability to ‘No’.

The rule resolution invalidates the rule with availability set to ‘Not Available’, so it runs the rule in 01-01-01.

We will test and check how this works.

Step 1: Save As the child activity in 01-01-02 and set pyLabel to ‘Availability No checking’.

Step 2: Click on the button. As of now keep it available and use tracer to check the value.

You can see ChildAvailable in MyKnowPega 01-01-02 gets picked and pyLabel is ‘Availability No checking’

Step 3: Now update the availability in 01-01-02 to ‘Not Available’.

Step 4: Lets check the same in user portal again. trace it.

See, now you can see the rule in 01-01-01 is picked.

You can use this for testing in development environment πŸ™‚

c) Withdrawn

  • Selection this option makes the rule in the current version and previous versions in the same ruleset, withdrawn from the rule resolution. It means rule resolution, invalidates the withdrawn rule and its other lower versions in the same ruleset.

For example – You have your rule in MyKnowPega 01-01-01 version and updated the rule in MyKnowPega 01-01-02 version. When you withdraw the rule in 01-01-02 version, then the rule resolution never pick the rule in both 01-01-02 & underlying versions – 01-01-01.

What are the other scenarios , you withdraw a rule?

  • You override an pega OOTB rule in your application ruleset. You started implementing your own requirement. In later release, Pega provides the same feature in their OOTB activity, So you no longer required the overridden activity in your application ruleset.

What will you do here?

You cannot delete the rule, since the rule is packed and moved to higher environment.

All you can do is save as the rule in higher application ruleset and withdraw the rule. You can move the withdrawn rule to higher environment. So it invalidates rule in lower versions too πŸ™‚

  • You have a rule say – ‘discount flow’ in ‘OIKGGB-MyKnowPega-Work’ .
  • You Overridden the flow in ‘OIKGGB-MyKnowPega-Work-AmazonSales’ class for Amazon sales case.
  • After some particular release, You included all the Amazon sales discount process in the ‘OIKGGB-MyKnowPega-Work’ class generic flow. So now, no use in having a specialized version in Amazon sales class.

What will you do here?

You can withdraw the rule you specified in the ‘OIKGGB-MyKnowPega-Work-AmazonSales’ class. So rule resolution picks the rule from ‘OIKGGB-MyKnowPega-Work’ class.

Let’s test the withdrawn rules

Step 1: Create a new copy of the ChildAvailable rule in Application Integration ruleset.


Note: But this MyKnowPegaInt ruleset always comes under MyKnowPega (Implementation ruleset) in ruleset hierarchy.Β Rule resolution always picks the rule Β in higher ruleset in the hierarchy. In our case – MyKnowPega

Step 2: let’s test using tracer.

You can see the rule in MyKnowPega 01-01-02 is picked.

Step 3: Now let’s withdraw the rule from MyKnowPega 01-01-02 version.

Step 4: Let’ check in the user portal using tracer.

You can see the rule is picked from MyKnowPegaInt ruleset πŸ™‚

What are the differences between ‘Not Available’ and ‘Withdrawn’ rule?

  • ‘Not Available’ invalidates the rule only in the current version, where as the ‘Withdrawn’ invalidates the rule in the current version and lower versions in the same ruleset.
  • Mostly we use ‘Not Available’ only in development environment and don’t promote those to higher environments, where as the ‘Withdrawn’ rules can be moved to higher environment πŸ™‚

d) Blocked

  • Selecting this option will not invalidate the blocked rule for rule resolution. Still the blocked rule is right candidate and if the rule gets picked by rule resolution, then the process returns not found.

When do you block a rule?

  • Say for example, Amazon needs to stop their online electronics sales for a particular country. It can be resumed in later point of time. In this case you can block the respective rules. The rules just throw the error to end user.
  • In development environment, If you didn’t complete the entire development, you can block the corresponding rule till then.

Let’ test a blocked rule.

Step 1: Save As the child activity and make the availability to ‘Blocked’.


Step 2: Check in the user portal. Trace it.

You can see the exception thrown. Since we are testing it using button call, it never stops flow processing(kind of local action). So let’s test by using the activity in flow action post processing activity.

Step 3: Open the flowaction – add the ‘ParentAvailable’ activity in Post-processing activity.

step 4: Now submit the flowaction in user portal.

You can see the error thrown. the process is blocked πŸ™‚

e) Final

  • On Selecting this option, you are making a rule as final rule. You cannot override a final rule in another ruleset.
  • When you try save as the rule, you will get an error.

Note: You can save as the Final rule in the same ruleset in higher versions πŸ™‚

When do you make a rule final?

  • In my point of view, Pega introduced the ‘Final’ availability to restrict developers updating the core designer studio engine rules.
  • If you are sure that the rule cannot be reused in any other rulesets. It means you will never Save As the same rule to use in other rulesets ( We use it rarely πŸ™‚ )

For example: You can check underlying sections in any rule form header. Pega makes the sections, rules final, because they don’t want us to update those in rules in our application rulesets.

Let’ test the final rule availability

Step 1: Open any final rule OOTB rule.

Section – RuleFormHeader

Step 2:Β Try Save As the rule inΒ  your application ruleset.

It means you cannot copy a Final rule in different rulesets πŸ™‚

We can try copying a final rule in same ruleset higher version

Step 1: Open the child activity and set the availability to β€˜Final’.

Step 2: Now try Save As in the next ruleset version 01-01-02.

You are able to make a copy only in the same ruleset higher versions 😊

What are the things to remember?

  • Rule availability: Available – Rule is always ready to run
  • Rule availability: Not available – Rule is not available to run. Rule resolution invalidates the rule.
  • Rule availability: Withdrawn – The withdrawn rule as well as the lower versions in the same ruleset are not available to run
  • Rule availability: Blocked – the blocked rule throws exception when it runs. Rule resolution don’t invalidate the rule
  • Rule availability: Final – You cannot specialize the Final rule in other rulesets. You can Save As only in higher versions in same ruleset.


93 thoughts on “What is rule availability in Pega?

    1. Thank you so much, Raghav. πŸ™‚
      I’ll keep on posting for sure. Glad to know that you like it. πŸ™‚

  1. Very good explanation. Can u please give more explanations with real time scenarios. And one more request pl can u explain all the topics by creating an example application.

    1. Thanks for your comments, Swapna. Once I complete some important topics, I will connect all dots by creating a sample application.

    1. Thank you so much for your encouraging words, Rama krishna. πŸ™‚
      Yeah bro, I will definitely keep on posting.
      It is my pleasure bro. πŸ™‚

  2. Good work Prem… πŸ™‚ The explanation given is simple and easy to understand. Keep doing this work… Very helpful for learning guys like me πŸ™‚

    1. Thank you so much for your encouraging words, Ashwini. πŸ™‚
      Happy to hear that you find it useful. Yeah, I’ll keep on posting new stuffs. πŸ™‚
      Stay tuned. πŸ™‚

  3. Very Nicely Explained . Keep the Good work.

    Can you please explain Cover ,Folder and also their locking and other dependency features on Cover ,Folder and Work Object.
    It will be great help.


    1. Thank you so much, Pradeep. πŸ™‚
      Yeah sure, Pradeep. I’ll keep on explaining with real time cases.

    1. Yeah sure Veera. I will try to make a post on commonly used OOTB activities.

      Meanwhile you can check the main OOTB activities in the below path

      Designer studio -> Process and rules -> Processes -> API s

  4. Hi Prem,

    Great blogs on rule availability.

    Can you please clarify one thing – blocking a rule means is it block for specific ruleset or all ruleset?

    1. Hi Vasanth,

      Sorry for the late reply.
      I hope you meant to ask for specific version or all versions.
      It is always specific to a particular version alone πŸ™‚

  5. Excellent portal to go through Pega in simple words with superb examples. Keep up the good work Prem. Will be looking for more and more posts.πŸ˜ƒ

    1. Thank you so much for your appreciation, Bhanu. πŸ™‚
      Glad to hear from you. πŸ˜€
      Stay tuned for more posts. πŸ™‚

  6. Nice Explanation Prem. Your posts are very useful. Thanks for the posts. Can you please post an article on Page context in activities ?
    Thanks inadvance.

    1. Thank you so much for your appreciation, Charan. πŸ™‚
      Glad to hear that you find my posts useful. πŸ™‚
      You are most welcome. πŸ™‚
      I’ll explain about Page context in upcoming posts. Stay tuned. πŸ™‚

    1. Thank you so much for your appreciation, Rajesh. πŸ™‚
      Stay tuned and I’ll keep on updating. πŸ™‚
      You are most welcome, Rajesh. πŸ™‚

  7. Superb work prem!!. This post help me a lot in understanding rule availability concept .

    Can you please post on Case Management?

  8. Excellent Explanation with best Examples, I never see such explanation before, I am Pega beginner can able to understand now.
    Thanks for the Posts.

    1. Thank you so much for your appreciation, Archana. πŸ™‚
      Glad to hear that you are finding it useful. πŸ™‚
      You are most welcome. πŸ™‚

  9. Hi Prem.. Great Job πŸ™‚

    I have activity ABC define in Ruleset A and Ruleset B.
    No blocking the activity ABC in Ruleset A. During run time will it pick activity ABC defined in ruleset B ?

    Thanks in Advance πŸ™‚

    1. Hi Manish,
      This is very simple. It is based on ruleset assembly.
      If Ruleset A comes over Ruleset B, then at runtime It will throw blocking error.
      If ruleset B comes over ruleset A, then at runtime it runs without error.

      Blocking is always version dependent.

  10. Hi Prem,
    I am new to Pega and looking for opportunity in Pega. I referred may material on youtube. they are not as useful as you content. These are really helping me as well as people like me to understand Pega.

    1. Hi Ajay,
      Thank you so much for your appreciation. I’m so much glad that my posts helped you a lot.
      You are most welcome. πŸ™‚

  11. HI Prem,

    This is really helpful for the beginner , awesome explanation . I appreciate and thanks for the write ups.


Leave a Reply

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