Does BPEL Support sending Attachment in EMAIL ?

Hi,
We have a scenario where we want to send an attachment of a file in the email for a Field Force Automation application. Is this possible in BPEL Beta 3 to send an email with an attachment ? Because in the notification service wizard there is no facility for attachment.
The attachment could be even a simple .xml or .txt file.
Regds,
Nagarajan K.

The current versions of the BPEL process manager support sending email attachments using the notification service. When attachments are to be sent via email, in the notification wizard, mark the email as a multipart message. Also set the number of attachments to send. When attachments are to be sent, the content body is set to a MultiPart element that contains as many BodyPart elements as the number of attachments. For example, if there are 2 attachments, a BPEL copy to created to set the content as follows.
<copy>
<from>
<Content xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService">
<MimeType>multipart/mixed</MimeType>
<ContentBody>
<MultiPart>
<BodyPart>
<MimeType/>
<ContentBody/>
<BodyPartName/>
</BodyPart>
<BodyPart>
<MimeType/>
<ContentBody/>
<BodyPartName/>
</BodyPart>
</MultiPart>
</ContentBody>
</Content>
</from>
<to variable="emailPayload"
part="EmailPayload" query="/EmailPayload/ns:Content"/>
</copy>
The content entered from the JDeveloper notification wizard is set for the first BodyPart. The rest of the BodyPart elements has to be set using BPEL copy statements as shown below. Each BodyPart has 3 elements - ContentBody, MimeType and BodyPartName. All the three elements must be set for each attachment.
               <copy>
                    <from expression="string('image/gif')"/>
                    <to variable="emailPayload" part="EmailPayload"
query="/EmailPayload/ns:Content/ns:ContentBody/ns:MultiPart/ns:BodyPart[3]/ns:MimeType"/>
               </copy>
               <copy>
                    <from expression="ora:readFile('bpel_logo.gif')"/>
                    <to variable="emailPayload" part="EmailPayload"
query="/EmailPayload/ns:Content/ns:ContentBody/ns:MultiPart/ns:BodyPart[3]/ns:ContentBody"/>
               </copy>
               <copy>
                    <from expression="string('bpel_logo.gif')"/>
                    <to variable="emailPayload" part="EmailPayload"
query="/EmailPayload/ns:Content/ns:ContentBody/ns:MultiPart/ns:BodyPart[3]/ns:BodyPartName"/>
               </copy>

