About the Ruleset Maintenance wizard
The Ruleset Maintenance wizard helps you copy rulesets and ruleset versions into new
versions, merge several ruleset versions into one version, move rules out of one ruleset into
another, or change a ruleset version's number.
Operations of this wizard depend on the
Pega-RuleRefactoring agents. If you
use this wizard, confirm that the
Pega-RuleRefactoring
agents are enabled
on at least one node of your system.
To move a ruleset, select an existing ruleset and specify a target name and, optionally, a
version. The wizard processes the source rules in each ruleset version in the ruleset and
any non-versioned rules associated with the ruleset. The
RuleSet
and
RuleSet Version
fields of each rule are updated to the values
specified as the target. The result is that the rule appears to have been deleted from its
source ruleset and copied into the target ruleset. The value of the rule's
pzInsKey
does not change.
The handling of multiple ruleset versions in the ruleset depends on whether you specify a
target version: For example, if you move a ruleset containing rules with ruleset versions 01-01-01,
01-01-02 and 01-01-03 into a new target ruleset and specify a version of 01-02-01, the
target ruleset version will contain the highest version of all the source rules contained in
versions 01-01-01, 01-01-02 and 01-01-03 with lower-versioned duplicates dropped. In this
example, if a rule is duplicated in both 01-01-01 and 01-01-02, the rule will be moved from
01-01-02 to the new ruleset name with ruleset version 01-02-01, and the duplicate rule in
01-01-01 will be dropped. When you move a ruleset, the wizard also updates the references to affected ruleset
versions in the following rules or data instances anywhere in the system, so they reference
correctly the versions that exist after the move: You cannot copy a ruleset. Copying a ruleset version performs the same function as the Save As toolbar action. The
original source ruleset version does not change. Each target rule that is created is
identical to the original source rule with the following exceptions:
As with moving a ruleset, moving a ruleset version changes the source rules. The wizard
updates the
RuleSet Version
fields of each rule to the values
specified as the target. The result is that the rule appears to have been deleted from its
source ruleset version, and copied into the target ruleset version. In a move, the value of
the rule's
pzInsKey
does not change.
You can merge multiple source ruleset versions belonging to the same or different rulesets.
For example, you can "skim" the ruleset by collecting only the highest version of every rule
in the ruleset versions into the target, or you can compress the rulesets down to a lower
level (01-01-01) or another designated level. You control the merge by specifying the target
version and the order in which the ruleset versions will be processed. When you select the ruleset versions, you establish the order of precedence by the order in
which you list them in the wizard interface. The wizard processes the rules in the order
listed, top-to-bottom, collects the first version of every rule it finds, and drops other
duplicate rules: When you merge rulesets or ruleset versions, you have the option of deleting the sources
once the merge is complete. However, if you merge ruleset versions and opt to delete the
sources, the source versions are deleted, but not their ruleset(s). When you merge ruleset versions, you have the option of excluding categories of
non-versioned rules. The categories are listd at the bottom of the form. Clear the check box
to exclude a category.
For an example of the merge operation, see the
Pega Community
article
How to merge RuleSets using the RuleSet Maintenance wizard.
You can change the version number for a particular ruleset version, whether or not the
version which you designate as the new number already exists. The target version belongs to
the same ruleset as the source version. All rules, including non-resolved rules, from the
source ruleset version become part of the target version. All rules retain their original
pzInsKey
values, and therefore retain their History.
When the change is complete, the wizard deletes all rules in the source version. For move, copy, and change operations, you can specify how to handle conflicts if the same
rules are found in both the source and the target. You can choose to overwrite the target
rules with the source rules, or to not move or copy the source rules that conflict, leaving
the target rules unchanged. If you choose not to overwrite the rules, the Summary page of
the wizard lists the rules in the source that were skipped because they were in conflict
with the target. The wizard does not change rules that belong to locked ruleset versions. If a ruleset
version that will be changed by the wizard operation is locked, you are prompted for the
password to unlock the version before proceeding. To copy a ruleset version the target rules
cannot be locked. The source rules can be locked, since they are not changed by the copy
operation. To move a ruleset or ruleset version, both the source and target rules must be
unlocked.
As a best practice, make sure that all rules are checked in before you move or copy a
ruleset or ruleset version. Click
If the wizard encounters rules to be modified that are checked out, it displays a warning
page and provides a report of the checked-out rules. From the report window you can open the
rules and check in the ones for which you have permission, or save a list of the rules in a
spreadsheet. You must check in any rules you have checked out or arrange for any rules in the report
that are checked out by other users to be checked in before you can complete the wizard. If
you exit the wizard to arrange for rules to be checked in, you must restart the wizard from
the beginning. The wizard automatically adjusts any references to ruleset versions in the following rules
or data instances, system wide, to match the versions that exist after a merge or move: Before running the RuleSet Maintenance wizard, consider the following guidelines: When you are working with ruleset versions, the Copy missing RuleSet Prerequisites check
box appears at the bottom of the first form of the wizard. Select this check box to have the
wizard copy any prerequisite rulesets that the ruleset version that results from your
process will require.
Select the
Dev Studio
>System > Refactor >RuleSets
menu item, then click
Copy/Merge RuleSet
to start the wizard. Then select the operation
you wish to execute.
For help in completing the first form, see
RuleSet Maintenance
wizard. This wizard does not modify references to rulesets that are deleted or modified. Repair any
references to rules that have been moved by the wizard by replacing references to the source
ruleset with the target or another ruleset. In particular, - Application RuleSets section on the General
tab - Component and Shared RuleSets section on the General tab - Production RuleSets section on the General tab
Each execution of this wizard creates an instance of the
Log-Merge-RuleSet
class, including error messages or other results. The
key to this instance is the date and time the wizard was started.
Class rules do not have a version. Do not delete Class rules (or other rules that have no
version) if any version of the ruleset remains in use. In some organizations, audit or compliance policies might prohibit deleting old rules, even
if they are not in use. The RuleSet Maintenance wizard helps you copy rulesets and ruleset versions into new
versions, merge several ruleset versions into one version, move rules from one version into
another, and change a version's number. For Copy operations, the target rules, if they exist, must be unlocked and checked in
before the operation can be completed. Source rules should be checked in. For Move operations the source and target rules, if they exist, must be unlocked and
checked in before the operation can be completed. For Change a Version operations, the source rules should be checked in. The wizard uses the full-text search indexes to reduce search time and increase accuracy.
If full-text search for rules not enabled for your system, the process may operate much more
slowly, and may not locate all data instances that may need to be updated. When you are working with ruleset versions, the Copy missing RuleSet Prerequisites check
box displays at the bottom of the first form of the wizard. Select this to have the wizard
copy any prerequisite rulesets that the ruleset version that results from your process will
require. For a checklist of other prerequisites and preparation steps, see About the
RuleSet Maintenance wizard. Select one of the four radio button options: Copy, Move, Merge, or Change a
Version. Copying creates the target rules and leaves the source rules unchanged. Moving,
merging, and changing create the target rules and delete the source rules. You can perform all four operations on ruleset versions. You can only move or merge
rulesets. Select the ruleset or ruleset versions to be processed. Select the ruleset or version from the left-hand list, Available Source RuleSet(s), and
move it to the right-hand list, Order of precedence during Copy/Move/Merge. You can drag
your selection, double-click it, or select it and click the right-facing arrow icon
between the lists to move it. Adjust order of precedence, if needed. If you are operating on multiple ruleset versions, they will be processed in the order
listed, top-to-bottom. That is, rules are first processed from the first ruleset version
listed and duplicate rules in the following versions in the list are dropped. Then any
remaining rules are processed in the second ruleset version in the list and dropped from
the following versions. Processing then continues in the same way down the list of
versions. To move a version higher or lower in the list, select it and then click the up
or down arrow. You can also click a selection and drag it to a higher or lower position
in the list. Specify a Target name and, if wanted, a version. Enter the name of the ruleset or ruleset version that the selected rules are to be
copied, moved, or merged into; or the new version number for the ruleset version. If you
provide a new name, the wizard creates the target ruleset. If the target exists, source
rules that also appear in the target are processed according to how you set the
Overwrite.option (see the next step). If you move a ruleset and specify a target version, ruleset versions in the source
ruleset are merged by skimming the rules to the specified version under the Target
ruleset. That is, the highest versioned instance of each rule in the source ruleset
versions is moved to the target ruleset and specified ruleset version. If you move a ruleset without specifying a target version, the source ruleset versions
are preserved under the target ruleset. If you copy or move a ruleset version, you must provide a target version. If you copy
or move multiple ruleset versions, they will be merged into the target version following
the order in which you have listed them in the Order of precedence... list. Note that when you change a ruleset version number, the source and target ruleset names
must be the same. For Copy, Move, and Change, specify the method to resolve rule conflicts. If you select When you merge ruleset versions, a display at the bottom of the form shows categories
of non-versioned rules, and the number of rules of each type affected by changes to the
ruleset versions you have selected and placed in the second list. You can exclude any
category by clearing the check box to the left of its name. On this page confirm that the selected operation is as you have specified. Be sure that: The page displays a list of data instances that may be affected by the procedure. Select all entries that you want to update so that they will continue to work with the target ruleset or ruleset version.
You have the option of running the wizard as a background process: this can be useful when moving or merging rulesets containing a large number of rules, as the process may take several minutes to complete. To select this option, click the
The
Pega Platform
sends an email notifying you when the process is complete. If no email server has been set up for the
Pega Platform
and you select this option, a message appears stating that an email will be sent once you set up an email server.
You can still run the wizard as a background process, but if outbound email is not set up, the
Pega Platform
cannot send you an email when the process completes. The wizard form provides you with the ID of the process so you can review it at any time, and displays a message at the end of the process: see
RuleSet Maintenance Wizard 3.
Depending on the process you selected in the first screen, the continuation button's label will read
Copy,
Rename Version, and so on. If you are satisfied with the settings, click the button to begin the process and to continue to the next step. See
RuleSet Maintenance wizard 3.
To change any of the settings, Click
<<Back
to return to the previous step.
Click
Cancel
and then click
Done
to cancel the wizard.
If you opted to run the wizard as a background process, a message displays on the page stating that your request is being processed and that you will receive an email notification once it has completed.
Place the provided reference number in the
Search facility
and click the magnifying glass. The facility opens the wizard at its current form so you can check its status.
When the process is complete, this form displays a summary of the changes that have been made, including the number of rules considered and selected. Depending on the process and the options you selected, up to four links provide access to lists of If there were no data instances to process, errors, or conflicting rules, the corresponding links do not appear.
Click any link to display the list. In the report that is displayed, you can click any row to review that rule in detail. To save a copy of a list in spreadsheet form, click
Export Page to Excel
at the top of the list.
After you have closed any reports you have opened, click
Done
to exit the wizard.
If the wizard finds rules to be modified in locked rulesets or locked ruleset versions, this form displays a list of the locked rulesets or ruleset versions with a Password field for each.
If the wizard finds that rules to be modified are checked out, this page displays a warning. Click
Display
to open a report of the checked-out rules. From the report window you can open the rules or Click
Export to Excel
to save a list of the rules in a spreadsheet.
You cannot proceed while rules to be modified are checked out. Check in any rules you have checked out and arrange for any rules listed as checked out by others to be checked in. When all rules are checked in, click
Next>>
to continue.
If you exit the wizard to arrange for rules to be checked in, you will need to restart the process from the beginning.
Click
<<Back
to return to an earlier step, or click
Cancel
and then click
Done
to cancel the process and exit the wizard.
Moving a ruleset
Copying or moving a ruleset version
Merging rulesets and ruleset versions
Changing a ruleset version number
Rule conflicts
Locked ruleset versions
Checked-out rules
Affected rules and data instances
Prerequisites and preparation
Starting the wizard
Recommended next steps
Recovering merged rulesets
Logging
RuleSet Maintenance wizard step 1
Preparation and prerequisites
Completing the form
Yes
, source rules that duplicate existing target rules
replace the target rules in the processed ruleset. If you select No
,
source rules that duplicate existing target rules are not processed, and the target
rules are left unchanged. Yes
to delete the sources;
No
to retain them. If you are merging ruleset versions and opt to
delete the source versions, their parent rulesets are not deleted. RuleSet Maintenance wizard step 2
Yes
radio button beside the Run as a background process label.
RuleSet Maintenance wizard step 3
RuleSet Maintenance — Locked Rules
RuleSet Maintenance — Checked-Out Rules
Previous topic Deleting a ruleset Next topic Production rulesets