cancel
Showing results for 
Search instead for 
Did you mean: 

Read Payload+attachment in module or mapping?

Former Member
0 Kudos

Hi, My Sender file adapter picks up two files(additional file),the main file is an xml and the additional file is a pdf,

Now, depending upon the contents of the xml i need to send the attachment(pdf) to X recievers, My question is how would i access the attachment which is a binary stream in my mapping along with the main payload ?

I am looking for a way to this without using a BPM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Sorry we are on PI 7.0

Former Member
0 Kudos

Hi the requirement is "I recieve two files XML+pdf with similar name,

I pick this up with my File adapter using Additional Files option, so now I have a main payload and an attachment

Now in my mapping the main payload which is the XML file has to be checked for few values to determine where to send the pdf to, for example say if XML->tag>type =A then the pdf has to be sent to Reciever X else Y.

I am thinking of converting the pdf into a binary stream<Base64> and add it as an additional tag in my main payload using a module,so that i could use this result for my multimap , So basically after the intended module executes it would have an additional tag inserted with the binary stream of the pdf,which now I could use in my mapping to send it to n-recievers where the base64 code can be reconverted to pdf.

wanted to know if there is any other way to do this..other than modules..other suggestions..many thanks

former_member181985
Active Contributor
0 Kudos

you dont require any extra coding for this.

Use conditional receiver determination or conditional interface determination. Check forum you will get lot of links if you need further help.

Thats it.

former_member181985
Active Contributor
0 Kudos

When attachment is already formed by XI what else you want to perform for the receivers.

what is your PI version

PI7.0 & XI3.0 --> you can read/create attachments only in modules

PI7.1 --> in both mapping and modules