Need For Global Variables
In OIC we use assign operation to declare and assign the local variables. But these variables are limited in terms of scope, data type and complexity. We can create complex and/or simple type global variables whose scope is available throughout the integration scope.
The global variable can be one any of the following types
- String
- Boolean
- Date
- Date Time
- Object
- Number
Data Stitch
Data stitch operation is used to assign values to the global variables. Data stitch provides us with the functionality of both partial and full replacement of the message payload.
Types of Operations with Data Stitch
Append: This operation will add the value to the global variable but won’t remove any existing value in that global variable.
Example: In a real-time integration scenario, errors encountered during data processing are appended to a log file.
Assign: This operation will overwrite the value of the global variable. Any existing values in that variable will be lost.
Example: When processing customer records, if certain fields like “Country” or “City” are missing, the Assign operation sets these fields to default values like “Unknown” to ensure data consistency.
Remove: This operation will delete any existing value from the global variable.
Example: In a CRM system, duplicates may arise from multiple inputs or system errors. The Remove operation helps clean up the database by deleting these duplicate entries.
Scope and Security of Global Variables
Global variables are accessible to all integrations within the same instance of OIC, but not across different instances.
Ensure that you handle these variables with care, especially if they contain sensitive information, as they may be accessible to anyone who has the proper permissions within that OIC instance.
Conclusion
Data stitch provides important capabilities of Assign, Append, and Remove operations in enhancing data management and workflow efficiency. These powerful capabilities are pivotal for implementing complex business requirements of the digital era, enabling swift, precise
manipulations of data to meet evolving needs.
— Written by Ankit Gandhi