Rule versions review and comparison
Inspecting and comparing rule versions helps you resolve merge conflicts, review and debug code, and audit changes that a developer made while the rule was checked out.
For example, you can compare the rule that you currently work on with previously checked out versions of the rule, branched versions, or the same rule in other ruleset versions.Depending on your needs, you can inspect and compare rules in Pega Platform in the following ways:
- Viewing changes to a specific rule on the History tab of the rule
- View changes to a rule by reviewing different versions of the rule.
For more information, see Viewing changes to a specific rule.
- Viewing versions of a rule on the Actions menu on a rule form
- View differences between the current rule and a selected version and modify
your version of the rule.
For more information, see Comparing rule versions.
- Comparing rules and rule versions with the Compare Rules tool
- Compare two different rules or two versions of a rule. The tool displays
results in a user- friendly, color-coded way. You also can use the tool to
export the results to a Microsoft Excel spreadsheet.
You can compare rules of the following types:
- Activity
- Data Transform
- Function
- Validate
- Other technical rules that are text, such as the text files, JSP, and HTML rules.
Viewing changes to a specific rule
Get quick and full insight into the changes to a rule by reviewing different versions of the rule on the History tab of the rule.
- Open the rule that you want to compare.
For more information, see Exploring rules in your application.
- On the rule form, click the History tab.
- In the History details section, click View full history.
- In the new window, click History for All Versions to display all versions of the rule.
- In the list that appears, select the Compare check box
for each version of the rule that you want to compare.
- If the current rule is checked out, to compare a rule version with the checked out version, select a version, and then click Compare With Checked Out.
- In the Differences Found report, select a rule to view the differences between the rule versions.
Comparing rule versions
Compare rule versions to resolve merge conflicts, debug code, and audit changes that application developers made during rule check out. You can compare a rule with versions of the rule from before the rule check out, with the branched versions, or with the same rule in other ruleset versions.
- In the navigation pane of Dev Studio, click Records.
- Expand the category that stores your rule, and then select a subcategory.
- In the list of rules, click the name of the rule for which you want to run the comparison.
- In the header of the rule form, click Actions.
- Click View versions, and then select the version of the rule that you want to compare with the current rule.
- View the list of differences between the current rule and the compared version.For the current rule, each list entry shows:
- The type of changes.
- The name of the changed page or property.
- For modifications, the former and current values.
- If you review rules properties that store code, use a compare tool that provides a
detailed view of changes between versions.
- Click Compare text on a difference that you want to examine
to view all the changes between versions.">
- Optional: To make changes to the current version of the file, you can edit, add, or remove text.
- Optional: To replace a change in the currently edited rule with the version of the rule that you use in comparison, click the Revert chunk icon next to the change.
- Optional: To replace all your changes with the version of the rule that you are comparing to, click the Undo all changes icon.
- After you review the changes, click Done.
- Click Compare text on a difference that you want to examine
to view all the changes between versions.
- Click the entry on the list to highlight the tab and element with the change on the current rule form.
- Optional: To see additional information about page and property changes, expand a list entry.
- If you make changes to the current rule in this view, click Save
changes to compare your revisions.
- Optional: To compare the current rule with another version, select the other version from the list in the Compare Rule header. The view is refreshed with the revised change information.
- Click Exit compare to return to the rule form.
Comparing rules and rule versions with the Compare Rules tool
Apply the Compare Rules tool to two different rules or two versions of the same rule to identify and review changes between rules. The side-by-side comparison lets you quickly find the additions, deletions, or value changes that have occurred between two versions of a rule.
- In the header of Dev Studio, click .
- Click Compare Rules.
- In the Instance #1 section, specify the first rule by
providing the following information:
- In the Rule Name field, enter the name of the rule that you want to compare.
- In the Rule Type field, click the displayed rule type and select a value from the list.
- In the Applies To field, select the class that contains the rule.
- In the RuleSet field, select the ruleset that contains the rule.
- In the Version field, select the ruleset version that contains the rule.
- Click Find.
- In the list of rules that appears, mark the Select field of the first rule that you want to compare.
- In the Instance #2 section of the new panel, select the
second rule to compare by performing one of the following actions:
- If the second rule instance that you want to compare is in the list, to select it, click the button beside the rule name.
- If the second rule instance that you want to compare is not in the list, in the new panel, repeat actions from step 3, and then, in the list of rules that appears, mark the Select field of the second rule that you want to compare.
- Click Compare >> to generate the Differences Found report.
- In a selected column of the report, click a row entry that has a change to
display the Comparison of rules form.The form displays the first selected rule in the left column and the second rule in the right column.
The differences are color-coded:
- Yellow
- The values have changed in the two selected instances.
- Green
- At least one property value in the second rule is not present in the first rule. The first selected rule is presumed to be the source instance. Consequently, the changes highlighted in green are considered additions.
- Red
- At least one property with values in the first rule is not present in the second rule. The first selected rule is presumed to be the source instance. Consequently, these changes are deletions.
If the screen displays code that includes more than one change, you can move among changes by clicking the left and right arrow keys at the top of the screen. You can also use the search field to locate a specific text string.
Browse the changes by using the scroll bars at the right of each column. Each scroll bar controls both columns, which move together to maintain the relationship between the material displayed from each rule instance.
- Optional: To save the comparison results to a Microsoft Excel spreadsheet, click Export to Excel.
Previous topic Finding rules by custom field Next topic Comparing rules by system