When the execution of your rules is not producing the expected results and
your not sure what changed, Corticon Studio
provides difference reports to help identify changes. 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 about 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 changed and
decide how to manually merge the differences so you can commit your changes.
To compare two versions of a Rulesheet:
Right-click within a Rulesheet, and then choose the menu command Compare Rulesheets.
The Compare Rulesheets dialog box opens, as
shown: Rulesheet 1 is the Rulesheet currently in the
editor.
Locate Rulesheet 2, a variation of Rulesheet
1, typically produced earlier in development or by another developer.
Choose a preferred Report Type.
Choose a preferred Report Style: The CSS stylesheet
to use for the report. The basic stylesheets are Corticon
Blue and Corticon Green.
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.
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 drop-down list 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 drop-down list.
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 is 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.