What is Rule Availability?
Rule Availability helps in managing rules. They can determine whether the rule is available for processing or not.
Why Rule Availability
There are many situations to use rule availability, let us consider an example for any application that you are developing may consists of different rules like Activities, Flows, When Rules, etc. if you don’t want to use a particular rule, then you can make that particular rule as not available for your application.
Types of Rule Availability in PEGAÂ
There are 5 different types of Rule Availability’s defined in PEGA as follows. Let us discuss in detail about all types in this post.
- Available
- Not Available
- Withdrawn
- Blocked
- Final
1.AvailableÂ
As a name indicates, any with this option is always available to run.PRPC picks the highest version rule from the current class and you can save as rule from one ruleset to another ruleset.
 2.Not AvailableÂ
By using this option we can make any rule not available for a particular version, takes the rule from the next highest previous versions.
ExampleÂ
Let us consider that we have 2 rules here as 01-01-01 and 01-01-02, as by default page picks the highest version to run always, now for our scenario it runs 01-01-02 version, any rule in 01-01-01 makes as not available, will run on 01-01-02 version.
3.WithdrawnÂ
When the rule availability is withdrawn proc ignores the processing of all versions the rule in that class and proceeds in the class hierarchy and processes them from the parent class. or When we select any rule availability as withdrawn, the rule is going to skip the rule resolution, which, means the rule resolution will not consider the withdrawn rule and its lower versions.
ExampleÂ
Let us consider a sample activity TechNaandi is present in the 01-01-01 version and you have updated the same activity in the 01-01-02 version, and you have withdrawn the activity on 01-01-02 version. While you are running your application, this activity will not be considered for 01-01-01 and 01-01-02 versions.
4.BlockedÂ
PRPC stops processing the blocked rule and throws an error message.
 ExampleÂ
Lets us consider an example, that any bank needs to stop the transactions for a particular country for a particular period of time. In such a scenario we can block the respective rules, then when any user tries to use it’s just throw an error to the user.
5.Final
It is available for processing PRPC picks the highest version rule from current class but we cant save as the rule from one ruleset to another ruleset.Â
Thanks for your support we will provide more tricks & tips for you. If you like our tricks, share these with your friends and join my Telegram Channel , WhatsApp Channel And Youtube Channels for more new tricks & tips.