You can use WebSphere® Integration Developer (WID)
to create custom mediation primitives using Java snippets.
Mediation primitives implement a pipelined architecture, where information
can be passed between primitives in the form of SOAP headers. Here are some
guidelines for designing and implementing custom mediation primitives to best
fit into this architecture.
- Mediation primitives should contain narrowly defined, well scoped function.
This model encourages different mediation primitives for different variations
of function, rather than complex configuration. The best primitive can be
chosen (or substituted) to meet a specific need when you are constructing
a flow.
- Try to minimize the upstream assumptions of mediation primitives. By minimizing
assumptions about headers from elements that are higher in the pipeline, you
gain flexibility of use.
- Mediation primitives should be as policy driven as possible. Policy information
represents runtime configuration and can change constantly. This allows for
centralized administration of services through the service policy management
system.
In the WID environment,
a “Custom Mediation Primitive” is placed onto the canvas and you use a code
editor to insert Java mediation code. For details about this process, refer
to the topic Implementing custom mediation logic in the WebSphere Integration Developer information center.
Although this methodology provides a quick and easy way to create a custom
mediation primitive, it has limitations for reuse. Each project must import
the custom mediation primitive call and recreate the addition of the custom
primitive.
To allow greater reuse of your custom mediation primitives, you can package
them in such a way as to extend the WID Flow
Editor palette. Considerations for doing this are described in the topic Integrating
your custom mediation primitives with WebSphere Integration Developer (WID).