Skip to Content

Idoc to multiple file with dynamic file names where receiver is AS2

Hello All,

My scenario is from one IDOC to multiple file.

The number of files which i need to create is dynamic, which depends on the number of delivery .

I want to use only receiver one CC, and files should be created in the same directory.

I have created a UDF which is mapped to one of the header node.

Everything was working fine untill business asked for this 1:n sceanrio ( earlier it was 1:1 )

Also, please note that my received is AS2 ,so i cannot use variable substitution.

Can i modify my UDF with message id so that i can have unique file names in target side and it does not get overwriten.

My UDF is as follows :

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("","dtAS2FileName");

SimpleDateFormat dateformat = new SimpleDateFormat("yyyyMMddHHmmss");

String timestamp = dateformat.format(new Date());

String valueNew = "XXX_CUS_" + timestamp;

conf.put(key, valueNew);

return "";

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Apr 11, 2012 at 12:17 PM


    Normal DC code wont work with multimapping..

    So you have to tweak ur design...chk this article:


    Amit Srivastava

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 11, 2012 at 12:11 PM


    For 1:n interfaces, you cannot use Dynamic Configuration. Use Variable Substitution instead, it will be able to generate file names for each separate delivery number, as per your requirement (if only the delivery number is available in the content of the target message). See an example configuration in this Wiki:

    Hope this helps,


    Message was edited by: Grzegorz Glowacki The original question did not mention the AS2 adapter initially. Use the functionality mentioned below.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 11, 2012 at 12:25 PM


    chk this (Using Adapter module):

    With AS2 adapter you cannot use variable substitution. Alternate approach( Which I call as 2 way approach, Not a better one but workable ), generate files on a temp directory using variable substitution and then create a pass through scenario(Integrated configuration) to send these files to target system over AS2 protocol.



    Add comment
    10|10000 characters needed characters exceeded