This discussion is archived
9 Replies Latest reply: Nov 14, 2012 2:13 AM by ARPL RSS

I want to send multiple requests to Same BPEL instance

902286 Newbie
Currently Being Moderated
Hi All,

I want to send multiple requests to same running BPEL instance in hich I am using DB adapter.I want to save the data from request schemas (to BPEL) in database by using DB Adapter(same kind of multiple request schema data).After saving that data as the multiple rows in the database,I want to invoke the other WSDL to pump that data at the end of the day>

How Can I do that? Can I use DB adapter for that?


Thanks in advance
  • 1. Re: I want to send multiple requests to Same BPEL instance
    veejai24 Pro
    Currently Being Moderated
    Yes, you can have a simple bpel with db adapter.
    Following are the steps you need to perform.

    1. You should create a BPEL process
    2. Modify the incoming request according to your requirement
    3. Create a database adapter and configure it to your table.
    4. Then create a transformation XSLT with source as your request and target as your input message for db adapter.

    Let us know how you go !!!!

    *7) Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question.*

    Thanks,
    Vijay
  • 2. Re: I want to send multiple requests to Same BPEL instance
    902286 Newbie
    Currently Being Moderated
    Hi Veejai,

    Thank you very much for your reply.I will explain my req in detail.

    I have two applications A and B.I am using BPEL to integrate them.
    Actually BPEL recieves request from A and updates the data into B.

    But request comes for every half an hour from A.I need to get the data for whole 24 hrs(48 times or more than that - in which BPEL recieves data for every half an hour) and push the data into B at a time(whole 24 hrs data).


    Can I do that in BPEL process?

    Is it like I have to hold the data for every half an hour in a staging table and push the whole data at the end of the day(after 24 hrs means at 12 o clock midnight)?

    Please put some light on this requirement?

    Thanks in advance
  • 3. Re: I want to send multiple requests to Same BPEL instance
    veejai24 Pro
    Currently Being Moderated
    Yes, you can do this with BPEL.

    1. Have 2 BPEL process
    2. BPEL-1 will collect the message from Application-A and insert into staging table as you said. While inserting the data into the table use a column which will have data as X and once consumed by BPEL-2, make the column value as R or something, just to identify whether that paricular record is read by BPEL-2 or not.

    3. BPEL-2 will run using scheduler, which will run only once a day. This bpel will be polling on staging table and consume the data from the staging table to the target table, using DBAdapter.

    You can use Mediator if you are not going to have any orchestration in this BPEL-2.

    Thanks,
    Vijay
  • 4. Re: I want to send multiple requests to Same BPEL instance
    902286 Newbie
    Currently Being Moderated
    Hi Vijay,

    Thank you very muich for giving the ultimate direction for my task. I need one more clarification on 2 nd and 3 rd point that you mentioned.


    2 nd point:

    " BPEL-1 will collect the message from Application-A and insert into staging table as you said. While inserting the data into the table use a column which will have data as X and once consumed by BPEL-2, make the column value as R or something, just to identify whether that paricular record is read by BPEL-2 or not. "

    You mean to say that I have to include two BPEL processes in my composite application and every request comes to BPEL-1 and creates instance for every request.
    We don't need to bother about how many instances created as this process is just for taking requests and inserting it into the staging table.
    After that I need to put some wait activity of almost 24 hrs between BPEL-1 and BPEL-2.

    3 rd point:
    "BPEL-2 will run using scheduler, which will run only once a day. This bpel will be polling on staging table and consume the data from the staging table to the target table, using DBAdapter."


    after reading the data from staging table ,I have to update that data into other application(B) for which I have WSDL url.That Url is response Wsdl URL and it takes the input of data from staging table.In this case I can not use DB adapter as we have to update the data through WSDL url.



    How to take input data from staging table when you give input to the WSDL URL(because we will have data in the multiple rows)?

    How to insert the data into WSDL input request schema so that it will be input of invoke activity of WSDL url and update the response?



    Thanks once again for giving me replies.

    I need this last clarifications.

    Edited by: 899283 on Oct 30, 2012 11:43 PM
  • 5. Re: I want to send multiple requests to Same BPEL instance
    veejai24 Pro
    Currently Being Moderated
    Breakdown of the process provided below.

    BPEL-1

    a. Pull the message from Application-A and insert into database using DB Adapter insert operation.

    The above will push the message into the table, as and when it receive the message from application A

    BEPL-2

    a. Use DB Adapter polling concept, you can configure to poll the table only once a day.
    b. BPEL-2 will run only one time a day and pull out all the data from database table
    c. Do the transformation according to application-B from database rows and call application - B wsdl.

    There is no need to have wait or scheduler in the approach.

    *7) Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question.*

    Thanks,
    Vijay
  • 6. Re: I want to send multiple requests to Same BPEL instance
    902286 Newbie
    Currently Being Moderated
    Hi Vijay,

    I have been implementing the whole composite applications by using two BPEL processes and two DB adapters.

    1) First combination of BPEL and DB Adapter:

    Step-1: BPEL is being used to pull the message from Application-A and then I am using DB Adapter to insert the data into a satging table.

    Result : It is working fine as it is inerting the Stagin table. DBadapter is sitting in 'External Refernces' section of Jdeveloper Composite application.

    2) Then I have created another BPEL sync process to take th data from Staging table to Aplpliaction B.I am using another DB Adapter which is used to receive the data from Staging table.That DB adapter is automatically sitting in 'Exposed Services' section.I think it is sitting in that'Exposed Services' as it is receiving the data(I am not fully sure why it is sitting in 'exposed Services' section).So When I configured DB Adapter and giving it as the input for BPEL-2(which has incoke activity to invoke application-B WSDL ) to update the data into application-B.

    But DB Adapter is not getting the data and I am getting below error:

    'Waiting for response has timed out. The conversation id is urn:9B8055902A7711E29F4225BFA12CEE93. Please check the process instance for detail"

    The second Adapter & BPEL is executing continously with the same error(I think it is the problem with DB adapter configuration).

    "<adapter-config name="GetIMDReadingToMDM" adapter="Database Adapter" wsdlLocation="GetIMDReadingToMDM.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">

    <connection-factory location="eis/DB/SOADB" UIConnectionName="SOADB" adapterRef=""/>
    <endpoint-activation portType="GetIMDReadingToMDM_ptt" operation="receive">
    <activation-spec className="oracle.tip.adapter.db.DBActivationSpec">
    <property name="DescriptorName" value="GetIMDReadingToMDM.Imdreading"/>
    <property name="QueryName" value="GetIMDReadingToMDMSelect"/>
    <property name="MappingsMetaDataURL" value="GetIMDReadingToMDM-or-mappings.xml"/>
    <property name="PollingStrategy" value="LogicalDeletePollingStrategy"/>
    <property name="MarkReadColumn" value="READSTATUS"/>
    <property name="MarkReadValue" value="YES"/>
    <property name="MarkUnreadValue" value="NO"/>
    <property name="PollingInterval" value="1"/>
    <property name="MaxRaiseSize" value="2"/>
    <property name="MaxTransactionSize" value="4"/>
    <property name="NumberOfThreads" value="1"/>
    <property name="ReturnSingleResultSet" value="false"/>
    </activation-spec>
    </endpoint-activation>

    </adapter-config>"

    As you clearly know about my req ,I hope you understand what is happneing now.

    ANd how to have the connection between the First DB Adapter(input to BPEL-2) and Second combination of DBAdapter&BPEL in Jeveloper's composte application?

    Please guide me to resolve this problem

    Edited by: 899283 on Nov 11, 2012 11:59 PM

    Edited by: 899283 on Nov 12, 2012 12:37 AM
  • 7. Re: I want to send multiple requests to Same BPEL instance
    veejai24 Pro
    Currently Being Moderated
    Dude, what is your staging table column names ?

    From the staging table columns, you are using READSTATUS in DB Adapter. If any new rows goes into staging table then the DB Adapter will pick up the message and you can do whatever you want with that data.

    So your Part A is working completely, without any issues..

    For Part B, check on the following.

    a. increase the polling interval to 10 secs or more.
    b. Insert a new record into the staging table with READSTATUS column value as 'NO'

    The above setting should work, if you still have issue, then share the error message from the log file.

    Thanks,
    Vijay
  • 8. Re: I want to send multiple requests to Same BPEL instance
    902286 Newbie
    Currently Being Moderated
    Hi Vijay,

    Thank you very much for your help so far.

    As you said part A is working properly.
    I need below clarifications :

    Regarding part B:

    I am getting only one record even though I have the multiple records(in Second DB Adapter) with READSTATUS column value as 'NO'.

    Is it because of configuration that I set in the specified xml (like polling interval,maxTransize etc)?

    Regarding Executing BPEL-2 only once in a day so that it can get the records for whole day from BPEL-1:

    BPEL-1 and BPEL-2 are in the same composite.As we already know BPEL-1 inserts the record for every half an hour in a day.That means it executes multiple times(creates instances for those multiple times).

    How do I execute BPEL-2 only once to get the records from table where as BPEL-1 executes multiple times?

    I have to get execute BPEL-1 multiple times in a day(means for multiple intervals) which inserts the table multiple times.After that I want to execute BPEL-2 at the end of the day(for example 12 O clock midnight) to get the all the records for that day.

    I hope you understand.

    Thank you very much for I have come so far because of you.

    Can you let me know info for above clarifications?

    And one more thing is I need to pull the data exactly at 12 o clock midnight(00:00:00 am).Can I set this in BPEL-2 to make it to execute at that time.?

    Edited by: 899283 on Nov 14, 2012 12:07 AM

    Edited by: 899283 on Nov 14, 2012 4:04 AM
  • 9. Re: I want to send multiple requests to Same BPEL instance
    ARPL Newbie
    Currently Being Moderated
    Hi,

    My 2 cents.

    I guess if you can use JMS, the solution will be simpler (If Application A can send a JMS message).

    Application A --> JMS queue/Topic (persistance) --> BPEL/Mediator composite --> Db adapter.

    JMS Queue/topic will be populated with messages and end of the day you can use BPEL/Mediator composite to retrieve messages.

    Here BPEL Mediator composite can use a scheduler (Quartz) to run at a specified time.

    Regards,
    ARPL

    Edited by: ARPL on Nov 14, 2012 4:10 AM

    Edited by: ARPL on Nov 14, 2012 4:12 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points