Skip to Content
avatar image
Former Member

Dynamic Configuartion in PI 7.3

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 05, 2013 at 02:03 PM

    Hi Loveena,

    I think there should be :

    conf.put(key,final1); before return to set the valuel in dynamic configuration.

    Regards,

    Beena

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 05, 2013 at 05:44 PM

    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

    Add comment
    10|10000 characters needed characters exceeded