Understanding Scenario Comparison
Scenario comparison offers the ability to highlight differences between two scenarios data.
The Data Grid widget, which is also embedded in the Data Explorer widget, allows to compare scenarios data row by row. For more details, please refer to Sections Using the Data Grid Widget and Using the Data Explorer Widget.
When comparison mode is enabled, the Data Grid splits comparison data in three tabs:
-
Rows with modified values.
-
Rows added in the selected scenario compared to the reference scenario.
-
Rows deleted in the selected scenario compared to the reference scenario.
Rows of the compared scenarios are associated between scenarios according to primary key definition of each table, as defined in the application JDL file.
Scenario comparison mode can be enabled through a dedicated button in the views and dashboards toolbar.
Scenario Selector in Comparison Mode
After activating the comparison mode, the scenario selector will give the ability to select a scenario, and also to select a reference scenario to compare with (orange).
A switch button is also present to switch the selected and the reference scenarios.
The comparison mode is global.
Compatible widgets (Data Grid and the Data Explorer) can individually activate this mode by configuration:
Automatically Enable Scenario Comparison Mode from a Widget Configurator
When a widget is not configured to automatically enable comparison mode, a button in the widget toolbar allows users to switch between normal and scenario comparison mode.
When scenario comparison mode is enabled the Data Grid will show two columns by entity attributes, one for the selected scenario (in gray) and one for the reference scenario (in yellow).
Note that the primary key attributes will be displayed as a single column since the value is the same for both scenarios.
Scenario Comparison Mode
Note that:
-
Only
valid
scenarios can be compared. -
Only entities with primary keys are supported.
-
Singleton
entities are not supported.
Scenario comparison can be used via a dedicated API. For more details, please refer to Section Understanding GraphQL Scenario Comparison.