The transformation plug-in allows developers to transform inbound and/or outbound messages for any adapter built with the Adapter SDK. It could be used, for example, for performing localized transformations using XSLT.
The application to which the adapter connects understands XML natively. The adapter code retrieves messages and makes use of the
MInstance::toXML() methods. The corresponding XSD is available in-memory and on disk if you have exported it. To achieve local transformations to a
canonical format, XSLT is the logical choice. These transformations can be applied to all outbound endpoints. Inbound transformations most likely don’t make sense.
Some custom code is required to manipulate messages before sending them to a third-party application. For example, a legacy TIBCO Rendezvous application expects its data in a particular format. The only solution is to write an intervening adapter between packaged adapters and the TIBCO Rendezvous application to do TIBCO Rendezvous transformations, or to use other TIBCO products (for example, TIBCO ActiveMatrix BusinessWorks).
The low-level callout behavior is made available by an MTransformationPlugin class that is part of the API (both C++ and Java). See the reference documentation for more information.
You can either throw an exception or return FALSE to stop message flow in the
transformInbound() or
transformOutbound() method.
If the transformOutbound() method throws an exception, it will be propagated back to user.
If the transformInbound() method throws an exception, an advisory will be sent out on the subject,
_SDK.ERROR.PLUGIN.PLUGIN_TRANSFORMATION_ERROR.