Mediation primitives accept messages that they process as Service Message Objects (SMO).
All mediation primitives have an input terminal that can be wired to accept a message.
Most mediation primitives have one or more output terminals that can be wired to propagate a message. However, the Stop and Fail mediation primitives have no output terminals. Output terminals are for two kinds of flows: fail flows and successful flows. Depending on the mediation primitive there is, at most, one fail terminal. The number of successful output terminals also depends on the mediation primitive. Some mediation primitives have no terminals for successful output, others have one or more.
If an exception occurs during the processing of the input message, then the fail terminal propagates the original message, together with any exception information.
If an output terminal of a mediation primitive is left unwired, then WebSphere Integration Developer generates a warning. At runtime, the unwired output terminal stops this path in the flow without generating an exception, and the message is consumed. If you want to stop a path through the flow without generating an exception, you can wire the output terminal to the Stop mediation primitive.
Mediation primitives process messages as Service Message Objects (SMO). SMO provides an abstraction layer for processing and manipulating messages exchanged between services.
When creating mediation flows, the WebSphere Integration Developer tooling specifies the type of message body for each terminal (input, output or fail). The tooling optionally specifies the type of context information. The runtime product uses this information to convert messages into SMO objects of the specified type.
The SMO model is a pattern for using SDO (Service Data Object) DataObjects to represent messages. SMO provides an interface to access and modify message headers and message payloads. SMO can represent the logical content of many different types of message.
Many mediation primitives have a property called Root that contains an XPath 1.0 expression. The XPath expression represents the root of the current mediation. Typically, you can specify: /, /body, /headers, or your own XPath expression. / refers to the complete SMO, /body refers to the body section of the SMO, /headers refers to the headers of the SMO. If you specify your own XPath expression then the part of the SMO you specify is processed.
WebSphere Integration Developer displays the structure of a message and allows you to select locations within the message. In this way you can navigate the structure of a message and create XPath expressions.
WebSphere Integration Developer does not allow Root to be null.
A mediation primitive throws a MediationConfigurationException if it detects either a configuration problem or a transient external resource failure. For example, if a database cannot be found.
A mediation primitive throws a MediationBusinessException if there is a business error. For example, if a key that should be in a message, is not found.
The mediation runtime throws a MediationRuntimeException if there are problems setting up a mediation flow.