I have a situation where we are in the position of cleaning up our application into module based approach.As a result it requires rule movement. The scenario is as across Assessment ruleset contains rules comprising of classes AB-Assessment-Work-WCA, AB-Assessment-Work, AB-Assessment-Data and other OOTB classes. The target architecture is to remove all
the AB-Assessment-Work-WCA rules from the Assessment ruleset. All the AB-Assessment-Work-WCA needs to be migrated to WCA ruleset. So the WCA ruleset will contain only AB-Assessment-Work-WCA rules while Assessment ruleset will contain everything apart from AB-Assessment-Work-WCA. Same structure will be implemented for integration classes as well.
Do we have any OOTB approach for this ? Please share your suggestions everyone.
Since you’re planning to move specific rules to a separate ruleset, you may use the Copy Ruleset wizard to replicate the required rules into the WCA ruleset, followed by a controlled manual cleanup of those rules from the Assessment ruleset after validation.
@AvikG Moving Application to Module based is a good approach, however do make sure than all the attributes you are using are been in that ruleset and then you should not re-use rules from AB-Assessment-Work and same for Data and Int, as if not you will still have dependencies.
I do not think OOTB there is a option to selectively move rules from one Ruleset to another, you can go ahead of copy rules to new ruleset and then delete the non wanted rules from that.
Thank you all for your response, yeah that is what our hunch is to perform a copy ruleset and then a manual cleanup, would have been good to avoid the manual cleanup process. Does anybody have any experience of using pxDeleteCaseType activity in such similar context?
pxDeleteCaseType -API to delete a work class and all associated rules and data. This will also update any references for the class.
I don’t recommend to use pxDeleteCaseType as this would delete all the rules of the Case type rule including the instances. However, you’re looking to move from one ruleset to another ruleset in your scenario (not deletion of case type)
I executed it multiple times a long time ago, which resulted in several rules being created incorrectly. Since there are so many, I’m unable to delete each rule manually.
I then executed the pxDeleteCaseType activity, and it successfully deleted the corresponding class instances, rules, and data.
There isn’t an OOTB utility in Pega to automatically migrate rules between rulesets based on the Applies To class.
The RuleSet Maintenance (Copy/Move RuleSet) wizard can copy or move entire RuleSets or RuleSet Versions to another RuleSet. It cannot selectively move rules based on their Applies To class (for example, only AB-Assessment-Work-WCA rules).
In your scenario:Move only AB-Assessment-Work-WCA rules from the Assessment RuleSet to the WCA RuleSet.
Since your requirement is class-based modularization, the RuleSet wizard won’t achieve it automatically. I will suggest the following approach:
Identify all rules whose Applies To is AB-Assessment-Work-WCA.
Use Save As (or automate it with custom scripts/utilities if the volume is large) to move them into the WCA RuleSet.
Validate references and update the application stack.
Withdraw or retire the original rules after testing.