Compare and Diff
Git Connectivity includes a visual diff engine that shows changes between different versions of models. Rather than displaying raw JSON or XML differences, the diff engine provides model-type-specific visualizations that highlight the meaningful changes in a way that is easy to understand.
Where Diffs Appear
Visual diffs are used throughout the Git Connectivity feature:
- Commit dialog - Preview changes before committing to see exactly what will be pushed.
- Pull request preview - Review all model differences between the source and target branches.
- Commit history - View the changes introduced by a specific commit.
- Conflict resolution - Compare local and remote versions of conflicting models.
- Remote comparison - Compare the current local state with the remote version.
Supported Model Types
Each model type has a tailored diff visualization:
BPMN Processes
BPMN diffs show the process diagram with visual indicators for changed, added, and removed elements. This makes it easy to see structural changes like new tasks, modified sequence flows, or removed gateways at a glance.
CMMN Cases
CMMN diffs display the case diagram with highlighted changes to plan items, sentries, stages, and other case elements.
Forms
Form diffs show a structured comparison of form fields, including added, removed, and modified form components. Field property changes (labels, validation rules, visibility expressions) are displayed alongside the structural changes.
Decision Tables (DMN)
Decision table diffs show changes to input columns, output columns, and individual rules in a tabular format.
Data Dictionaries
Data dictionary diffs display changes to attributes, data types, and constraints at the attribute level.
Other Model Types
For model types that don't have a specialized visual diff, a structured JSON comparison is shown. This applies to:
- Service models
- Templates
- Agents
- Master data
- Security policies
- SLA definitions
- Channels and events
- Documents and queries
- Variable extractors
- User models
The JSON diff highlights added, removed, and changed properties in a tree-like structure.
Test Sets
Test set diffs show changes to test configurations, test steps, and expected outcomes in a structured format.
Diff Normalization
To prevent false positives in diffs, the diff engine normalizes model content before comparison:
- XML normalization - For BPMN and CMMN models, XML attributes are sorted, whitespace is normalized, and order-insensitive elements are canonicalized. This prevents non-functional changes (like attribute reordering during save) from appearing as diffs.
- JSON normalization - For JSON-based models, arrays with deterministic ordering (such as identity links and documents) are sorted before comparison.
This means that saving a model without making any actual changes will not produce a diff.
Using the Compare Modal
The compare modal provides a side-by-side view of two model versions. To open it:
- From any context where diffs are available (commit dialog, commit history, PR preview), click on a model's diff entry.
- The compare modal opens showing the two versions being compared.
- The diff visualization appropriate for the model type is displayed.
- Navigate between changed models using the model list in the modal.