cancel
Showing results for 
Search instead for 
Did you mean: 

Processing multiple files File sender adapter

vinaymittal
Contributor
0 Kudos

Hi ,

File to Proxy scenario

I know this is an old question...i know about the additional parameters option to pick multiple files in the same call i want to know how to handle those two files in message mapping .

file1.xml

<a>

<b>dssds</b>

</a>

file 2

file1.xml

<d>

<e>dssds</e>

</e>

How to merge the payload of these two files in message mapping how to integrate the two files, how they behave when they reach operational mapping

i know that the additional file works as an attachment

Regards

Vinay

Accepted Solutions (1)

Accepted Solutions (1)

vishnu_pallamreddy
Contributor
0 Kudos

Hi Vinay,

If you dont want to change the data, then go to pass through scenario.

only IB.

vinaymittal
Contributor
0 Kudos

case 1: i want to change the data i want to add

file 1

<a>

<b>45</b>

</a>

file 2

<d>

<e>24</e>

</e>

24+45 the target xml should have 69

case 2:Its a pass through so will the receiver channel create two files in the target system with the same file name as the original?? how? Because i can mention only one filename in the receiver adapter right?

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Vinay,


case 1: i want to change the data i want to add

as you are reading main payload and attachment so you have to go for javamapping where you read inputstream as main payload and through readattachment method you read the input then finally you construct the output payload after reading required operation(in your case 24+45).



case 2:Its a pass through so will the receiver channel create two files in the target system with the same file name as the original?? how? Because i can mention only one filename in the receiver adapter right?

make sure you have kept " save message attachment " in receiver channel and ASMA in both channels.

Br,

Manoj

vinaymittal
Contributor
0 Kudos

Hi

please tell me the use of Advanced Selection for Source file checkbox in file sender adapter

and if it is used to send multiple files than how it is different from "Additional files Checkbox"

manoj_khavatkopp
Active Contributor
0 Kudos

Vinay ,

Advanced selection :

lets say we have 2 files A.txt and B.txt in a single folder.

and in filename schema you mention A.txt and in advanced you write as B.txt now these 2 files are processed as a different message only i.e for A.txt you get one message in Pi and for B.txt another message.

and also this option helps for avoiding few files which is done using exclusion mask , with this you can pick files mentioned in different folders also.

Additional files Checkbox :


here you can mention the files which needs to be picked with your main file i.e maintained in filename schema.


so taking the above example only , you get both a.txt and b.txt in a single message where a.txt is mainpayload and b.txt will come as attachment.


Br,

Manoj

vinaymittal
Contributor
0 Kudos

yes got it ... Thanks

vinaymittal
Contributor
0 Kudos

1) so in case of advanced selection does the exclusion mark work only on the file in the advanced selection part or it works for the main file too

2)It first picks the main file creates a message and then looks for the advanced selection file and if ti finds it again creates a message? How does it happen in the background....

manoj_khavatkopp
Active Contributor
0 Kudos

1.) It works for main file too.

2.)all files will be picked at a same time .

Answers (0)