cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic File Name

itabhishek9
Participant
0 Kudos

Hi SDNites,

I have done all the relevant configurations for dynamic File name,

1. Set the ASMA File attribute on both sender and receiver side.

Also to modify the input file name and send it to receiver, I have used the dynamic configuration and mapped it to the top node (Mapped to Receiver Message type).

Dynamic Configuration code,

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

String ourSourceFileName = conf.get(key);
ourSourceFileName = "ABC";
return ourSourceFileName;

I would like to see my receiver file name as ABC. But the same is not obtained.

Regards,

Abhi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

U have to set file name  using below code -

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

conf.put(key,"ABC");
ourSourceFileName = "ABC";
return ourSourceFileName;

Thanks

Amit Srivastava

Answers (1)

Answers (1)

Ryan-Crosby
Active Contributor
0 Kudos

Hi Abhishek,

You want to use the put method to insert a key.  Here is a snippet of the code:

conf.put(key, "ABC");

Regards,

Ryan Crosby