cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver determination using file extension for pass through interface

Former Member
0 Kudos

We have a scenario,

We will be getting files with different extensions as email attachment.We need to move it to different folders based on their extension.This is just a pass through scenario , we will not be using any mapping in it.

Ex:

abc.csv -->> c:\\csv_files\

def.txt -->>c:\\txt_files\

xyz.xslx -->>c:\\xlsx_files\

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member190293
Active Contributor
0 Kudos

Hi Bharath!

I guess that you won't be able to use receiver determination in your case. If you would use file sender adapter - you could try to use Context object "FileName" for file name checking and selecting the appropriate receiver.

But since you use mail adapter with attachments - the only way I see is to create objects in ESR and use Extended Receiver determination to check the file name. Or another option might be to include file name in mail subject on sender side and check the respective Context Object (if you're going to continue with pass-through scenario).

Regards, Evgeniy.

manoj_khavatkopp
Active Contributor

Hi Eve,

How about using MuliPartHeaderBean first which usually reads all the Mail MIME parameters then assigning the part[1]content.description (which is usually first attachement name) then using dynamicconfigbean to assign this value to any standard context object say "FileName" and then use this in Reciever Determination.

Personally haven't tried but it should work for in case of single attachment.

Br,

Manoj

former_member190293
Active Contributor

Hi Manoj!

Yes, you're right. Missed that way. This might work.

Regards, Evgeniy.