How to design BPEL process where BPEL is called by PL/SQL code?

Hi,
My BPEL process is called by a PL/SQL code given below.
CREATE OR REPLACE PROCEDURE testd(errbuf OUT VARCHAR2,
retcode OUT VARCHAR2)
IS
soap_request VARCHAR2(20000);
soap_respond VARCHAR2(10000);
http_req UTL_HTTP.REQ;
http_resp UTL_HTTP.RESP;
l_detail VARCHAR2(10000);
endpoint VARCHAR2(130);
begin
endpoint := 'http://afsmlnx04.rheem.com:7105/soa-infra/services/default/HelloWorldPayload/bpelprocess1_client_ep';
soap_request := '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="http://oracle.nl/HelloWorldPayload"><ns1:process><ns1:input>abc</ns1:input></ns1:process></soap:Body></soap:Envelope>';
http_req := utl_http.begin_request(
endpoint
, 'POST'
, 'HTTP/1.1'
utl_http.set_header(http_req
, 'Content-Type'
, 'text/xml');
utl_http.set_header(http_req
, 'Content-Length'
, length(soap_request));
utl_http.set_header(http_req
, 'SOAPAction'
, 'process');
utl_http.write_text(http_req, soap_request);
http_resp := utl_http.get_response(http_req);
utl_http.read_text(http_resp, soap_respond);
utl_http.end_response(http_resp);
dbms_output.put_line('soap'||soap_respond);
EXCEPTION
WHEN utl_http.end_of_body THEN
utl_http.end_response(http_resp);
WHEN utl_http.request_failed THEN
DBMS_OUTPUT.PUT_LINE('Request Failed: ' || utl_http.get_detailed_sqlerrm);
WHEN utl_http.http_server_error THEN
DBMS_OUTPUT.PUT_LINE('Server Error: ' || utl_http.get_detailed_sqlerrm);
WHEN utl_http.http_client_error THEN
DBMS_OUTPUT.PUT_LINE('Client Error: ' || utl_http.get_detailed_sqlerrm);
WHEN others THEN
DBMS_OUTPUT.PUT_LINE(sqlerrm);
END;
The above procedure will be defined as concurrent program in Oracle EBS.This concurrent program will call the bpel process.My question is how should i design the bpel process so that bpel will know it is called by a concurrent program?
My BPEL is doing picking a file by FTP adapter and inserting data into a table.
Please throw some lights on this!!

Option 1:
You have to design the service as a synchronous BPEL process
1. Do a synchronous ftp get to read the file.
2. Transform and write it into database table
3. Reply results back to plsql
Disadvantage: Your BPEL process should complete from BPEL timeout happens.
Option 2:
1. Enqueue the message into AQ from the concurrent program
2. From the BPEL monitor the AQ, start the process when the message arrives
3. Do a synchronous ftp get to read the file.
4. Transform and write it into database table
You cannot reply the results back to concurrent program.
5. However, you could have another AQ to send the results back to concurrent program.
6. Your concurrent program should listen to the resultsAQ to get the results back from BPEL.
Option 2 is a relliable design.
--Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How to design multiple file polling BPEL process?

    Hi all,
    I am trying to solve/design the following in BPEL process:
    - The integration process flow I am trying to design is an interaction b/n system A (FTP server), an Integration platform and system B.
    - The integration platform will poll files from an internal FTP server. It has 2 Time files (“Time1” and “Time2”) alternatives to poll from the FTP server. It will then transform the message/information inside the files (time information) to an internal XML format. At the end it shall send the message to system B.
    - The information inside the files is identical. The reason to have 2 files with identical information is for redundancy. The integration-platform shall only poll file “TIME1” as long as the conditions are met. If the conditions are not met, then it polls file “Time2”.
    Normal succeeded scenario:
    1- The integration platform polls the latest “Time1” file from the internal FTP server. The polling is done every 15th minute.
    2- The integration platform logs to BAM and reports that the file is received.
    3- The platform then converts the message to an internal format.
    4- The platform sends the converted message/time information to system B.
    5 - The use-case ends.
    Not normal scenario:
    1- The platform cannot get/receive file “Time1” file.
    - The platform logs to BAM and reports that the file could not be received.
    - The platform polls file “Time2” from the FTP server and it does the same normal scenario as above. The use case ends.
    2 - Time message/information from the Time1 file has not full information (less than 24 rows). The file is supposed to have 24 rows (for 24 hours).
    - The platform logs to BAM and reports that there is missing information on the message.
    - The platform gets/polls instead the “Time2” file from the FTP server and it does the normal scenario.
    - The use case ends.
    3- The platform can find/get neither file “Time1” nor “Time2”.
    - The platform alarms to BAM that it could not get/find the files.
    ** I am considering either the pick activity or the switch activity solution. Does any one of you have an idea how to design this in oracle BPEL process?
    Thanks.

    Not sure I understand your use case completly so if I'm off track I apploigise.
    I think there are 3 ways to solve this. The 3rd may be closest to what you are looking for.
    1. Have 2 processes that read into a common area, e.g. database where you can compare. From there you can choose which file to pick. This is high leve but I think this would be dificult to implement.
    2. Implement a combination of a rejectedMessage handler and error processing witn the BPEL process itself. The rejecte message handler can call another BPEL process if the time1 file is in a invalid state. This process will then read the time2 file. The issue with this is that the rejecte message handler will only get invoked when the file doesn't conform to the schema.
    3. Use the quarts scheduler whcih invokes a BPEL process every 15 miniutes. Using the file adapter to perform a synchronous read to read time1, analyse it, if it fails read time2 using synchronous read. Then perform the approprate action id this fails.
    hope this give some ideas.
    cheers
    James

  • How-to prioritize BPEL processes in BPEL PM 10.1.3.4

    Hi there,
    I would like to control the priority of my BPEL processes (in 10.1.3.4). In the documentation I read that this can be done via the embedded java method setPriority(). However, I am not sure if I should call the method from the appropriate BPEL process or if it should be done from the calling (higher-level) process.
    Are there any examples available?
    Thanks a lot, Danilo

    Hi Marc,
    thanks for your answer! What are the reasons why you wouldn't recommend to use it?
    The idea is to simply process some instances in a more preffered way. Imagine you have a Flow-Activity and certain sub-processes will be called inside. Depending on the content it is necessary to execute the process in branch A before the process in branch B or vice versa (simplified example).
    I assume there are no documents with some explanations about alternative methods...
    Apart from this, if I use the embedded setPrio, where should I position it?
    a) Within the calling process (I would guess so) or
    b) Within the process that should be prioritized
    Danilo

  • How to Invoke bpel process which is deployed in weblogic using java code

    Hi
    I want to invoke a BPEL Process which is deployed in Weblogic server using Java code. Please provide me the code snnipet which will be used to connect and then invoke a BPEL Process.

    The simple way would be creating a java client to consume the SOAP webservice interface exposed by the bpel process.
    If you have Oracle Service Registry you can also use UDDI to discover the endpoint at runtime.
    But you can also use direct binding to do that.
    If you search on internet you will find many blog entries about this as well as many related posts here on OTN.
    I can't suggest a specific one, but looking on Google this one seems quite ok: Managing Oracle SOA Environment [10g/11g]: Invoking SOA11g Composite Using Direct Binding Invocation API

  • How to deploy a non BPEL process on BPEL server

    Hi,
    I am having a process (.war) file. i want to deploy it on my BPEL server, I am trying to deploy it using BPEL console. but it is asking bpel.xml.
    should i need to create any bpel file ?

    BPEL Console is for deploying BPEL projects. And when you talking about war file, those are web archive files, application server specific. Please refer to the Application Server document for deploying war files. Like for OC4J, you can do the same via Enterprise Manager.

  • BPC 7.0 - how to design business process flow type Planning process?

    Hi All
    BPC 5.1 system has Business Process Flow, to design synchronized activity plans for a set of user.
    Like we designed user planning in two step BPF -Step1 and Step2, where Step2 was activated only after user completed Step1.
    How to design such requirements in BPC NW 7.0 version?
    Thanks in advance.
    Regrads
    Abhishek
    Edited by: ABHISHEK JAIN on Mar 21, 2009 8:05 AM

    Indeed, if by chance you have not seen the related How-to-Guide, there is an [Article|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f085dd92-a40c-2c10-dcb1-a7c24476b23a] on How to Create a Custom Menu in BPC NW here on the BPX community.
    There is also a lot of explanation on using EVMNU on the SAP Service Marketplace in the [Documentation Addendum|https://service.sap.com/~sapidb/012003146900000031772009E/7NW_SP02_Doc_Addend.pdf] to BPC 7.0 SP02 NW Central Note 1306898
    Best regards,
    [Jeffrey Holdeman|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/jeffrey+holdeman]
    Enterprise Performance Management
    Regional Implementation Group
    Edited by: Jeffrey Holdeman on May 28, 2009 8:40 PM

  • Error while checking the flow of bpel process in bpel console

    Hi Experts
    I have created one bpel process which invokes task manager for approving or rejecting the leave request. I ve successfully deployed the bpel process and also able to test approve or reject the leave request . But i am facing one error
    when i am initiate a bpel process and started to check the flow of that bpel process in bpelconsole it gives me some error message in small pop up like
    error : Internal/ bug ( #589 )
    \u017E is not defined
    i click Ok and after this no error and all working well.
    Thanks.

    A quick answer is:
    1. make sure you defined the Application/Integration Server in your developer (user/pass you have - if not oc4jadmin then one the IT gave you).
    2. Deploy your project to that server.
    3. Choose the correct domain in the Console when deploying.
    Is this what you wanted to know???

  • How to review implication of database character set change on PL/SQL code?

    Hi,
    We are converting WE8ISO8859P1 oracle db characterset to AL32UTF8. Before conversion, i want to check implication on PL/SQL code for byte based SQL functions.
    What all points to consider while checking implications on PL/SQL code?
    I could find 3 methods on google surfing, SUBSTRB, LENGTHB, INSTRB. What do I check if these methods are used in PL/SQL code?
    What do we check if SUBSTR and LENGTH functions are being used in PL/SQl code?
    What all other methods should I check?
    What do I check in PL/SQL if varchar and char type declarations exist in code?
    How do i check implication of database characterset change to AL32UTF8 for byte bases SQL function.
    Thanks in Advance.
    Regards,
    Rashmi

    There is no quick answer.  Generally, the problem with PL/SQL code is that once you migrate from a single-byte character set (like WE8ISO8859P1) to a multibyte character set (like AL32UTF8), you can no longer assume that one character is one byte. Traditionally, column and PL/SQL variable lengths are expressed in bytes. Therefore, the same string of Western European accented letters may no longer fit into a column or variable after migration, as it may now be longer than the old limit (2 bytes per accented letter compared to 1 byte previously). Depending on how you dealt with column lengths during the migration, for example, if you migrated them to character length semantics, and depending on how relevant columns were declared (%TYPE vs explicit size), you may need to adjust maximum lengths of variables to accommodate longer strings.
    The use of SUBSTR, INSTR, and LENGTH and their byte equivalents needs to be reviewed. You need to understand what the functions are used for. If the SUBSTR function is used to truncate a string to a maximum length of a variable, you may need to change it to SUBSTRB, if the variable's length constraint is still declared in bytes.  However, if the variable's maximum length is now expressed in characters, SUBSTR needs to be used.  However, if SUBSTR is used to extract a functional part of a string (e.g. during parsing), possibly based on result from INSTR, then you should use SUBSTR and INSTR independently of the database character set -- characters matter here, not bytes. On the other hand, if SUBSTR is used to extract a field in a SQL*Loader-like fixed-format input file (e.g. read with UTL_FILE), you may need to standardize on SUBSTRB to make sure that fields are extracted correctly based on defined byte boundaries.
    As you see, there is universal recipe on handling these functions. Their use needs to be reviewed and understood and it should be decided if they are fine as-is or if they need to be replaced with other forms.
    Thanks,
    Sergiusz

  • How to design a process for this condition

    Hi
    What type of activities should use when
    Activity A and Activity B must complete then only transition should go to Activity C
    Thanks

    Make use of Join. This will make sure A & B is completed before C is being called

  • How to get the home page for a user using  Pl/sql code ?

    Hi,
    I have a pl/sql procedure which runs after a form submission on a dynamic page. At end of completion of the procedure I want to send user to his/her home page. I am trying to write at the end of procedure to redirect the user to the home page. How do I do that ? What is way to redirect to a page using pl/sql and how do I know the user home page url ?
    thanks,
    Mainak

    Hi,
    Try <portalschema>.wwv_redirect.url('<portalschema>.home');
    Please replace portalschema with the name of your portal schema.
    Thanks,
    Sharmila

  • How to Export data from a Table to Excel using PL/SQL Code

    Hi,
    I need to export data from a table to the excel sheet using PL/SQL script.
    could you pls provide with custom codes or sample procedures.
    Bobby

    http://asktom.oracle.com/pls/ask/f?p=4950:8:7947129213057862756::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:728625409049

  • How to show the processing time taken for a BPEL process in BAM report.

    Hi All,
    I have the data as below in the Data object. I would like to show the time taken for each order to complete in the report.
    instance Id     order Id     product Name     product Code     price     status     instance Time      updaterName
    1360010     ord004     Guitar     prod003     2000     requested     9/22/2008 12:12:11 PM     Invoke_InsertSalesOrder
    1360010     ord004     Guitar     prod003     2000     Approved     9/22/2008 12:15:11 PM     Invoke_OrderStatusUpdate
    This data comes from simple BPEL process where sensors are configured at the start and end of BPEL process. Also have a human task activity in between to create the time difference.
    In Enterprise link design studio, I tried to calculate the time difference using expression calculator and store it as calculated field. But that doesn't seems to work because when I execute the plan, second sensor data reaches only after human approval whereas first sensor data would be waiting for calculation and ultimately nothing comes into data object.
    How and where the calculation be done to show the processing time in the report. Please someone throw some light on this.
    Regards
    Jude.
    Edited by: user600726 on Sep 30, 2008 1:30 AM

    I would suggest modifying your data object so that the data can all be in a single row and use the sensor at the end of the process to upsert (update) the row created by the sensor at the start of the process. The time difference between two fields in the same row is then an easy calculation on a BAM report -- No EL plan should be needed.

  • How to set input/output "use" attribute in the WSDL file of BPEL process?

    Hello,
    I have a BPEL process that I want to deploy it as an RPC web service. I want to access it from a Java module (via an automatic generated Java stub from the WSDL file exposed by the BPEL process).
    I wrote manually the corresponding WSDL file for my BPEL process, where I stipulated for the operations exposed by my process ( in <soap:binding> tag) the value of the attribute "style" to "rpc". Also, for each <input> and <output> of the operations (inside the <operation> tag), I set manually the attributes "use" to the values "encoded". Something like this:
    <operation name="getCustomers">
    <soap:operation style="rpc" soapAction="getCustomers"/>
    <input>
    <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="Trial"/>
    </input>
    <output>
    <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="Trial"/>
    </output>
    </operation>
    The issue is that, when the BPEL process is built and deployed, the WSDL file generated automatically by BPEL (based on the one manually writen) set the values of the "use" attributes to "literal". This is what is generated:
    <operation name="getCustomers">
    <soap:operation style="rpc" soapAction="getCustomers" />
    <input>
    <soap:body use="literal" namespace="http://acm.org/samples" />
    </input>
    <output>
    <soap:body use="literal" namespace="http://acm.org/samples" />
    </output>
    </operation>
    Is there any chance to keep the original values (written by hand) for the "use attributes?
    Many thanks in advance!
    Regards,
    Marinel

    I am not sure I understand your question. If you want all your BPEL service to be rpc still by default, you can change the templates: C:\eclipse\plugins\bpelz_0.9.XXX\templates.
    The BPEL PM engine support both style of invocation.
    I hope this helps. -Edwin

  • How to synchronize BPEL process?

    I want to synchronize BPEL process not to be called in parallel when other is updating a record in database. For example
    I have a process called 'updateEMP' to update EMP table
    I have few other process which invokes 'updateEMP'
    At any point in time I want to restrict to run only one 'updateEMP' thread to avoid database DEADLOCK and other 'updateEMP' processes should wait in the Q.
    Is there any way to achieve it?
    Appreciate your help

    Scenario is like this.
    I have a 'BPELEmpUpdate' process updates EMP table in the target database. Note that this process is not directly updating the database. MS SQL stored procedure is invoked from this process to update the table.
    I have 2 other process from different applications which invokes 'BPELEmpUpdate' to update the same table. So if these 2 processes invokes 'BPELEmpUpdate' at the same time, one of the process creates 'Deadlock' on the table and the second process fails.
    So to avoid this scenario is there any procedure to follow/allow only one 'BPELEmpUpdate' process to execute one time and rest wait in the Q.

  • Calling a bpel process from other Bpel process

    hi,
    my req is
    i have created BPEL process where getting the list of customers by giving the partial name using DBAdapter...... getting the output from the Invoker and the output is assinged to a assing activity(thru copy operations) from assign to replyoutput.
    for example from partial output (eg: input---name=Wor%)
    output:
    World of Business
    World of Concrete
    Worldwide Communications
    Worldwide Communications-Vision Corporation-2090
    here if i click the 'Worldwide Communications-Vision Corporation-2090' it should show the sub-details of the name sucha as name,address..............
    how to call subdetail process to show the subdetails by cliicking on the name
    the above process done on the front-end

    Hi
    API's are available to call a BPEL process from the front-end.
    you can invoke a BPEL with the required SOAP msg.
    Thanks

Maybe you are looking for