Post-skimming rule deletion
Here's a situation that you might find useful when working with rules in Pega 7.
Scenario:
I want to get rid of rules that have been skimmed to a new, higher version of Pega 7. How can I delete rules in PRODUCTION post skimming?
Solution:
Be careful about deleting entire rulesets or even version-by-version.
Skimming only skims versioned rules.
Non-versioned rules, such as Rule-Obj-Class, and Rule-Access-Role-Object, remain in the version in which they were created.
Ruleset versions can be deleted if they are known to not contain non-versioned rules. However, there is a better way to achieve the desired result as explained below.
- Within the DEVELOPMENT environment, define a Product Rule for an Application that does not package every rule. Instead, the Product Rule only mentions the skimmed-to version for rulesets that have been skimmed.
- Create a Package jar using the Product Rule then import it into a new database. This effectively “deletes” every versioned rule less than the skimmed-to version in every ruleset that was skimmed.
- Test the result against pre-existing production-like data.
- Within the PRODUCTION environment, leave the DATA schema and current RULES schema intact.
- Create a new RULES schema, and then import the rules from (1) into it.
- Point to the new RULES schema.