skip to main content
Corticon Studio: Rule Modeling Guide : Troubleshooting Rulesheets and Ruleflows : Comparing and reporting on Rulesheet differences
 

Try Corticon Now

Comparing and reporting on Rulesheet differences

Two versions of a Rulesheet can have modest changes, yet it can be difficult to see all the differences during a visual inspection of the two Rulesheets. Reporting on differences between Rulesheets provides help in debugging mistaken rule changes, and inconsistent rule definitions. For example:
*Diagnosing a Ruletest failure - When a Ruletest fails because of changes in newer Rulesheets, you can use Rulesheet difference reports to determine what changed, and then make changes to a Rulesheet to fix bad rules, or to indicate changes to make to your Ruletest expected results.
*Resolving merge conflicts - When using a source control system such as git, you may encounter situations where you want to commit a Rulesheet that someone else has changed, and discover a merge conflict. Using Rulesheet difference analysis and reports, you can see what has changed and decide how to manually merge the differences so you can commit your changes.
To compare two versions of a Rulesheet:
1. Right-click within a Rulesheet, and then choose the dropdown menu command Compare Rulesheets , as shown:
2. The Compare Rulesheets dialog box opens, as illustrated.
Rulesheet 1 is the Rulesheet currently in the editor.
3. Locate Rulesheet 2, a variation of Rulesheet 1, typically produced earlier in development or by another developer.
4. Choose a preferred Report Type
5. Choose a preferred Report Style - The CSS stylesheet to use for the report. The basic stylesheets are Corticon Blue and Corticon Green.
6. Choose a preferred Output Folder - The location where the report will be stored on disk. The default location is [CORTICON_WORK_DIR]/Studio/Reports. You can create a root location such as C:\CorticonStudioReports and then append subfolder names to sort out your projects, tasks, clients, or versions.
7. Click Finish.

Customized difference reports

Advanced users might want to create alternative report types and styles:
*The type files are located at [CORTICON_WORK_DIR]\Studio\Reports\XSLT\ in folders according to the asset types. You can copy the files to use as templates or change them to create report types that are then offered in the Report Type dropdown menu for the asset type.
*The style files are located at [CORTICON_WORK_DIR]\Studio\Reports\CSS\. You can copy a stylesheet file to use as a template to create custom report styles that are then offered in the Report Style dropdown menu.

Reading a differences report

The Rulesheet difference report evaluates what's changed -- additions, deletions, and modifications as well as items set as disabled. Presentation differences -- colors, fonts, natural language, and widths -- between the Rulesheets are ignored.
A report lists all the data in both Rulesheets. Items that are the same in both Rulesheets are not highlighted while those that are different are highlighted. The reason could be because the item changed. These need to be researched to see if they pair with an item on the other Rulesheet that has a variation of the item in that location.

Examples of how differences are reported

The following examples use the basic tutorial's Cargo Rulesheet as the Rulesheet to which variations are compared:
EXAMPLE: Extra Condition
Conditions a and b are matched; however, Rulesheet 2 has an extra Condition, c.
EXAMPLE:One match that is in sequence and one that is out of sequence
There are a few differences illustrated in this example:
*In-sequence match: Condition c in Rulesheet 1 matches condition b in Rulesheet 2.
*Out-of-sequence match: Condition d in Rulesheet 1 is marked as different because Condition a in Rulesheet 2 is out of sequence, and is marked as different.
*Extra: Condition: c in Rulesheet 2 is extra, and therefore different.
*Empty Condition Rows: Rulesheet1 has two empty Condition rows a and b are highlighted.
EXAMPLE: A Condition has been disabled
When the state of the condition is different, the conditions are matched, but marked as different, as shown. Condition c is disabled in Rulesheet 1 -- it is highlighted but matched.