IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Enterprise Service Bus programming > Error handling in the mediation flow component

Error flow

A mediation flow component has an error flow for each source operation. The error flow acts as a catch-all for messages that are propagated from any unwired fail terminal on any primitive or node, in either a request or a response flow.

By default, an error flow consists of:

You can wire mediation primitives to the Error Input node to capture error information.

For example, a Message Logger mediation primitive is wired to log the SMO. You can also put your error handling logic in a subflow, so that it can be reused in multiple error flows.

You can use an error flow to audit any unhandled errors that may occur in the operation request or response flows.

For example, you can use a Message Logger mediation primitive to capture the SMO, and then wire the Log mediation primitive to a Fail primitive.

An error flow can use the information available in the failInfo element of the SMO and return a modeled fault message. To do this, within the error flow, you can map the failureString from the failInfo to the modeled fault message and wire it to the Input Fault node. This is shown in Figure 1.

Figure 1. An example error flow to return a modelled fault

Error handling in the mediation flow component