Similar Messages

  • Does BPEL support wsHttpBinding?

    Hi,
    I'm trying to invoke a WCF service using wsHttpBinding without success. Does BPEL support wsHttpBinding? If so, what the process to getting this to work. Any help is greatly appreciated.

    Yes it does, here is a post that may be useful
    Binding Fault invoking an axis2 webService from BPEL
    also there is an example in the samples directory for http binding
    SOA_HOME/bpel/samples/tutorial/
    cheers
    James

  • When sending attachment in email the image is so large it takes up the screen, how do i make it normal, when sending attachment in email the image is so large it takes up the screen, how do i make it normal

    when sending attachment in email the image is so large it takes up the screen, how do i make it normal, when sending attachment in email the image is so large it takes up the screen, how do i make it normal

    In the Mail app, open the help menu. You will find your answer under "add attachments"

  • Does BPEL support MTOM?

    Does BPEL from 11g / Jdev / SOA support MTOM?
    I need to know this before spending to much time as I need to call an external service that supports MTOM and the ideal situation would be to receive the attachment as MTOM from BPEL and pass it on to the external webservice as MTOM.
    Edited by: user9976753 on Aug 24, 2009 8:56 AM

    Hi,
    I think I have figured out how to enable mtom on the BPEL service through Jdeveloper. It looks like when I add the mtom-encoding binding property with a value of true to the bpelprocess1_client_ep node under the *.bpel design view, the WSDL that is generated at run time contains this:
    <wsp:Policy xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsmtom_policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
    <wsoma:OptimizedMimeSerialization xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy"/>
    </wsp:Policy>
    and this:
    <wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#wsmtom_policy" wsdl:required="false"/>
    My question is, since the WSDL contains wsdl:required="false", how do I test MTOM through EM console?
    The EM console only contains "WSDL Default", "None" and "Custom" options for testing MTOM and if I choose "WSDL Default" it does not use MTOM, I think because "wsdl:required" is set to false in the WSDL, meaning MTOM and non MTOM attachments are valid, and there appears to be no way to change wsdl:required="true" from JDeveloper since this entry in the WSDL is really generated at runtime. I have searched for another option in JDevloper to switch the value to wsdl:required="true" with no luck. I think I am fine with wsdl:required="false" as long as I can figure out a way to force use of MTOM in the testing utility inside the EM console. How do you guys test this?
    Edited by: user9976753 on Sep 8, 2009 7:15 AM

  • Help needed to setup template item list to send attachement within email te

    Hi! I read everything there was in the bookshelf on the setting of template on Outbound communication, advanced template and my main concern, template items list and I still can not send a template email with an attachment inside. I managed to send the email with the attachment in the message body but not send mail with an attachment separately.
    Is there a special feature or setting to the template items list or in the Siebel file system that needs to be done ? I've try to put a tag pointing to the template item in the advanced template but got no result. I've tried everything but got no result.
    My main goal is to send a template email containing the attachement of an official letter inside. Ideally, I would like the letter as an attachment to be populated by the data of the BC associated (values substitution). This is already working in the advance template. But that's another story. I would be happy if only I can send the email template to include the letter as attachement.
    Thanks in advance for helping me!

    Yes we do. Even if we go with F9 or by the send email from the file menu, the sending of emails is ok. It's just that it wont send attchment as define in the template item list. All settings are ok and are as specified in related bookshelf. By now, i'm looking if there is any activex control missing for outbond email OR if there is any html tags to put inside the advanced template so that the application could properly attach the file to the email. If you have aswer on you side, it would be appreciated.
    Jean.

  • Does BPEL support circular flow?

    I'm trying to use BPEL as the process flow engine in a project. Since some tasks can be routed all over back to previous steps based on the criteria, I'm wondering if BPEL supports that?
    If "while" is the only choice for me to do so, the flow will be quite cumbersome to design.
    Thanks.

    Yes it does, here is a post that may be useful
    Binding Fault invoking an axis2 webService from BPEL
    also there is an example in the samples directory for http binding
    SOA_HOME/bpel/samples/tutorial/
    cheers
    James

  • Xpath error while trying to send attachment with email

    Hi,
    I was trying to execute the BPEL sample - SendingAttachementWithEmail, as given in the tutorials.
    I had mapped the 'contentBody' in attachment[2] to
    ora:readFile(bpws:getVariableData('inputVariable','payload',
    '/client:SendEmailWithAttachmentProcessRequest/client:attachmentURI')
    I have a file called "SOA.txt" in my C:\ (C drive).
    I specified the following details in my 'initiate' screen
    to - jcooper
    subject - sample email
    body - testing how to send email with attachment
    attachmentName - SOA.txt
    attachmentMimeType - multipart/mixed
    attachmentURI - file:C:/SOA.txt
    I got the following error while executing the process, can any one please tell me where I am going wrong. Are the values I am passing correct?
    Error
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:readFile(bpws:getVariableData("inputVariable", "payload", "/client:SendEmailWithAttachmentProcessRequest/client:attachmentURI"))", the reason is C:\SOA.txt (The system cannot find the file specified).
    Please verify the xpath query.
    What could be the problem with the xpath query.

    Thanks for your suggestions, but it still does not work.
    The following is the error I get when I enter
    file:///c:/SOA.txt as my attachmentURI.
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:readFile(bpws:getVariableData("inputVariable", "payload", "/client:SendEmailWithAttachmentProcessRequest/client:attachmentURI"))", the reason is c:\SOA.txt (The system cannot find the file specified).
    Please verify the xpath query.
    I followd the same steps as given in the tutorial 'SendEmailWithAttachment' available under the folder <BPEL_HOME>\integration\orabpel\samples\tutorials\SendEmailWithAttachment.

  • Sending Attachment in Email in GP

    Hello,
    I have a GP Application in which the user wants to use the Attachment functionality. So I am thinking of sending the Attachments attached by the initiator in the email which is sent by using the Action 'Send an Email in Background with Attachment(optional)' to the Approver. So how can i implement this .?
    Any help would be highly appreciated.
    Regards,
    Anil

    Hi Anil,
    Have you done this scenario?
    Please let em know.
    Rajesh N

  • Send attachment  through Email

    Hi All,
    I have a scenario where on Action Submit the uploaded file must send as an e-mail to the given recipient.
    I'm able to create the application till uploading file but could not send this as an attachment through e-mail.
    Could any one help in this regards.
    It is very urgent.
    Thanks in advance
    ambicasony

    hai Ambica,
    put this coding inside a method and call that on the on Action property of button.
    When  give mime body part 2 it ll go as attachment.try this it will work.
    try
                        String strSMTPIPAddress ="192.168.100.103";
                        Properties props;
                        Session session;
                        Provider p;
                        props = System.getProperties();
                        props.put("mail.smtp.host", strSMTPIPAddress);
                        session = Session.getDefaultInstance(props, null);
                        StringBuffer strMailBody = new StringBuffer();
                        wdThis.createmailbody(strMailBody);
                        Message message = new MimeMessage(session);
                        message.setFrom(new InternetAddress("<give the email address here>"));
                        message.addRecipient(Message.RecipientType.TO, new InternetAddress("<email address>"));
                                            message.setSubject("<give the subject of mail>");
                        MimeMultipart mimemultipart = new MimeMultipart();
    //                    //set message content
    //this is body content
                        MimeBodyPart mimebodypart1=new MimeBodyPart();
    //This is attachmnent
                        MimeBodyPart mimebodypart2=new MimeBodyPart();
    //                    mimebodypart1.setText("xxx");          //Attachment
    mimebodypart2.setText("<give the content of attachemnt>');
         mimemultipart.addBodyPart(mimebodypart1);
    mimemultipart.addBodyPart(mimebodypart2);
                        //message.setText(wdContext.currentContextElement().getSalorder());
                        message.setContent(mimemultipart);
                        message.setText(strMailBody.toString());
                        Transport.send(message);
                        wdComponentAPI.getMessageManager().reportSuccess("E-mail is sent to sharanya");
                        catch (Exception e)
                        wdComponentAPI.getMessageManager().raiseException("Exception" + e.getMessage(), true);
        If you have any issues in using this plz let me know.
    Thanks n Regards
    Sharanya.R
    Edited by: Sharanya.R on Mar 4, 2008 9:45 AM
    Edited by: Sharanya.R on Mar 4, 2008 9:56 AM

  • Send attachment by email as is from my computer  or network

    hi all,
    i have to send an attachment as is by email.
    this attachment location can be on my computer or on the network.
    please i need an example code .
    thanks
    dany

    thanks for the answer.
    there is the solution code:
    which might help you getting the file from the pc or you can change the source path and then send it to the following reciptant
    data method1 like sy-ucomm.
    data g_user like soudnamei1.
    data g_user_data like soudatai1.
    data g_owner like soud-usrnam.
    data g_receipients like soos1 occurs 0 with header line.
    data g_document like sood4 .
    data g_header like sood2.
    data g_folmam like sofm2.
    data g_objcnt like soli occurs 0 with header line.
    data g_objhead like soli occurs 0 with header line.
    data g_objpara like selc occurs 0 with header line.
    data g_objparb like soop1 occurs 0 with header line.
    data g_attachments like sood5 occurs 0 with header line.
    data g_references like soxrl occurs 0 with header line.
    data g_authority like sofa-usracc.
    data g_ref_document like sood4.
    data g_new_parent like soodk.
    data: begin of g_files occurs 10 ,
    text(4096) type c,
    end of g_files.
    data : fold_number(12) type c,
    fold_yr(2) type c,
    fold_type(3) type c.
    parameters ws_file(4096) type c default 'c:\debugger.txt'.
    Can me any file fromyour pc ....either xls or word or ppt etc ...
    g_user-sapname = sy-uname.
    call function 'SO_USER_READ_API1'
    exporting
    user = g_user
    PREPARE_FOR_FOLDER_ACCESS = ' '
    importing
    user_data = g_user_data
    EXCEPTIONS
    USER_NOT_EXIST = 1
    PARAMETER_ERROR = 2
    X_ERROR = 3
    OTHERS = 4
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    fold_type = g_user_data-outboxfol+0(3).
    fold_yr = g_user_data-outboxfol+3(2).
    fold_number = g_user_data-outboxfol+5(12).
    clear g_files.
    refresh : g_objcnt,
    g_objhead,
    g_objpara,
    g_objparb,
    g_receipients,
    g_attachments,
    g_references,
    g_files.
    method1 = 'SAVE'.
    g_document-foltp = fold_type.
    g_document-folyr = fold_yr.
    g_document-folno = fold_number.
    g_document-objtp = g_user_data-object_typ.
    *g_document-OBJYR = '27'.
    *g_document-OBJNO = '000000002365'.
    *g_document-OBJNAM = 'MESSAGE'.
    g_document-objdes = 'Manohar testing by program'.
    g_document-folrg = 'O'.
    *g_document-okcode = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes = 'Manohar testing by program'.
    g_header-file_ext = 'TXT'.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
    exporting
    method = method1
    office_user = sy-uname
    ref_document = g_ref_document
    new_parent = g_new_parent
    importing
    authority = g_authority
    tables
    objcont = g_objcnt
    objhead = g_objhead
    objpara = g_objpara
    objparb = g_objparb
    recipients = g_receipients
    attachments = g_attachments
    references = g_references
    files = g_files
    changing
    document = g_document
    header_data = g_header
    FOLMEM_DATA =
    RECEIVE_DATA =
    File from the pc to send...
    method1 = 'ATTCREATEFROMPC'.
    g_files-text = ws_file.
    append g_files.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
    exporting
    method = method1
    office_user = g_owner
    ref_document = g_ref_document
    new_parent = g_new_parent
    importing
    authority = g_authority
    tables
    objcont = g_objcnt
    objhead = g_objhead
    objpara = g_objpara
    objparb = g_objparb
    recipients = g_receipients
    attachments = g_attachments
    references = g_references
    files = g_files
    changing
    document = g_document
    header_data = g_header
    method1 = 'SEND'.
    g_receipients-recnam = 'MK085'.
    g_receipients-recesc = 'B'.
    g_receipients-sndex = 'X'.
    append g_receipients.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
    exporting
    method = method1
    office_user = g_owner
    ref_document = g_ref_document
    new_parent = g_new_parent
    importing
    authority = g_authority
    tables
    objcont = g_objcnt
    objhead = g_objhead
    objpara = g_objpara
    objparb = g_objparb
    recipients = g_receipients
    attachments = g_attachments
    references = g_references
    files = g_files
    changing
    document = g_document
    header_data = g_header.
    this code might help you

  • Sending attachment Via Email

    Hi All,
    I have a requirement where in i need to send an email from teh service ticket. The email will be triggered basedon status change to To be Approved. While the email is sent to approver, is it possible to pick the attachment linked to service ticket and add to email as an attachment. is this possible technically..any pointers on how to achive this would be of great help...
    thanq..
    Regards,
    Udaya..

    Udaya,
    I'm not going to give you all the coding details , but I have techically done this before for an activity and here is the recipe for your case:
    1) Create a new z-action profile for the transaciton type
    2) Copy the standard CL_DOC_PROCESSING_CRM_ORDER over to a z-version
    3) Copy the method from that class called CRM_SRVORDER_EXEC_SMART_FORM to a version called EMAIL_SRV_ORDER
    4) Copy the standard smartform used for the service profile to a zed version
    5) Configure a new smart forms mail action to send an e-mail using the new processing class
    6)  Now here is the fun part, you will actually re-code the method to excute the form, but not send out via e-mail.  You will capture the smartform output as OTF and then convert to ASCII to become the body of your e-mail.
    7) Next you will read the attachment for the e-mail message using he CL_CRM_DOCUMENTS class into memory
    8) Finally you will build an e-mail message via separate function module which will be called in a separate task(to avoid issuing  a commit work in the action), using CL_BCS message classes.
    Your end-result is your "action" will generate an e-mail with an attachment.  This isn't way too difficult and I estimate about one week to do. 
    Take care,
    Stephen

  • Problum in sending attachment by email

    Hi all,
    I need to send 3 dcouments as attachemnt to external email.
    3 documents are --- one  text file and 2 word documents.
    I am using SO_NEW_DOCUMENT_ATT_SEND_API1 function module.
    Problum is... when i run program foreground, it is working fine. It is sendding 3 attachments.
    But, when I run this program background, it is sending only text file but not 2 other word documents?
    I have tested several times and had same problum.
    What would be reason for this. Y i am not able to send 3 documents by back ground job?
    Thanks
    Shive

    How are you uploading to memory those non-sent documents? being word ones, I bet you are using some *UPLOAD, like WS_UPLOAD, GUI_UPLOAD or its corresponding class object.
    Those objects/functions cannot be used in background.

  • Sending attachment in email

    I want to attach a file from my desktop to an email. how do I do this?
    G5   Mac OS X (10.4)  

    Since this is an Apple Mail forum, I will describe the process using that program.
    The easiest way is to simply drag the file on your desktop onto the Mail icon located in the Dock. This will create a new message with the file attached.
    Another way is if you are already in Mail, simply create a new message and click the 'Attach' button at the top of the window. Then navigate to the Desktop and attach the file.
    Hope this helps.
    Bronson

  • How do I send attachment to email that can be opened by windows or pc users?, how do I send attachment to email that can be opened by windows or pc users?

    I cannot get my mac to attach files to email that may be read by windows users.  It is really annoying.  Any suggestions?

    "ordinary document or occasionally a small photo"
    What is an ordinary document? What program generated it? Windows has trouble opening documents if you don't have the extension visible as well.

  • Would apple Support send me an email saying: "   We need to ask you to complete a short and brief step to securing and validating your account information.   Click here to complete validation   Failure to complete our validation process will result in a s

    We need to ask you to complete a short and brief step to securing and validating your account information.
    Click here to complete validation
    Failure to complete our validation process will result in a suspension of your Apple ID.

    You are welcome. The emails are difficult to block effectively, because the spammer/phishers continually fake their sending email address. You can, however forward the email to Apple.
    [email protected]

