JDBC/select/async statement to JDBC/stored procedure/sync call

Hi
We have JDBC/select/async statement to JDBC/stored procedure/sync call i.e sender and receiver are JDBC.
PI has to pick all the the records of single internal order number at a time from sender system and upload to receiver JDBc,
gets the response and routes to sender/insert statement.
This should run only once per day.
We will have multiple Internal orders daily, each order consisting of 10 to 20 records but only one IO related records has
to upload to Receiver/JDBC
What are the options available ?
We have thought of following options
1. SQL query is already to pick, but we have to pick records at one time daily. example: morning,evening or midnight.
   At that time it can pick multiple times but it should not pick through out day
2. Is there any option in BPM so that we can group IO's at a time and upload ? If so what are the steps need to use
   Any additonal receive step need to be used to pick the records from the table.
Thanks

hi
as i can understando you, you will receive mani IO and you must execute one IO in the receiver SP? if so, you can solve this usssing a ccBPM where you will have to create a mapping(0.N) where the source and the target structure will be the same, the diferrence will be in the occurrance of the target structure which will have to be 0.N (Tab signature in Message Mapping). then back to the ccBPM define a block with the property ForEach. this will  loop any times accord with the number of IO that you receive from the sender. as a result you will execute one SP for each IO.
so, you ccBPM will be
RS>TS>BLOCK(Multiline container and single container of source structure)>TS->SS
RS:Receive Step
TS:Trans. Step
SS:Send Step
Also the container will be:
source--> type Abs
source_multiline --> type Abs
target -->type Abs
Thanks
Rodrigo P.
Edited by: Rodrigo Alejandro Pertierra on Jun 24, 2010 4:54 PM

