Skip to Content
Author's profile photo Stefan Grube

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.”

Example:

The first module has following parameters:

key.1          write http://sap.com/xi/XI/System/File FileName
value.1        module.filename

The second module:

key.1          read http://sap.com/xi/XI/System/JMS DCJMSMessageProperty0
value.1        module.filename

image

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:

image

When you have the Modules in the sender channel, you can check with SXMB_MONI that the dynamic header field is copied correctly:

image

Note:

  • 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.

more Information:

Adapter Specific message Attributes in Online Help

Assigned Tags

      7 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Thanks for another nice blog. I always learn something new from your blogs 🙂

      Thanks,
      Sarvesh

      Author's profile photo Former Member
      Former Member

      Great blog.

      Thanks,

      Maria

      Author's profile photo Poh Ian Koh
      Poh Ian Koh

      Hi Stefan,

      I've tried your suggestion with the JMS sender module configuration but it wasn't successful.
      Checking @ the CC log it shows the following info: reading and writing with value null

      01/29/2018 08:18:38.794 Information read property module.filename into key (http://sap.com/xi/XI/System/File)FileName with value null;
      01/29/2018 08:18:38.794 Information write property module.filename from key (http://sap.com/xi/XI/System/JMS)DCJMSMessageProperty0 with value null;

      Any idea what has done wrong?

      Regards,
      Meavy

      Author's profile photo Poh Ian Koh
      Poh Ian Koh

      I manage to get it now  =)

      Author's profile photo pradeep M
      pradeep M

      Poh Ian Koh ,

      Hi Poh ,

      I'm getting same error as like you "FileName with value null;" when using the Stefan's blog. Can you please help by giving suggest.

      Thanks 🙂

       

      Author's profile photo pradeep M
      pradeep M

      I able to get now & error is fixed.

      Thanks a lot Stefan Grube 🙂

       

      Author's profile photo Anuj Dulta
      Anuj Dulta

      Thanks for the great blog. For HTTP to File, this works without adding those specific Modules. Just by adding AF_Modules/DynamicConfigurationBean, we get the ASMA Filename set.