1 Reply Latest reply: Aug 13, 2014 8:31 PM by Vamseeg-Oracle RSS

    Processing email attahcment in bpel




      I have a requirement to parse xsl file.

      I am using UMS adapter to listen for email messages.

      If email has an attachment ( xls ), then I need to parse it.

      I'm getting atthachment @href and with getAttachmentContent assign value to bpel variable.

      How to parse file content? I am using Apache POI library using java embeed activity , but without sucesss.

      Errors I received :  Your InputStream was neither an OLE2 stream, nor an OOXML stream or Invalid block type.

      I am not sure - it is problem with library or incorect approach in bpel?

      Is there a way to validate received file integrity when it is asigned to bpel string variable?

      best regards and sorry for my english.



        • 1. Re: Processing email attahcment in bpel


            <from expression="ora:getAttachmentContent('input','bin')"/>

            <to variable="initiateTaskInput" part="payload"



          Above will copy the Attachment content which has its HREF stored in "input/bin" variable to "content" variable in base64 encoded form.


          Now you can view the attachment in BPEL flow trace and parse it using BPEL Assign/XSLT.