IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Building mediation flows > Aggregating and broadcasting messages

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:

  1. ServiceInvoke_A calls Service A and populates the body of the message with its response.

  2. Using XSLTransformation1 you can extract and store parts or the whole message in the transient context.
  3. ServiceInvoke_B then calls Service B which repopulates the message body with its response.
  4. 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).

Aggregating and broadcasting messages