Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Service Development | Mapping Data in Flow Services | About Linking Variables | What Happens When Integration Server Executes a Link? | Preventing Pipeline Values from Being Overwritten
 
Preventing Pipeline Values from Being Overwritten
To prevent the value of the target variable from being overwritten by changes to the value of the source value in subsequent steps in the flow service as demonstrated in Example of Copying By Reference, you can do one of the following:
*When working with Document variables, link each child of the Document variable individually. This method can be time consuming and might significantly increase the memory and time required to run the service. However, this might be the best approach if the target Document variable needs only a few values from the source Document variable.
*After you link the source variable to a target variable, use the Drop modifier to drop the source variable. Only the target variable will have the reference to the data. This method ensures that the value of the target variable will not be overwritten in a subsequent step, but does not increase the memory and time required to execute the service.
*Create a service that performs a copy by value. Insert this service (as an INVOKE step or as a transformer) and link the variables to the service instead of linking them to each other. (In the case of Document variables, you could create a Java service that clones the IData object underlying the Document.) In situations where you link one Document variable to another, using a “cloning” service would require less time than linking the contents of a Document variable field by field.