Mediation modules

Mediation modules are Service Component Architecture (SCA) modules that can change the format, content, or target of service requests.

Mediation modules operate on messages that are in-flight between service requesters and service providers. You can route messages to different service providers and to amend message content or form. Mediation modules can provide functions such as message logging, and error processing that is tailored to your requirements.

You can change certain aspects of mediation modules, from the administrative console, without having to redeploy the module.

Components of mediation modules

Mediation modules contain the following items:
  • Imports, which define interactions between SCA modules and service providers. They allow SCA modules to call external services as if they were local. You can view mediation module imports and modify the binding.
  • Exports, which define interactions between SCA modules and service requesters. They allow an SCA module to offer a service and define the external interfaces (access points) of an SCA module. You can view mediation module exports.
  • SCA components, which are building blocks for SCA modules such as mediation modules. You can create and customize SCA modules and components graphically, using Integration Designer. After you deploy a mediation module you can customize certain aspects of it from the administrative console, without having to redeploy the module.

    Usually, mediation modules contain a specific type of SCA component called a mediation flow component. Mediation flow components define mediation flows.

    A mediation flow component can contain none, one, or a number of mediation primitives. IBM® Business Process Manager supports a supplied set of mediation primitives that provide functionality for message routing and transformation. For additional mediation primitive flexibility, use the Custom Mediation primitive to call custom logic.

    The purpose of a mediation module that does not contain a mediation flow component is to transform service requests from one protocol to another. For example, a service request might be made using SOAP/JMS but might need transforming to SOAP/HTTP before sending on.

    Note: You can view and make certain changes to mediation modules from IBM Business Process Manager. However, you cannot view or change the SCA components inside a module from IBM Business Process Manager. Use Integration Designer to customize SCA components.
    Figure 1. Simplified example of a mediation module. The mediation module contains one mediation flow component, which contains mediation primitives.
    The mediation module contains one mediation flow component. The mediation flow component contains mediation primitives.
  • Properties

    Mediation primitives have properties, some of which can be displayed in the administrative console as additional properties of an SCA module.

    For mediation primitive properties to be visible from the IBM Business Process Manager administrative console, the integration developer must promote the properties. Certain properties lend themselves to being administratively configured and Integration Designer describes these as promotable properties, because they can be promoted from the integration cycle to the administrative cycle. Other properties are not suitable for administrative configuration, because modifying them can affect the mediation flow in such a way that the mediation module needs to be redeployed. Integration Designer lists the properties that you can choose to promote under the promoted properties of a mediation primitive.

    You can use the IBM Business Process Manager administrative console to change the value of promoted properties without having to redeploy a mediation module, or restart the server or module.

    Generally, mediation flows use property changes immediately. However, if property changes occur in a deployment manager cell, they take effect on each node as that node is synchronized. Also, mediation flows that are in-flight continue to use previous values.

    Note: From the administrative console, you can only change property values, not property groups, names or types. If you want to change property groups, names or types, you must use Integration Designer.
  • A mediation module or dependent library may also define subflows. A subflow encapsulates a set of mediation primitives wired together as a reusable piece of integration logic. A primitive can be added to a mediation flow to invoke a subflow.

Deploying mediation modules

Mediation modules are created using Integration Designer, and are generally deployed to IBM Business Process Manager inside an enterprise archive (EAR) file.

You can change the value of promoted properties at deployment time.

You can export a mediation module from Integration Designer, and cause Integration Designer to package the mediation module inside a Java archive (JAR) file, and the JAR file inside an EAR file. You can then deploy the EAR file, by installing a new application from the administrative console.

Mediation modules can be thought of as one entity. However, SCA modules are defined by a number of XML files stored in a JAR file.

Figure 2. Simplified example of an EAR file containing a mediation module. The EAR file contains JARs. The utility JAR file contains a mediation module.
The EAR file contains JARs. The utility JAR file contains a mediation module.