Unknown use case of DynamicConfigurationBean: Store file name to JMS header without mapping
The PI adapters use dynamic header fields (also called Adapter Specific Message Attributes = ASMA) for enhancing the functionality of the adapter. Sender adapters provide information in the dynamic headers and receiver adapters can use that information for different purposes, like using a specific filename in file adapter.
The receiver JMS adapter uses the dynamic header fields to store values in JMS header. For this purpose there is a standard adapter module DynamicConfigurationBean which allows to set PI message header fields to JMS header.
If you want to copy dynamic headers from other adapters to the JMS header, this is a little bit tricky: You have to apply two entries of the DynamicConfigurationBean in the module chain. The first module stores the dynamic header field in the module context, the second module reads it from there. The parameters are identified by the prefix “module.”
The first module has following parameters:
key.1 write http://sap.com/xi/XI/System/File FileName
The second module:
key.1 read http://sap.com/xi/XI/System/JMS DCJMSMessageProperty0
If you want to read the file name from a JMS header in a sender channel, you exchange source and target and make sure that you place the DynamicConfigurationBean entries at the right place, direct before the CallSapAdapter module:
When you have the Modules in the sender channel, you can check with SXMB_MONI that the dynamic header field is copied correctly:
- You can use the two additional modules in file adapter channel or JMS adapter channel, but you can not split the two modules to different channels.
- You cannot use a single DynamicConfigurationBean for read and write, as all write commands are processed before the read commands, no matter how the commands are arranged in the module chain.