Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
stefan_grube
Active Contributor
10,023

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


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:


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

7 Comments
Former Member
0 Kudos
Thanks for another nice blog. I always learn something new from your blogs 🙂

Thanks,
Sarvesh
Former Member
0 Kudos

Great blog.

Thanks,

Maria

pohian_koh
Explorer
0 Kudos
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

pohian_koh
Explorer
I manage to get it now  😃
0 Kudos
pohian.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 🙂

 
0 Kudos
I able to get now & error is fixed.

Thanks a lot stefan.grube 🙂

 
0 Kudos
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.