Performing chained aggregation
You can invoke multiple services sequentially from a mediation
flow using the Service Invoke primitive and aggregate the response
from each service. This type of chained aggregation is achieved by
using the Service Invoke primitive to invoke the first service, and
then storing the service response in a placing the service response
in the transient context by using a Mapping primitive. The message
is then propagated to a second Service Invoke primitive.
What to do next
When you perform aggregation with
the Service Invoke primitive, use the transient context. The response
from an invocation is received in the body of the message and is placed
in the transient context by a Mapping primitive. The following diagram
shows a typical chained aggregation flow.
In the flow represented
previously:

- ServiceInvoke_A calls Service A and populates the body of the message with its response.
- Using XSLTransformation1 you can extract and store parts or the whole message in the transient context.
- ServiceInvoke_B then calls Service B which repopulates the message body with its response.
- Finally, XSLTransformation2 aggregates the current body of the message (response from Service B) with the contents of the transient context (stored response from Service A).
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15