How to Delete a RuleSet in Pega 7

A rule set in Pega 7 can be deleted from the system within the Designer Studio using the Delete a RuleSet Wizard.

Summary

  1. Quick Look at Sample Rule Set to Delete
  2. Delete the Sample Rule Set with the Wizard

Related Posts

The screen shot below shows an example of an application’s rule set stack. The highlighted Rule Set ProductCatalogSOAP:01-01-01 was created using the SOAP Integration Wizard. For an example on this topic, please refer to the post Example of Pega 7 SOAP Web Service Integration on this blog.

1_RuleSet_Stack

  • The rule set in this example contains 34 rules, clicking on the rule count (34) in the ALL RULES column shows all rules included in the rule set:

2_RulesInRuleSet

Before attempting to delete a rule set, make sure that:

  • None of the rules in the rule set version that is to be deleted are in use.
  • No access group references the rule set version to be deleted.
  • Review rules (listeners, activities etc.) that may reference service rules that will be deleted.
  • No other rule set versions depend on the rule set to be deleted (prerequesites).

To delete the Rule Set, navigate to DesignerStudio > System > Tools > Refactor Rule Sets > Delete a Rule Set.

3_DesignerStudio_Navigate_DeleteRuleSet

  • In the Original Rule Set text field, enter the name of the rule set to be deleted.
  • The magnifying glass icon can be used to search for the rule set in a list.
  • In this case, the name of the rule set is ProductCatalogSOAP.
  • A rule set version can be entered in the RuleSetVersion field. The magnifying glass icon shows a list of all available rule set version, in this case there is only one version, 01-01-01.

4_DesignerStudio_DeleteRuleSet_Step1

  • Click on the Delete button to start the process of deleting the rule set.
  • A progress bar shows the status of the delete operation. Once completed, the wizard shows how many rules were deleted and what rules could not be deleted, if any.

Restoring a deleted rule set: If there are other rules that reference any of the rules that are being deleted, the wizard will list those other rules. In the below screenshot, several (application) rules reference 10 rules in the to-be-deleted rule set. The message shows that out of 34, only 24 rules were deleted in the rule set. The 10 rules that could not be deleted are listed in a table.

7_DesignerStudio_DeleteRuleSet_Step1_DeleteReferencedRules

  • Since the deletion is incomplete in this case, the Restore button can be used to restore the deleted rules.
  • In this case, the 24 deleted rules are restored from a backup ZIP file, that follows the naming convention: <RuleSetName>_<RuleSetVersion>_DELETE.zip.
  • The backup file is created automatically by PRPC when a rule set is deleted.
  • In the below example, the backup file is named ProductCatalogSOAP_01-01-01_DELETE.zip.

8_DesignerStudio_DeleteRuleSet_Step1_Restore

For additional information on the Pega 7 Rule Set Delete Tool, refer to the Pega 7 Help.