Working with Exchange Variables

You can define an exchange variable for each mediation operation in your mediation flow. An exchange variable provides a location that stores data for use in all paths for a particular mediation operation.

or example, you might want to store a field from an incoming message, such as a correlation ID in a JMS header for the message. After it is stored, this data is available for all tasks in the input, output, or fault paths of a mediation operation.

Each mediation operation has one exchange variable. The exchange variable can have any structure. For example, the exchange variable can have repeating elements, if it is necessary to hold multiple instances of the same element.

After it is defined, the exchange variable is available for all tasks that can access the meditation exchange in the input, output, and fault paths of your mediation flow. The values of the fields of the exchange variable are empty until they are set using the Set Exchange Variable mediation task. See Setting the Exchange Variable.