Custom mediation primitives allow you to implement your own mediation
logic by using Java™ code, or to call a service that is external to
the mediation flow by invoking an import.
The custom mediation primitive has an input terminal, an output terminal,
and a fail terminal. The input terminal is wired to accept a message and the
output and fail terminals are wired to propagate the message. The input message
is passed as the input parameter to the Java code or the import. If the operation
returns successfully the response from the Java code or import is propagated to the
primitive's output terminal. If the operation returns unsuccessfully, the
fail terminal propagates the original message, together with any exception
information.