on 03-05-2013 1:04 PM
Hi,
My scenario is Proxy to File using SFTP adapter.
I am trying to generate the receiver Filename dynamically using dynamic configuration(UDF in mapping). I have checked the ASMA in receiver SFTP adapter
UDF Code:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
Date now1 = new Date();
SimpleDateFormat formatter = new SimpleDateFormat ("yyyyddmmhhmmss");
String dateString1 = formatter.format(now1);
String final1 = "INT" + dateString1;
return (final1);
When I am trying the execute the scenario, filename is not getting generated dynamically. Instead, it is creating filename with the name mentioned in Filename field.
Also, when I am trying to check the Dynamic Configuration in Message Monitor , it is giving error " Duplicate attribute. Error processing resource" while opening the xml page.
Is there any limitation in PI 7.3 while using Dynamic Configuration or am I missing any step.
Thanks,
Loveena.
Hi Loveena,
I think there should be :
conf.put(key,final1); before return to set the valuel in dynamic configuration.
Regards,
Beena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Loveena,
Try this:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String NameOfFile = conf.get(key);
return NameOfFile;
Thanks
Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Issue resolved.
Apart from statement conf.put(key,final1); which was missing in the UDF,
the namespace should be
(http://sap.com/xi/XI/System) instead of ("http://sap.com/xi/XI/System/File") in PI 7.3.
Thanks,
Loveena.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.