How to refactor RuleSet Versions
Use the RuleSet Maintenance wizard to move RuleSets, and copy or move RuleSet versions, into a target RuleSet or RuleSet Version.
- Copying creates the target rules and leaves the source rules unchanged.
- Moving creates the target rules and then deletes the source rules.
Moving a RuleSet
When you move a RuleSet, you 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 rules' pzInsKey does not change.
The handling of multiple RuleSet Versions in the RuleSet depends on whether you specify a target version:
- If you move a RuleSet without specifying a target version, the source RuleSet Versions are preserved, renamed, under the Target RuleSet.
- 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, renamed, 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.
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, any of the following non-versioned rules associated with the RuleSet are also moved:
You cannot copy a RuleSet.
Copying or Moving a RuleSet Version
Copying a RuleSet Version performs the same function as Save As in the Process Commander portal. The original source RuleSet Version still exists, unchanged. Each target rule that is created is identical to the original source rule with the following exceptions:
- You must specify a RuleSet Version for the target rules that is different than the source rules.
- The wizard creates a new pzInsKey field value for the target rules using the actual create date/time as one of the values in the construction the new target pzInsKey. The create date/time value is the only difference between the data that makes up the source and target pzInsKey values.
As with the RuleSet, moving a RuleSet Version changes the source rules. The 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 Version, and copied into the target RuleSet Version.
In a Move, the value of the rules' pzInsKey does not change.
Note: When moving a RuleSet Version the non-versioned rules are not modified. To move the non-versioned rules you must move the entire RuleSet, as described above.
Merging RuleSet Versions
You can merge multiple source RuleSet Versions, belonging to the same or different RuleSets by copying or moving them into a single target RuleSet version. 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:
- 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 in the second RuleSet Version in the list are processed and dropped from the following versions.
- Processing continues in the same way down the list of versions.
For both move and copy 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.
Locked RuleSet Versions
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. For example, 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.
Checked Out Rules
As a best practice, make sure that all rules are checked in before you move or copy a RuleSet or RuleSet Version. Select View > Rules > All Checkouts to list all rules checked out.
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.
Before You Begin
Before running the RuleSet Maintenance wizard, consider the following guidelines:
- Backup your Process Commander system before performing operations with this wizard.
- You can only copy or move RuleSets or RuleSet Versions that are in your RuleSet List.
- Make sure the rules that will be modified by the operation you specify are unlocked and checked in. As described above, the wizard will warn you if it encounters locked or checked-out rules during the copy or move, but it is a best practice to make sure that all the rules you will operate on are unlocked and checked in before running the wizard.
For Move operations, the source and target rules, if they exist, must be unlocked and checked-in before the operation can be completed.
For Copy operations, the target rules, if they exist, must be unlocked and checked-in before the operation can be completed.
Completing the RuleSet Maintenance Wizard
Select Tools > Rule Management > Copy/Move RuleSet to start the wizard.
Step 1: Specify the operation to perform
- Select the Copy or Move radio button.
Copying creates the target rules and leaves the source rules unchanged. Moving creates the target rules and then deletes the source rules.
You can copy or move RuleSet Versions. You can only move RuleSets.
- Select the RuleSet or RuleSet Versions to be processed.
Select the name from Available Source RuleSet(s) and move it to the right-hand list, Order of precedence during Move/Copy. You can select and drag the object, or select it and click the right-facing arrow icon between the lists.
- Adjust order of precedence, if needed.
If you are operating on multiple RuleSet Versions, the rules 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.
- Specify a Target name and, if wanted, a version.
Enter the name of the RuleSet or RuleSet version that the selected rules should be copied or moved to. If you provide a new name, the wizard creates the target. If the target exists, source rules that also appear in the target will be processed according to setting of the overwrite True or False radio buttons.
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, renamed, 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, renamed, 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 listing.
- Specify the method to resolve rule conflicts, overwrite or skip.
If you select True, source rules that duplicate target rules will replace the target rules in the processed RuleSet. If you select False, source rules that duplicate target rules will not be processed, and the target rules will be left unchanged.
Click Next to continue.
Step 2: Confirm the operation
Use this page to confirm the copy or move operation you have specified. Be sure that
- You have selected Copy or Move as intended.
- You have specified the correct target RuleSet or RuleSet Version.
- You have specified the correct source RuleSet or RuleSet Version(s).
- You have selected the response to rule conflicts between the source and target as intended: overwrite or not.
If you are satisfied with this operation, click Nextto begin the processing.
Step 3: Review Locked RuleSets
If the wizard finds rules to be modified in locked RuleSets or locked RuleSet Versions, the wizard displays a list of the locked RuleSets or RuleSet versions with a Password field for each.
- To continue, provide the password to unlock each RuleSet or RuleSet Version and click Next . The wizard unlocks the RuleSet version, operates on the rules as specified, and then relocks the RuleSet.
- If you cannot provide the passwords, click Cancel to exit the wizard, arrange to unlock the rules in Process Commander, and then rerun the Rule Maintenance wizard from the beginning.
Step 4: Review Checked-out Rules
If the wizard finds that rules to be modified are checked out, the wizard displays a warning page with a link to a report of the checked out rules. Click Display to open the report. From the report window you can open the rules or click Export to Excel to save a list of the rules in a spreadsheet.
Use the report window to review the checked out rules. Check in any rules you have checked out and arrange for any rules in the report that are checked out by other users to be checked in.
When all rules are checked in, click Next to continue.
You cannot proceed with checked out rules. If you exit the wizard to arrange for rules to be checked in, restart the wizard from the beginning.
Step 5: Review the changes
This page displays a summary of the changes that have been made including the number of rules considered and selected, and a list of each rule processed. The Status column displays the result of the operation for each rule.
To review the listing in more detail and save a copy, click Export Page to Excel.
Click Done to close the wizard.