The following example shows a mediation subflow being used
in Access Gateway request
and response flows.
Example: message processing for sendSms operation
using subflow
On receipt of a sendSms message, the RequestCommonFlow
subflow is executed. If message processing is successful the request
is sent to the callout, which typically calls the Web service implementation.
If
message processing is not successful, the message is routed through
the fail terminal of the RequestCommonFlow subflow to RequestFailureFlow.
Then the message is inspected to find the type of exception that occurred.
An XSLT mediation primitive converts the message to a PolicyException
or ServiceException, and the message is returned to the caller through
the InputFault terminal.
The Web service implementation can
respond to the sendSms request message in one of three ways: success,
failure, or exception.
- If the Web service implementation returns a successful response,
the response message received is routed through the ResponseFlow subflow
back to the caller.
- If the Web service implementation fails to respond, an
XSLT mediation primitive converts the request message to a ServiceException,
which is then routed through the ResponseFlow subflow back to the
caller.
- If the Web service implementation returns a Service or Policy
exception, the exception message received from the respective Callout
Fault terminals is routed through the ResponseFlow subflow back to
the caller as a Service or Policy exception.
Figure 1. Example of a request flow using mediation
subflows