Analyzing Differences in Oracle Integration Cloud Artifacts
Introduction
When developing integrations in Oracle Integration Cloud (OIC), artifacts are created with encapsulated metadata definitions. This script helps analyze differences between artifacts, making it easier to understand changes between versions.
Pre-Requisites
Install these Python libraries:
pandas
tabulate
The code
You can find the code here: oic_python_compare.py
You can execute the code changing the name of the artifacts:
You can change the code to accept parameters if you intend to use with any automation process.
How the Script Works
The script compares two .iar artifacts by extracting and analyzing their contents. The key functionalities include:
-
Creating Temporary Copies:
- Copies the original artifacts into a temporary directory to avoid modifying the original files.
-
Extracting Files:
- Converts
.iarfiles into.zipformat and extracts them into designated folders.
- Converts
-
Renaming Versioned Folders:
- Standardizes folder names by replacing version numbers with
_VERSIONto simplify comparisons.
- Standardizes folder names by replacing version numbers with
-
Comparing Files:
- Analyzes different file formats, including:
- Text files: Compares line-by-line differences.
- Properties files: Identifies key-value changes.
- JSON files: Recursively checks for modifications in structured data.
- XML files: Compares attributes, elements, and text content.
- Analyzes different file formats, including:
-
Comparing Directories:
- Iterates through both artifact directories and reports missing or modified files.
-
Generating a Comparison Report:
- Outputs a structured table with detected differences.
-
Cleaning Up Temporary Files:
- Removes extracted and temporary files after execution.
Practical Use Case
Imagine two versions of an integration:
MIGRATE_TO_APIGW_01.00.0003.iarMIGRATE_TO_APIGW_01.00.0007.iar
By running the script, developers can identify exactly what changed between these versions, aiding in debugging and version control.
Disclaimer
This code is not supported by Oracle and is provided solely as a snippet for the OIC community. It is intended for informational and educational purposes only. Use at your own discretion and risk.
Conclusion
This script provides an automated way to compare Oracle Integration artifacts, saving time and reducing errors when managing integration changes. By identifying modifications in metadata, configurations, and logic, teams can ensure seamless updates and deployments.
Acknowledgments
- Author - Cristiano Hoshikawa (Oracle LAD A-Team Solution Engineer)


