Dynamic configuration in adapter modules
Updated 2006-10-11, to reflect comment by Stefan Grube. The original code has been changed to the api described on help.sap.com.
The dynamic configuration is a place where it is possible to store meta-information like filename, mails and other information which is stored by and/or read by an adapter. The information can be used e.g. to map the original filename to the target document or ensure that a file written by the file adapter is given the same name is an input file. The dynamic configuration properties are stored in the XI SOAP header and is therefore available in all pipeline and module steps.
In modules it is sometimes necessary to get access to the dynamic configuration. It could be to add some extra information about the document, which could be used in a mapping, or to get access to a property defined in the mapping or created in an adapter. I’ve used it, for instance, to add an email address, based on a look up performed by the module.
On help.sap.com you’ll find information about how to access dynamic configuration properties in message mappings. It is also described in blogs like Dynamic Configuration of Some Communication Channel Parameters using Message Mapping. This API does not work on adapter modules, however, because the container element is not available in modules. It can, however, be used for setting dynamic information to be used in the module.
I will not get into details about how to create a module; this is described in the “How To Create Modules for the J2EE Adapter Engine” Link.
Here’s a code sample that shows how to get access to the dynamic configuration from within an adapter module:
When the above code is inserted into a module, it has the following result on an XI message:
The sample code can be used both directions.
For more information about the api please look at help.sap.com