Similar Messages

  • Can a Stored Procedure be called from a Rule (not using Scripted JDBC Adap)

    Hello smart people,
    Question: Can a stored procedure be called from a Rule without using the Scripted JDBC Resource Adapter?
    What's Desired: The project has very strong sql developers and average at best Java developers. We have been successful at implementing the scripted JDBC Resource Adapter which makes use of Java Bean shells. The custom Java Bean shell contains code that calls a stored procedure. We are cool with that process.
    However we would like to be able to set up a Rule that calls a Stored Procedure without jumping thru the Java Bean Shell layer. The Stored Procedures we will be developing will not access the tables in the Waveset database. Instead the Stored Procedures will be accessing custom tables in a custom database. The custom DBase will be housed on the same dBase server as the Waveset database.
    Environment: Identity Manager 7.1. Oracle 10i, and Unix OS.
    It seems to me that this task is possible, but the posts in this forum make it sound like perhaps it is not.
    Do any of you smart people agree that it should be possible or better yet has anyone implemented such an approach?
    Thanks.

    We did this by putting all of the JDBC calls into a Java class, then instantiated that class and called the methods from within a rule. An example of a rule we used is this:
    <Rule authType='UserMembersRule' name='List UserType'>
      <block>
        <defvar name='adapter'>
          <new class='com.waveset.adapter.ScriptedJdbcResourceAdapter'/>
        </defvar>
        <invoke name='setResource'>
          <ref>adapter</ref>
          <invoke name='getObject' class='com.waveset.ui.FormUtil'>
            <ref>context</ref>
            <s>Resource</s>
            <s>Banner</s>
          </invoke>
        </invoke>
        <defvar name='jdbcHelper'>
          <new class='edu.bates.JDBCHelper'>
            <invoke name='getConnection'>
              <ref>adapter</ref>
            </invoke>
          </new>
        </defvar>
        <defvar name='userList'>
          <new class='java.util.ArrayList'/>
        </defvar>
        <invoke name='addQueryToList'>
          <ref>jdbcHelper</ref>
          <s>SQL QUERY HERE</s>
          <ref>userList</ref>
        </invoke>
        <ref>userList</ref>
      </block>
      <MemberObjectGroups>
        <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
      </MemberObjectGroups>
    </Rule>

  • DDL Statements in a Stored Procedure

    Is there some technique which can be used to execute DDL statements in a stored procedure? I want to drop and recreate a table and a number of indexes. Is there a way for me to do this within a stored procedure?
    Thanks in advance for your assistance!!!

    BEGIN
       EXECUTE IMMEDIATE 'CREATE TABLE bonus (id NUMBER, amt NUMBER)';
    END;http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/13_elems18.htm#33889

  • Writing mulitple sql statements in 1 stored procedure

    Hi all, can i know how to create mulitple sql statements in 1 stored procedure??
    Eg the first sql statement will generate few results and my second sql statement will based on the first statement result to execute its second results and my third sql statements will on the second results to generate the final results which will be passed back to jsp pages as a resultset??
    For the time being, i only know how to create a single sql statement in one stored procedure..i had surf through the oracle website but cant find any solution. Can anyone help me?? Samples or links to any website will do.. Thanks alot...

    Hi Irene,
    If I understand your question correctly, then I have already written
    a similar (PL/SQL) stored procedure without any problems.
    However, I do think your question is more suited to the following
    forum:
    http://forums.oracle.com/forums/forum.jsp?id=478021
    I also think it will help others to answer your question if you
    include the following information:
    1. Version of Oracle you are using.
    2. The error message you are getting.
    3. The part of your code that is causing the problem.
    Also, have you looked at the following web sites?
    http://asktom.oracle.com
    http://metalink.oracle.com
    Good Luck,
    Avi.

  • Use Stored Procedure to call up DI API

    HI all,
    I will like to know whether i can use stored procedure to create DI API when i triggers on new document on particular customer?
    Example:
    Database A create AR Invoice then i triggers on it directly use stored procedure to call up DI API to create AP Invoice on Database B without create any necessary add-on on the same server.
    Thank you.
    Cheers,
    danny

    Hi Danny,
    Sorry to inform you that it is impossible to call DI in stored procedure.
    An AddOn handling FormDataEvent,  DI Event service and B1iSN would be the right approches to your requirement.
    1.DI Event Service and B1iSN are solutions in server side. You can find DI EventService here:
    SAP Business One Tools [original link is broken]
    =>DI Event Service=>View this article
    Then you can find a sample project in its installation folder.
    2.AddOn soultion will be in the client of source company, just one addon is fine.
    sample code:
    Private Sub FormDataEventHandler( _
        ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, _
        ByRef BubbleEvent As Boolean) Handles oApp.FormDataEvent
            'You may add the target documents, 133 - A/R invoice.
            'Before action = true, start the transation
            If BusinessObjectInfo.FormTypeEx = "133" _
                    And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD _
                    And BusinessObjectInfo.BeforeAction = True Then
                oCompany.StartTransaction()
                'BubbleEvent = False
            End If
            'Before Action = false,
            'Update product item tree
            'Succeed, commit, otherwise rollback
            If BusinessObjectInfo.FormTypeEx = "133" _
            And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD) Then
                If BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.ActionSuccess Then
                    Dim objectKey As String = String.Empty
                    oCompany.GetNewObjectCode(objectKey)
                    MsgBox(BusinessObjectInfo.Type)
                    Dim oInvoice As SAPbobsCOM.Payments = Nothing
                    oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
                    If oInvoice.GetByKey(CInt(objectKey)) Then
                        Dim paymentInvoices As SAPbobsCOM.Payments_Invoices = oInvoice.Invoices
                        Dim oInvoices As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)                   
                        '======================================================================
                        'add you code to add A/P Invoice in company B
                        'oInvoices.GetByKey(***)
                        'lRetCode = add an A/P invoice according to A/R invoice above...
                        '======================================================================
                        'We don't need to rollback manually, it will be automatically rollbacked if any error ocurrs
                        If lRetCode = 0 Then
                            'update the production tree succesfully,
                            oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit)
                        End If
                    End If
                End If
            End If
        End Sub
    Kind Regards, Yatsea

  • Using Oracle Stored Procedure to call a webservice

    Hi,
    I am using this version of Oracle:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Requirement: I have to write a stored procedure that calls a webservice and get the result from webservice and show it on sqlplus.
    I have read some articles, and am confused as to where to start. I have come across UTL_DBWS and UTL_HTTP. But to use them, I have to set up my database accordingly allocating pool size etc.
    Is there an alternative?
    I am reading through a lot of stuff, but I am honestly not getting a hold of anything. Please advice, how I can go step by step.
    Thank you!!

    934451 wrote:
    Hi,
    I am using this version of Oracle:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Requirement: I have to write a stored procedure that calls a webservice and get the result from webservice and show it on sqlplus.
    I have read some articles, and am confused as to where to start. I have come across UTL_DBWS and UTL_HTTP. But to use them, I have to set up my database accordingly allocating pool size etc.
    Is there an alternative?
    I am reading through a lot of stuff, but I am honestly not getting a hold of anything. Please advice, how I can go step by step.
    Thank you!!don't use Oracle to complete any non-DB related task.
    while a shovel is a great tool for producing a hole in the ground,
    it is sub-optimal when the wrong end of the shovel is used to move the dirt.
    You are using the "wrong end" of Oracle.

  • Rollback of JDBC Statement on error - Stored Procedure

    Hi All,
    We are using the JBDC receiver adapter for inserting the record and for that we are using the Strored Procedure and we have N number of the records for insertion in a single mapping so, we have given the occurence of the Statement 1 : unbounded as, multiple statement will be executed so, my query is if one of statement fails because of some error(Mapping error or data error) what will happen to the statement which are already executed, do they rollback? or it is not possible in case of stored procedure?
    Regards,
    Gaurav

    Hi,
    This is one of the solution but i guess there is one more issue, if we have 10 statements and third statement shows error and Stored Exception exception branch is able to catch then it will rollback the previous statement but can we able to restrict another 7 pending statement for execution or not?
    Regards,
    Gaurav

  • JDBC - How to Get Data from Stored Procedure?

    Gurus,
    I am using Oracle Thin JDBC driver. A stored procedure has an IN parameter and an OUT parameter. The type of OUT parameter is TABLE of RECORD which is defined in the PL/SQL package in which the stored procedure is included. My question is if there is any way to call this stored procedure and process the data returned by the OUT parameter in my Java code.
    Thanks.
    Larry

    define in the pl/sql block as a cursor
    register the out parameter as an oracle.cursor
    on the java program get an object (from the statement), casting it to an resultset and then you can work on it

  • Execution time difference between SELECT & UPDATE statement in JDBC Sender.

    Hi Experts,
    In my scenario, I have used the JDBC Sender Adapter with the SELECT and UPDATE statement.
    Now the problem is in between the execution of Select and update statement, few more entries are coming in the same DB Table.
    So result of this is updation take place for those entries which are not even picked up by the select statement.
    Can we avoid this execution time difference between the SELECT & UPDATE statemet on JDBC Sender side???
    Thanks & Regards
    Jagesh

    Hi
    Use serializable option in additional parameters, now all new entries would also be updated.

  • JDBC-Adapter: Several inserts in a stored procedure possible?

    Hello,
    I'm using the JDBC-Adapter for writing data to an oracle database.
    At the moment, the data are mapped in the XI to several stored procedures(SP), one SP for each line. In this way, the data will be written to a temporary file. These data will be polled by Oracle then, to write them in the final table in one session.
    Is there a way to avoid the temporary file? I mean, is it possible to give over an array from XI to Oracle in only one SP?
    Thanks,
    Juergen

    Send all of your data to one SP and in the SP write the logic. One thing is SP will not support repeating strucutures. You might have to send an XML stream to one data field of the SP and the SP should parse it to DataSet or RecordsSet.
    VJ

  • Callable statement with oracle stored procedure error

    i'm calling a stored procedure in java with the following code. However i constantly recieve this error
    so what is going on please HELP
    Parameter Type Conflict: sqlType=2006
    my call statement would be this:
    call Statement = {call getUserByLogin(?,?,?,?)}
    if(storedProcedureName=="getUserByLogin"){
    strCStmt = ("{call " + storedProcedureName +"(?,?,?,?) }");
    cStmt.setObject(1, "system");
    cStmt.setObject(2, "username");
    cStmt.setObject(3,"password");
    cStmt.registerOutParameter(4, java.sql.Types.REF);
    rs = cStmt.executeQuery();
    i've also tried it with a setString as the IN parameter:
    here's the stored procedure:
    CREATE OR REPLACE PROCEDURE getUserByLogin (
    arg_subscriptionName IN varchar,
    arg_loginName IN varchar,
    arg_password IN varchar,
    arg_rec_userinfo_valLanguage OUT types.rec_userinfo_valLanguage
    ) AS
    var_userNum int;
    BEGIN
    select
    u.userNum into var_userNum
    from
    userInfo u,
    subscription s
    where
    s.subscriptionName = arg_subscriptionName AND
    s.subscriptionNum = u.subscriptionNum AND
    u.loginName = arg_loginName AND
    u.password = arg_password;
    if (var_userNum is null) then
    var_userNum := 0;
    end if;
    getUser(var_userNum, arg_rec_userinfo_valLanguage);
    END;

    i'm calling a stored procedure in java with the
    following code. However i constantly recieve this
    error
    so what is going on please HELP
    Parameter Type Conflict: sqlType=2006
    my call statement would be this:
    call Statement = {call getUserByLogin(?,?,?,?)}
    if(storedProcedureName=="getUserByLogin"){
    strCStmt = ("{call " + storedProcedureName +"(?,?,?,?)
    cStmt.setObject(1, "system");
    cStmt.setObject(2, "username");
    cStmt.setObject(3,"password");
    cStmt.registerOutParameter(4, java.sql.Types.REF);
    rs = cStmt.executeQuery();
    i've also tried it with a setString as the IN
    parameter:
    here's the stored procedure:
    CREATE OR REPLACE PROCEDURE getUserByLogin (
    arg_subscriptionName IN varchar,
    arg_loginName IN varchar,
    arg_password IN varchar,
    arg_rec_userinfo_valLanguage OUT
    types.rec_userinfo_valLanguage
    ) AS
    var_userNum int;
    BEGIN
    select
    u.userNum into var_userNum
    from
    userInfo u,
    subscription s
    where
    s.subscriptionName = arg_subscriptionName AND
    s.subscriptionNum = u.subscriptionNum AND
    u.loginName = arg_loginName AND
    u.password = arg_password;
    if (var_userNum is null) then
    var_userNum := 0;
    end if;
    getUser(var_userNum, arg_rec_userinfo_valLanguage);
    END;
    /Hai,
    Try with this if u are using Oracle.
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    (inbetween ur code)
    cStmt.registerOutParameter(4, OracleTypes.CURSOR);
    //in place of "cStmt.registerOutParameter(4, java.sql.Types.REF);"
    Hope u reply with joy.
    regards,
    Siva Kumar Annavaram

  • Create "dynamic" statements in a stored procedure

    hello
    in my stored procedure I need to write a statement like this:
    FUNCTION myfunct (mytable IN VARCHAR2)
    BEGIN
    EXECUTE IMMEDIATE
    'SELECT COUNT(*)
    INTO myvar
    FROM ' || mytable ||
    'WHERE mycol = ' || currval;
    In short I need to create a sort of "dynamic" statement in which the tablename (nad other...) is a variable....
    but I do not guess it's ok...
    How can I do?

    Hi,
    With dyanmic SQL, the INTO clause is part of the EXECUTE IMMEDIATE statement, not the query.
    Try something like this:
    CREATE OR REPLACE FUNCTION     myfunct
    (       mytable       IN     VARCHAR2
    RETURN     PLS_INTEGER
    IS
         return_num     PLS_INTEGER;
         sql_txt          VARCHAR2 (1000);
    BEGIN
         sql_txt := 'SELECT  COUNT (*)'
              || ' FROM ' || mytable;
         dbms_output.put_line (sql_txt || ' = sql_txt in myfunct');
    --     EXECUTE IMMEDIATE sql_txt INTO return_num;
         RETURN     return_num;
    END     myfunct
    /It's a good idea to develop dynamic SQL as shown above; putting the dynamic statement into a variable that can easily be displayed for debugging.
    When it looks right, then un-comment the EXECUTE IMMEDAITE statement.
    Before moving the code into Production, comment out (or remove) the put_line statement.

  • Extraction SQL statement from oracle stored procedure stored in file

    Hi,
    I am newbie to oracle stored procedure. I need to extract the list of sqls present in oracle stored procedure. Besides that I also want to parse these sql statements to get the list of tables and columns used. Is there any tool which can help me in doing thats.
    thanks,
    govind

    why don't check on user_dependencies table instead?
    select referenced_name,referenced_type
    from user_dependencies
    where name='<your stored procedure name in upper case>'
    and referenced_type = 'TABLE'HTH,
    Prazy

  • Got error when use case statement in oracle stored procedure

    Hi,
    I have a query like:
    select merchant_id,
    case
    when product_type='K' then 'Production'
    when product_carrier='UC' THEN 'Shipping'
    end the_type
    from product_tbl
    where merchant_id=10114
    It works fine. But as soon as I put it into a stored procedure, I got error like:
    Encountered the symbol "CASE" when expecting one of the following:
    ( - + mod null <an identifier>
    Please help!

    Oracle 8i doesn't support CASE into PL/SQL, so as Kamal said, create a view with the CASE, and use this view into your PL/SQL.
    Nicolas.
    And an example here :
    Re: Execute Immediate doesnot work in 8i (8.1.7) and Ref Cursor not exec qu
    Sorry Kamal.
    Message was edited by:
    N. Gasparotto

  • Truncate statement in a stored procedure

    How can I execute a DDL statement, TRUNCATE TABLE table_name, from a stored procedure. In fact, I have tried the following:
    execute immediate ' truncate table table_name ';
    but it doesn't work. Do you have any ideas.
    The Oracle version is 7.3.
    Thanks in advance.

    The syntax for using dbms_sql is
    DECLARE
    v_cur INTEGER;
    v_ret INTEGER;
    BEGIN
    v_cur := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(v_cur, 'TRUNCATE TABLE your_tab', dbms_sql.v7);
    v_ret := DBMS_SQL.EXECUTE(v_cur);
    DBMS_SQL.CLOSE_CURSOR(v_cur);
    END;
    It's usually worth puting this in a stored procedure and passing the DDL statement in as a parameter, saves you having to type all this out everytime.
    If you don't have the dbms_sql package installed, the scripts are usually found under rdbms/admin

Maybe you are looking for

  • Considering switching to Mac

    Hello everyone, i have been a PC/Windows user all of my life, and am now very seriously considering switching over to mac. However, i have some questions first that i cant seem to find a direct answer to, and apologize in advance for asking things th

  • Best Practice Clean Install (Same Old Chestnut for Sure)

    OK, I'm sure the answer is somewhere in this forum but each part is so spread out and I'm getting the sequence mixed up on the best way to make the transition to Tiger in consideration of my current setup. So, thanks in advance for being patient and

  • Output should open in new page

    Hi, I have a OAF page. I extended the controller which creates the button. When we click this button, it is calling a concurrent request and gets the output in pdf format and gives the option of open, save, and cancel. When we click open, the pdf fil

  • Using a Dimension in Multiple Modules...........

    Hi All, Can anyone tell me how to use a "Dimension created in One module in another module. Waht I did was, copied the Dimension from Module1 (Dimension) to the Module2(Dimension) -- is this is the right way? + Module1 + Dimension Common_DIM + Modile

  • Auto-install a new web server instance

    Hi, i'm attempting to install a Sun ONE Web Server on my workstation as part of a tutorial for Sun Identity and Acess Management Servers. Within the tutorial it is stated that this web server is completely seperate from the web server within the Iden