How to pass a document as an attachment to a BPEL process?

Hi Guys,
Currently I have a BPEL process that get's invoked from a JSP page with some scriplets in it. The following bit of code calls the BPEL process in the JSP scriplet:
try{       
String givenNames = request.getParameter("givenNames");
String sex = request.getParameter("sex");
String title = request.getParameter("title");
String staffMemberInd = request.getParameter("staffMemberInd");
String deceasedInd = request.getParameter("deceasedInd");
String archiveExclusionInd = request.getParameter("archiveExclusionInd");
String archiveDt = request.getParameter("archiveDt");
String purgeExclusionInd = request.getParameter("purgeExclusionInd");
String purgeDt = request.getParameter("purgeDt");
String birthDt = request.getParameter("birthDt");
String salutation = request.getParameter("salutation");
String preferredGivenName = request.getParameter("preferredGivenName");
String emailAddr = request.getParameter("emailAddr");
String autoEnableInd = request.getParameter("autoEnableInd");
String xml = "<AddUserProcessRequest xmlns=\"http://xmlns.oracle.com/callistaAddUser\">"
+"<surname>"+surname+"</surname>"
+"<givenNames>"+givenNames+"</givenNames>"
+"<sex>"+sex+"</sex>"
+"<title>"+title+"</title>"
+"<staffMemberInd>"+staffMemberInd+"</staffMemberInd>"
+"<deceasedInd>"+deceasedInd+"</deceasedInd>"
+"<archiveExclusionInd>"+archiveExclusionInd+"</archiveExclusionInd>"
+"<archiveDt>"+archiveDt+"</archiveDt>"
+"<purgeExclusionInd>"+purgeExclusionInd+"</purgeExclusionInd>"
+"<purgeDt>"+purgeDt+"</purgeDt>"
+"<birthDt>"+birthDt+"</birthDt>"
+"<salutation>"+salutation+"</salutation>"
+"<preferredGivenName>"+preferredGivenName+"</preferredGivenName>"
+"<emailAddr>"+emailAddr+"</emailAddr>"
+"<autoEnableInd>"+autoEnableInd+"</autoEnableInd>"
+"</AddUserProcessRequest>";
Locator locator = new Locator("default","bpel");
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
// construct the normalized message and send to Oracle BPEL Process Manager
NormalizedMessage nm = new NormalizedMessage( );
nm.addPart("payload" , xml );
NormalizedMessage res = deliveryService.request("AddUser", "process", nm);
Map payload = res.getPayload();
Element partEl = (Element) payload.get("payload");
In my BPEL process I have a human task that I want to attach a document (WORD, PDF etc) to.
My question is, how can I attach and pass a document as an input parameter to my BPEL process? and what kind of element do I need to create in the XSD file to hold the attached document?
Any help with this is greatly appreciated.
Thanks.
Edited by: user9972209 on Aug 31, 2008 10:57 PM

In our application, an attachment surfaces in the middle of the lifecycle, but not from the start.
We were using the following to accommodate the attachment as the part of the payload ...
<xsd:element name="AttachementMimeType" type="xsd:string"/>
<xsd:element name="AttachmentMIMEStream" type="xsd:string"/>
Hope this helps.

Similar Messages

  • How to pass pdf documents through idocs

    I wanted to know how to pass pdf document along with a transaction code like sales order or travel expense manager with the help of IDOCs.

    Lily,
    I observe that you have declared lv_xml_data as TYPE xstring & string and get_data method probably expects data of xstring type.
    Have a look at the "Extract the Data" section from following [article.|https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d&overridelayout=true]
    Chintan

  • How to create and deploy a JSP which calls a BPEL process in JDEVELOPER

    Hi Gurus,
    I don't know how to create a JSP in JDEVELOPER which call a BPEL process. I have gone through the tutorials. Since, I am new to JDEVELOPER I need some help.
    1. How to create a JSP (I know creating application and project, also I know JSP coding)
    2. How to deploy this JSP?
    3. For the Synchronos BPEL project, the build.xml is created automatically, in this forum, I see people talking about ear war .deploy etc. How do we get them automatically created. Or do we need to create them manually. If it has to be manual some sample scripts would be of great help.
    Any help in this regard would be really great.
    Thanks in advance,
    Sankar.

    I found the following tutorial which clearly explains how to deploy J2EE apps.
    http://www.oracle.com/technology/obe/obe1013jdev/deployment/deployment.htm
    I created a simple jsp file in a project, followed the steps in the tutorial and it got deployed onto: http://localhost:9700
    For invoking BPEL process through JSP, I have reused the jsp files available in : 102.InvokingProcesses\jsp and changed the processes and input accordingly.
    Please post me a query in this thread, if any of you want any specific details.

  • How to pass thr document from Webdynpro into SAP R/3?

    HI Gurus,
    I have a requirement to offer a Document uploading option through Java webdynpro screen.
    I have referred the below link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
    which has the steps till uploading the document into Webdynpro
    Now my requirement is to pass the document into SAP R/3? is there any RFC for that?
    Please ad

    Refer Oliveri's solution in [this|Re: How to upload file from Web Dynpro into R/3 (BAPI_DOCUMENT_CREATE2); thread.

  • How to pass the document from Webdynpro to SAP R/3?

    HI Gurus,
    I have a requirement to offer a Document uploading option through Java webdynpro screen.
    I have referred the below link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
    which has the steps till uploading the document into Webdynpro
    Now my requirement is to pass the document into SAP R/3? is there any RFC for that?
    Thanks in Advance,
    Dharani

    Hi,
    The documents are uploaded from WDJ to Portal Server  / Portal Content Directory / Some Shared Drive .
    So that they can also be programmed such a way that they can be fetched whenever needed .
    The requirement is interesting but before you take step think how far it is feasible .
    Regards,
    Srini

  • How to bind/pass multiple input parameters to sql query in BPEL Process

    Hi,
    I have a requirement to invoke a query on a database table to fetch the records based on the few input values or bind variables?
    I have created a Partner link using the DBAdapter service and have used custom SQL, how can i bind and pass multiple bind/input parameters for these queries.
    foreg: if i have to query employee records based on name , desgination and age, these three params would be my input parameter that i will pass when i invoke the BPEL process, bow how can i pass these parameters to the partner link using DBADAPTER service.
    Please help
    Regards

    If the parameter-value is not known beforehand and cannot be determined based on the process instance data at that time, there are 2 options. Either invoke the PL/SQL procedure you named using a DB adapter service to get the value and pass it to the other DB adapter service. Or create a single service (e.g. PL/SQL procedure) that determines the parameter value, executes the query and returns the result. However, this is more a design issue. Does it makes sense to combine these actions in a separate service and use it or are these actions not related? You furthermore state that additional (DB adapter) services make the process heavier. Do you have strict requirements on the time process-instances may run or other such requirements? If not, I think the design-choice on whether combining these actions in a single service should have more priority.

  • How to pass Employee number of MSS - Employee Search to Start Process

    Hi All,
    Just like HR admin role, Employee Information number is getting passed in Display Processes, Start Processes, and Personnel File, we have to make same scenario working for MSS also.
    In MSS, General Information Page, when manager selects the Employee, then that Employee Number should get passed in Display Personnel File and also in Start Process.
    I am new to HR module so I have not explined the requirement properlly, but Experts may be knowing this. Please help.
    Regards,
    Nikesh

    Hi Siddharth Rajora,
    I have actually 2 doubts..
    1. You mean to say this can be done and is already implemented, but I think it will only work if we put "Display Personnel File and Start Process" under "Related Activities" area right ?
    2. But user wants these views in the Detailed Navigation, so if he selects PERNER from general Information Page, and then if he clicks on "Start Process (under Detailed Navigation)" , then it shud show list of processes for that Employee.
    Can you please guide me properly.

  • How to pass Employee number of MSS - General Information to Start Process.

    Hi All,
    Just like HR admin role, Employee Information number is getting passed in Display Processes, Start Processes, and Personnel File, we have to make same scenario working for MSS also.
    In MSS, General Information Page, when manager selects the Employee, then that Employee Number should get passed in Display Personnel File and also in Start Process.
    I am new to HR module so I have not explined the requirement properlly, but Experts may be knowing this. Please help.
    Regards,
    Nikesh

    Hi Siddharth Rajora,
    I have actually 2 doubts..
    1. You mean to say this can be done and is already implemented, but I think it will only work if we put "Display Personnel File and Start Process" under "Related Activities" area right ?
    2. But user wants these views in the Detailed Navigation, so if he selects PERNER from general Information Page, and then if he clicks on "Start Process (under Detailed Navigation)" , then it shud show list of processes for that Employee.
    Can you please guide me properly.

  • How do I call a simple java class from a bpel process?

    Hi.
    In JDeveloper 10.1.4.3.0 I've created a simple java class that does an ftp get operation followed by an unzip. The class uses some 3rd part libraries (jars).
    I want to use a simple bpel process to schedule a daily execution of this java class, and deploy it all to our SOA-server, - and was looking into using the <bpelx:exec> function.
    The java class and the bpel process is all stored in the same JDeveloper project.
    How do I put this together so that both my java class and the necessary jars are available to the bpel process?
    I've looked into the JavaExecSample.bpel, and it's says something about "...the class com.otn.samples.javaexec.CreditCalculator is locally packaged with this BPEL process".
    How do I do that?
    Can I make it and test it all locally from my workstation (only JDeveloper installed, I guess there's nothing that can execute the bpel code?), or do I have to compile class etc (make war-file?) and deploy to SOA server (BPEL-INF/lib or classes?) before anything can be tested?
    (I guess all this is simple, once you know how, but being a newbie to this I need a shove in the right direction :-)
    Regards,
    -Haakon-

    To create a java class and dependent jars inside the BPEL process project you need to do the following:
    1. Right click on your BPEL process project and select New and then Java Class from the Items.
    2. Make the BPEL process project, JDeveloper would compile the java classes and add them into the BPEL suite case jar, see the output folder and check the BPEL suite case jar file for java classes and dependent jars.
    You can test your Java classes from JDeveloper IDE, no need to deploy the classes on SOA server. When you make the BPEL project it compiles .bpel files and Java classes. You can test your classes once .bpel file and java classes compiled successfully.
    Regards,
    Dharmendra
    http://soa-howto.blogspot.com

  • Testcase, how to split up an xml message and call a BPEL process.

    Another question.
    Considering the following XML message.
    <?xml version="1.0" encoding="UTF-8"?>
    <rows>
    <row>
    <id>10</id>
    <naam>A</naam>
    </row>
    <row>
    <id>20</id>
    <naam>B</naam>
    </row>
    </rows>
    An input message can consist of 1 to about 20000 <row></row> elements. I would like to split up this message into individual <row></row> and call a BPEL process for further processing.
    I've tried to use the file adapters feature "Files contain Multiple Messages" Publish Messages in batches of.." This did not work. ( root element expected exceptions ).
    I've also tried to invoke an extra async routing service with a mapping which removes the root element. This also doesn't work as it leaves the following ( incorrect ) xml message at the end.
    <row>
    <id>10</id>
    <naam>A</naam>
    </row>
    <row>
    <id>20</id>
    <naam>B</naam>
    </row>
    Which is logical considering how an XSL transformation works.
    Is there any way to achieve this?
    Any help is appreciated!

    You shoul create a while loop, that loops through XML payload for each row. Than you can process each individual row. See also example:
    C:\orabpel\samples\tutorials\112.Arrays\ArraySample.bpel

  • How to use AQ Adapter for Enqueue and Dequeue in BPEL process

    Can anyone help me how to use Enqueue and Dequeue in BPEL process ? Any good sample or material /tutorial??
    Thanks

    You shoul create a while loop, that loops through XML payload for each row. Than you can process each individual row. See also example:
    C:\orabpel\samples\tutorials\112.Arrays\ArraySample.bpel

  • How to pass .txt file as an attachment to the web service (SOAP Attachment)

    Hi,
    I am creating web service using NetBeans 6.5 IDE and JAX-WS. I create a web application and then create web service using provided interface. I want to add .txt file as an attachment/parameter to the web service operation using "Add operation" interface. Don't want to add as an attachment to the SOAP message by creating it explicitly. IDE generates SOAP request and response automatically when the service is tested using "Test Web service" option. How can I add attcahment when I add operation so that it will appear in the generated SOAP message ?
    TIA.

    Hi AnitaDP,
    Attachment doesn't work in web service. You have to pass the content of the text file as a String or as an array of bytes to a method of your web service. From there, you may save the passed data in a file.

  • MII BLS Trasaction calling SAP RFC call - How to pass XML document as input parameter

    Hi,
    1. I am very new to the SAP and SAP xMII workbench.
    I have a webpage with iGrid applet embedded on it. We have multiple rows in the iGrid applet that can be selected by user.
    After selecting single or multiple grid rows user clicking a 'button' on the web page.
    We are using iCommand applet (ExacuteQuery] to call the BLS transaction.
    Using iCommand applet on the webpage we are passing parameters to BLS Transaction.
    Would like to pass on the single/ multiple selected grid row values as a XML document to BLS Transaction variable which is an Input parameter for SAP RFC call.
    I am using SAP JCo Session to make the RFC call. 
    Any pointers will be helpful.
    2. Which is a best track in SAP training courses to get formal training.
    Thanks,
    Senthil

    Hi Senthil,
    What version of MII (or xMII) are you working with?  There are some examples of this type of transaction in the wiki which you may want to download and take a look at.
    Regards, Mike
    SAP Customer Experience Group - CEG

  • How to pass page session variable to on-demand PL/SQL process

    I am trying to execute a stored procedure that takes two page session variables as input and executes code based on those two variables. I have tried creating a stored procedure on the db-side and calling it using:
    BEGIN
    PROC_UPDT_EMP(&P23_TC_ID, &P23_EMP_ID);
    END;
    but APEX rejects the variables.
    I have also tried putting in the entire procedure in APEX as well, but I get the same problem. I have also tried using the :P23_TC_ID syntax, and still a no-go. What am I doing wrong?

    If PROC_UPDT_EMP is a stored procedure that takes 2 IN parameters, you would do
    proc_updt_emp(:P23_TC_ID,:P23_EMP_ID);in an after-submit page process. That would pass in the values of those 2 items from session state.

  • How to pass credentials to an external web service from BPEL in 11g

    Hi All,
    I am using JDev,SOA 11.1.1.2.0.
    In our process we are calling siebel service which is a secured one and it does not use wsse security headers.
    In siebel service i am passing username and password through soap headers.
    What we need to do apart from this?
    In 10g we have done this by passing these values through invoke activity.
    In 11g i did not find any thing like this.
    Please help me out.
    Regards
    PavanKumar.M

    go to composite
    Right click on the external reference service and select “Configure WS policies” :done
    Under the security tab, click add button and select “oracle/ wss_username_token_client_policy :done
    6. Now Open the property Inspector window and click the add button under “Binding properties” tab. :done
    7. Include the “oracle.webservices.auth.username--> :done
    value-->password :done
    8. Include the “oracle.webservices.auth.password”-->name :done
    value-->password :done
    Thanks

Maybe you are looking for

  • Using Database views in source qualifier

    Hi, I have a view in my database which when ran from SQL developer returns me around 1202527 records. But using the same view, when I write source qualifier in the Informatica Mapping (straight forward mapping without any filter etc), the number of r

  • When I Conditional Supress the page footer. It occupy space in report

    I am designing Crystal report with multiple page footers.Initially I have suppressed all page footer. Each page footer is un suppressed against a specific Test Id (db Field). I have done this with formula for each page footer. The problem is when Pag

  • PDF as a Collection Media Format

    What do we do with channels/collections that are in PDF format? Our Education and Outreach Office was planning to upload lesson plans in PDF format. And I noticed that PDF was not one of the Collection Media Formats, only SD video, HD video and audio

  • Missinchronizing sound in swf, but working fine in LivePreview

    Hey I have been making a short flash movie. The idea is that music synchronizes with picture changes. So, I created a music layer, placed some pictures in other layers and synchronized them in LivePreview. But when I tired to export movie or compile

  • ORA-12535 error but TNSPing Works and listener logs connection

    We recently migrated our firewall and then started seeing this problem for users outside of our own subnet. However, although the user gets this error when launching the application, the workstation is able to TNSPing the server successfully and list