Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

How to Skim, Compress, Merge, Copy and Delete RuleSets with the RuleSet Maintenance Wizard

Updated on September 10, 2021

Summary

Use the RuleSet Maintenance wizard to perform routine RuleSet tasks, such as skimming or compressing RuleSet versions, merging several RuleSets into one, and deleting unneeded RuleSets.

For instructions on moving RuleSets, or on copying, moving or merging RuleSet Versions, see How to Refactor RuleSet Versions.

Actions such as renaming, moving, merging and deleting may have unintended consequences. It is important to back up the rules in your application to a ZIP archive before making changes that may put them at risk.

Quick Links

Skimming

Skimming creates a RuleSet version containing the highest version of existing rules. For each rule instance in a specified RuleSet, the wizard identifies the highest-numbered version and creates a copy with an even higher number that you specify.

Notes:

  • Skimming affects rules with availability Yes, No/Draft, Withdrawn, Final, and Blocked.
  • Only users with access to the @baseclass.zipMoveSkim privilege (included in the standard access role PegaRules:SysAdm4) can skim RuleSets.
  • If the target RuleSet version (which will contain the result of the skim process) you specify already exists, it must be unlocked for the process to succeed. If it does not exist, the wizard creates it.
  • After you create a new RuleSet Version, you may need to update application rules or access groups to make the new version available to users.

Skim Up (Major version)

For a major skim, the wizard uses the number you specify as the major part of the target version, and sets the target version's minor and patch values to "01".

  1. Select Tools > Rule Management > Skim a RuleSet...
  2. In the form that appears, with the Major Version RuleSet Skim radio button selected, choose a RuleSet and major version as the source, and specify a two-digit number for the new major version.
Normally, increment the current major version number by 1. You can choose any higher number up to 99. Jumping to a high number may restrict your ability to conduct future development.

major skim

Although the From Major Version field uses a picklist, the only item that appears is the major version part of the RuleSet you select.
  1. Click Skim. When the process is complete, the form displays the number of records moved and skipped. If errors occurred, click the Total Number of Errors link to see a detailed error report.
    skim complete

Skim Up (Minor version)

For a minor skim, the wizard carries forward the major version of the source RuleSet version and uses the numbers you specify as the minor and patch parts of the target version.

  1. Select Tools > Rule Management > Skim a RuleSet...
  2. In the form that appears, with the Minor Version RuleSet Skim button selected, choose a RuleSet as the source and, from the two picklists showing all the patch versions within that minor version, select the lowest and highest versions the wizard will examine Then provide a target version in the To New Version field.
    minor skim
  3. Click Skim. When the process is complete, the form will display the number of records moved and skipped. If there were errors, the Total Number of Errors listing will be a link to a detailed error report.

After skimming

When your skim operation is complete, lock each of the source RuleSet versions on its Security tab. This ensures that developers can add or update rules only in the newly-created version.

Compressing

Compress Down

It is sometimes useful to compress multiple versions of a RuleSet down into one version, and to discard the source versions. For instance, if a series of development efforts have left a confusingly-large number of RuleSet versions, you may want to consolidate them.

  1. Select Tools > Rule Management > Copy/Move RuleSet. The RuleSet Maintenance wizard appears.
  2. Select the Move radio button, and then move into the right-side box the RuleSet versions you want to compress. Do not include the target version in this list.
    selecting source RuleSets
    Order is significant. When the compression occurs, the wizard inspects the RuleSets in the list at right in order, starting at the top, and collects the firstversion of each rule it finds, except as described below. Duplicate rules are discarded. When processing is complete, the wizard deletes the source RuleSets.

    Compress RuleSets with prerequisites beginning with the RuleSet of first dependency. For example, if RuleSet A has RuleSet B as a prerequisite, and RuleSet B has RuleSet C as a prerequisite, the order in which you should compress the RuleSets is A, B, and C. If you compress the RuleSets in the order C, B, and A, you risk losing some rules.

  3. On the right side of the form, specify the target RuleSet version. If you select an existing RuleSet version as the target, it must be unlocked and with all rules checked in for the process to succeed. Set conflict resolution to True so that the rules selected from the higher-numbered versions will overwrite the versions in the target RuleSet version.
    overwrite
  4. Click Next. A review screen appears. When you are satisfied with your settings and selections, click Next.
  5. When the process completes, a report shows the number of rules compressed into the target RuleSet version, and the source versions are deleted.

