How to change Ruleset Password when password is forgotten
Lets assume, You lock a ruleset with a password after some month you need to open that ruleset but you forgot the password. Then what we have to do??We can write one simple activity to change the password.
Actually all the ruleset details like RulesetName, Ruleset Version, Ruleset Version Password will be stored in Pega Rules Database.
So we can write one simple activity to update the password in the table .. Lets see how to do that .
Now Lets see how to open this ruleset. I dont know the password of this ruleset.
We can create activity in any class. I create my activity in TG-HRApps-Work
We have to write 4 steps to achieve this.
- Page-New - Create New page and to store all the details that we are going to process.
- Obj-Open-By-Handle - To open the ruleset instance from database
- Property-Set- To update password with new password.
- Obj-Save- To save the details in to database.
I created a page with name "RulesetRecord" and below is the pages and class tab
Ruleset version details are there in Class Name "Rule-Ruleset-Version" , So I provide this class name.
In second step we have to open the record ,
by using Obj-Open-By-Handle method.
For this method we have to provide the pzInsKey of the record to get the record
detail to clipboard.
Normally pzInsKey Structure will be like
"RULE-RULESET-VERSION
RulesetNameVersionNumber”
Now I try to open HRApps 01-04-01 so my key will be like
"RULE-RULESET-VERSION HRApps 01-04-01"
In Third step we have to use Property-Set
Here for this property we have to provide new password. My New password is “Learn”.
Then we have to use Obj-Save to save the
new password. With Write Now Enabled
Save and run the activity. Now U can open
the ruleset with new password. Old Password is replaced with New Password.
Activity Status
Now Lets Open the ruleset with New password.
Now my ruleset is Unlocked. :)
Thank You guys for reading.