Maybe you are looking for

  • I can't find my HP M1522nf MFP on my network. I am running XP. Help?

    I'm running Windows XP trying to connect through a network to my HP LaserJet M1522nf MFP. For whatever reason, my computer cannot seem to find the printer, although it had no problems before I moved it across the room. I didn't unplug any wires or an

  • Need help with picture-in-picture effect!!! URGENT

    I've been trying to find out a way to use a picture-in-picture effect in adobe premiere pro cs3 but it just hasn't been possible. I know that adobe premiere elements 3.0 has that option, but I can't seem to find it in pro cs3. Can someone give me a h

  • How to solve below problem please help.

    Hi I want to display service tax  for each item I want to out put like this Item at 10 service tax (10.20%)       10 Item at 20 service tax (4.08%)          4 Item at 30 service tax (12.24%)       12.50 But I m getting output like this Item at 10 ser

  • FR Report opening blank in PDF Preview

    Dear friends, End user has following issue with HFR: When he opens any report it shows it as blank. He faces this issue with all the reports. However he is able to open the reports in HTML. I tried opening the same report it opens fine my side. I did

  • Cannot find Internet Connect Icon

    I am using Leopard 10.5.4. I want to setup a VPN connection and found an article which describes how to go about setting the VPN connection. But it uses Internet Connect icon and according to the article it is found in the 'Applications' folder. I ca