IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Building mediation flows > Mediation flows overview
Mediation flows
A mediation flow consists of a sequence of processing steps that are run when an input message is received.
A mediation flow is created in the Mediation Flow editor by including a number of mediation primitives that define processing steps. Connections represent the flow of the message between the mediation primitives.
A mediation flow is defined for a source operation. A mediation flow always has a request flow, where you define the flow of the outgoing message from the source operation. Usually, the mediation flow invokes a target operation; this can be done either at the end of a request flow using a callout or inline within the flow by using the service invoke primitive. When a callout is used, the message that is returned by the target operation is defined in a response flow. Every mediation flow also has an error flow where you can capture unhandled errors that may occur in the mediation flow.
- A request flow begins with a single input node for the source operation, followed by one or more mediation primitives in sequence and optionally a callout node for each target operation, all wired together. If a message is to be returned to the source directly after processing, it can be wired to an input response node in the request flow. If fault messages are defined in the source operation, an input fault node is also created.
- A response flow begins with a callout response node for each target operation, followed by one or more mediation primitives in sequence and a single input response node representing the source operation, all wired together. If fault messages are defined in the source operation, an input fault node is also created. If fault messages are defined in the target operation, a callout fault node is also created. Errors that are returned by the operation but are not defined as fault messages are propagated to the fail terminal of the callout response node. Response flows for request-only operations consist of a callout response node that has a fail terminal to handle faults, and no output terminal.
- Within the request and response flows, you can invoke a service inline within the flow. This operation sends a message outside the flow and waits for its return before continuing. This is done through the Service Invoke primitive.
- An error flow begins with a single input node for the source operation, followed by one or more mediation primitives in sequence or a subflow and optionally an input response node that can be used to return the error message to the source. You can use an error flow to capture any unhandled exception.
When multiple targets return a response, the returning messages are processed into a single message, which is then returned to the source.
In a mediation flow, you can re-use logic that has been pre-configured as a mediation subflow.
Related concepts:
Mediation modules
Mediation flow components
Mediation primitives