How can we manage the order of rules getting saved while copying rules from Higher RSV to lower RSV?
This is a query regarding a difficulty I am facing in moving rules in bulk from one RSV to another.
I have built a Rule Movement tool that will allow user to select the Ruleset & Rulesetversion (Ruleset can be specified as ALL) & then list all the rules based on the selection. I also provide filter options to allow developers to select rules updated by them or belonging to a specific user story, date updated etc
Once the developer makes his/her selection (by ticking checkboxes) then clicking on Copy rules button will loop over the selected results & call Rule-SaveToNewVersion.
When we move rules from higher RSV (say 01-01-99) to lower RSV (say 01-01-51), sometimes the activity rule may get copied before a property rule that it is referencing. If the property rule is created newly in v99 then activity doesnt get copied to lower version due to the dependency.
Is there a workaround by which
1. We can ignore the validations done by Pega in order to not throw these dependency errors?
2. Is there an easy way we can sequence the rule copy so that all the child rules are saved first & then the parent rules?
How does Pega handle this scenario while importing rules / in Copy Ruleset option in Refactor Rulesets landing page?
Any help would be greatly appreciated.
***Moderator Edit-Vidyaranjan: Updated SR details***
I did try tracing the Rule Refactor wizard as well but it executes a lot of complicated java steps & it is extremely difficult to follow the logic as a whole. So was wondering if anybody has done this before then I wont have to reinvent the wheel :) :)