on 06-16-2012 11:45 AM
Hi Gurus,
Below is my requirement.
PI will first pick a .csv file. This file will contain multiple lines and each line will have six fields. Sixth field in every line will tell the name of a file present in same location as of the index file and this file can be a .doc, .xls, .jpg or mail. PI need to pick the file and send it as the attachment to message formed with the first five fields.
Through message split using mapping, we are sending each line's data in a separate message. But am not able to resolve how can I configure File Sender channel to pick a file whose name is sent in another message.
Please help with suggestions. Thanks.
Hi Uma,
You can go for custom adapter module for this case. Write the module to first read the index file, extract the first five fields from it, put it into a diff file and send it as the main payload. While, depending on the content of 6th field, read the additional file from source directory and send as attachment. This way, you do not need to do the splitting in mapping.
Regards,
Monika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You won't be able to read this file with standard sender file Communication Channel features. Instead, you would have to extend its features using an adapter module, or read the additional files during mapping, for instance in a Java mapping or a UDF in graphical mapping.
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. just to add what Greg said - depending on the PI version you have you may not be able to handle attachments in the mapping but only in the adapter module (quick way to check it is to check if you have a flag in operation mapping which allows to read attachments)
2. there is also a way to do the sync file adapter with small efort with AXIS adapter but the efort is I'd say the same as of writing an adapter module
Regards,
Michal Krawczyk
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.