cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic configuration bean with SFTP adapter

Former Member
0 Kudos

Hello Experts,

I am working on file to file scenario using SFTP adapter and below is my requirement, any help is much appreciated -

1. File to file transfer. no mapping required.

2. At receiver end, i want put the file in Output folder and also zip the file and put it in Audit folder.

3. The name of the file at receiver side should be same as on the source side. So if the source file name is AB_YYYYMMDD_HHMMSS.txt,

the file in output folder should be same - AB_YYYYMMDD_HHMMSS.txt and the zip file name in Audit folder should be

AB_YYYYMMDD_HHMMSS.zip

Now, putting the file in output folder is straight forward using ASMA. However for creating the zip, i am using standard bean - PayloadZIp bean. The issue is -

If i use ASMA, then the filename of the zip file is AB_YYYYMMDD_HHMMSS.txt though its an zip file.

And if I do not use ASMA, I have to give a static name in receiver comm channel which is not the same as source file name.

I have already tried few things as per below links like DynamicConfigurationBean, variable substitution, but none of them is working. I have gone through below blogs -

Rename file without mapping in file/FTP channel? | SCN

So please let me know if this is possible at all via standard bean.

Note: I am trying to avoid use of custom adapter module / Java mapping.

Accepted Solutions (0)

Answers (1)

Answers (1)

Andrzej_Filusz
Contributor
0 Kudos

Hi,

I'm not sure if I understood your scenario well. Do you want to have 2 files at the receiver side:

AB_YYYYMMDD_HHMMSS.txt and AB_YYYYMMDD_HHMMSS.zip ?

It's easy - just use 2 different attributes for your file names in Dynamic Configuration, for example:

TxtFileName and ZipFileName.

But if you want to have AB_YYYYMMDD_HHMMSS.txt file name inside your AB_YYYYMMDD_HHMMSS.zip file then you need to code a few lines in java (custom adapter module).

Regards,

Andy

Former Member
0 Kudos

Thanks for your reply.

I was able to fulfill the requirement using combination of variable substitution bean and dynamic configuration bean.

here is the link -