Merging

Merge RuleSet versions

You can merge versions of multiple RuleSets into a new RuleSet. This can be useful when improving the organization of your application, and to promote rule reuse.

  1. Select Tools > Rule Management > Copy/Move RuleSet. The RuleSet Maintenance wizard appears.
    ruleset maintenance wizard
  2. Select the Copy or Move radio button.
    • If you select Copy, the source RuleSets you choose will not be affected.
    • If you select Move, after the highest version of each rule is copied out of the source RuleSets into the target RuleSet, the source RuleSets are deleted.
  3. Select one or more RuleSets from the list at left and move them to the list at right. These are the RuleSets that will be processed. When processing begins, the wizard inspects the RuleSets in the list at right in order, starting at the top, and collects the first version of every rule it finds. Duplicate rules within the RuleSet Versions in the list are ignored, not copied to the target.
  4. At the right of the form, provide the name of a target RuleSet and version to receive the copied rules. Also specify how the wizard is to handle conflicts -- whether a source rule will overwrite a copy of the a rule that already exists in the target RuleSet.
    target for merge
  5. Click Next. A review form appears.
    review page
  6. If all is as you want, click Next.
  7. When the process completes, a report appears. You can review the list of rules that were copied to their new location and those that were skipped. You can export this summary for further review. When you are finished, click Done.

Copying

Copy a Version of a RuleSet to another RuleSet name

To copy the contents of a RuleSet version to another RuleSet name:

  1. Select Tools > Rule Management > Copy/Move RuleSet.
    1. Move from the left box to the central box the RuleSet version you want to copy (the Rule Management wizard allows you to copy versions, but not full RuleSets). Select the Copy radio button.
      ruleset to copy
    2. On the right side of the form, specify the name and version of the RuleSet you wish to copy to. Specify whether source rules are to overwrite any existing rules in the target RuleSet.
    3. Click Next. A review form appears. If all is as you want, click Next.
    4. When the process is complete a report will appear. You can review the list of rules that were copied and those that were skipped. You can export this summary for further review. When you are finished, click Done.

Deleting

Delete RuleSet(s)

You can delete from your application an entire RuleSet or a RuleSet version. Make sure that the RuleSet or RuleSet version you want to delete is has no rules checked out, is unlocked, and not in use.

  1. Select File > Export Archive (zip)... to save a copy of the RuleSet you intend to delete (in case your plans change and you need to recover it.).
  2. Specify the RuleSet and, optionally, the version to save in a zip file, a the name for that file.
    exporting
  3. Click Create Zip File. You can re-import the RuleSet from the zip file if you later need to undo the deletion.
  4. Select Tools > Rule Management > Delete a RuleSet. In the form that appears, specify the RuleSet and, optionally, the version to be deleted.
    specify RuleSet version to be deleted
  5. Click Delete. When the deletion is complete, the application displays a list of rules which may reference the deleted RuleSet or version. You may need to revalidate these versions.
    deletion report

Next steps

Revalidating

After using the maintenance tools to make significant changes to RuleSets or versions, it is a good idea to revalidate and save the whole application to catch any errors that your changes may have created.

Revalidation can confirm that nothing in the current environment has become invalid due to your recent actions.

You can force revalidation in bulk of selected rule or data instances of a single rule type. The operation is similar to opening and then saving each instance of a selected rule or data type in a RuleSet version.

  1. Select Tools > Revalidate and Save.
  2. Complete the form, specifying the rule or data type, and the RuleSet version the process is to work on.
  3. Click Run to begin revalidation.
  4. The tool marks valid rules or data instances with a checkmark. A red X marks rules not valid. Hover the mouse pointer over the red X to see the error message. Click the pencil icon to open the instance and address the error.

For a more detailed procedure, providing you with more granular control of the rules to be revalidated, see How to revalidate all rules in a RuleSet.

Undo an Error

If you realize that you have deleted a RuleSet or RuleSet version in error, it is easy to recover it. The deleted RuleSet is saved in a file called "RuleSetName_RuleSetVersion_DELETE.zip" in the explicit temporary directory.

  1. Select Tools > Rule Management > Delete a RuleSet.
    restoring
  2. Specify the RuleSet and Version you want to recover, and click Restore.

You can also reimport the zip file of the RuleSet or version that you saved before deleting it.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us