cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Folder name

Former Member
0 Kudos

Hi,

My requirement is to dynamically read the file name ( coming from FTP sender  channel) and based on file name , put them into Different folder via receiver File adapter r ( File to File). I went though the forum & found couple of options

(1) Using UDF in the  Mapping, Create a file path. Use this in Variable with Adapter specific parameters. Problem with this is we are not doing any message mapping( in fact no IR objects, just ID) and also this facility allows the variable to used based on Payload or header, both of which does not contain the file name

(2) Use Adapter module ( big code & installation) .

Please let me know if  any other solution for this specifically when i don't want to create dummy UDF. Also any help on Adapter module ( code) will be appreciated.

Thanks!

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi


This can be achieved using the combination of variable substitution and dynamic configuration bean.

Detail is there in the below blog

But it has some limitation which is mentioned in the blog.

Former Member
0 Kudos

Hi Harry,

As Amit mentioned, go with a java mapping for this requirement.

Even though you are not using any ESR objects, mention the mapping in interface determination, it works. Code can be written in the java mapping with the file name which is read dynamically from file adapter.

Thanks,

Pranav

rodrigoalejandro_pertierr
Active Contributor
0 Kudos
anupam_ghosh2
Active Contributor
0 Kudos

Hi Harry,

                    Just try select context object as shown below in receiver determination condition within ID.

Now use wild card character to determine the receiver business component.

as shown below

You need only one sender communication channel and multiple receiver comm channel one for each receiver. Configure each channel to point to target different target folder. Thus you will have multiple receiver agreement. Tick on ASMA file name in the sender channel. The only drawback in this scenario is that number of receiver comm channel increases but you need no IR objects or adapter module. Finally there will be places where you need to provide names of IR objects such as source service interface and namespace etc, there you put dummy values as "XYZ". 

Regards

Anupam

Message was edited by: Anupam Ghosh

Former Member
0 Kudos
Former Member
0 Kudos

Hi Amit...

Link you have provided to use Java Mapping is quite good. and this one describes about changing file name.

Can we use similar thing for Dynamic Directory name on target side?

Thanks in advance for your inputs.