Get the "selected lines" value after sql custom query in the database adapter

We execute a custom query in a database adapter. With other technologies (JDBC, etc.) the result of a query produces not only a game but the number of lines selected results. For example, the output of the script of Oracle SQL Developer will display something like:

9999 selected lines

at the end of the output of the script.

I would like to obtain this value for a BPEL process. Of course, I could run a 2nd interview whose where clause is identical to the first, but select count (*) instead. However, it is not only ineffective but (in rare circumstances in an active database) could be the problem.

It is not obvious to the novice BPEL how to get the selected value and the result set row in an Invoke. Is this possible?

Maybe it's not the only solution - but this is how I did in the past.

After step to invoke the adapter, use a step of the having-right/copy to fill a variable of integer type BPEL using the xpath count function...






That should affect the number of records returned by the query.

I hope this helps.

Rod.

Published by: Tunnels of Rod on December 15, 2009 13:16

Tags: Fusion Middleware

Similar Questions

  • Re: Unable to get the wireless adapter to work on my Satellite L550-1CC

    I'm getting bored with this laptop, I reinstalled windows 7 (32 bit) and can not get the wireless adapter to work.

    My router settings are perfect, my netbook is zero connection problems - the router is just inches away from the laptop most of the time - the laptop insists that there is "no available networks."

    This of course is BS, before I reinstalled windows I could pick up 3 other neighbouring networks as well as mine.

    Windows automatically installed the wireless network - I thought that could be the problem, so I downloaded the realtek driver directly.

    No difference. Always the small icon with Red Cross barred through it.

    I thought it could have been a hot key problem - so I installed the flash card driver that apparently controls the access keys (for some reason any).

    Shortcut keys still don't work - I could really care about that - it's just the wireless network I need.

    Thanks for any help I receive.

    > my netbook has zero connection problems - the router is just inches away from the laptop most of the time - yet the laptop insists there is "no available networks."
    After reading this sentence, I'm a bit confused. If there is no available WLAN networks how your laptop had zero problems to connect?

    One last thing:
    > Of course is BS, before I reinstalled windows I could pick up 3 other neighbouring networks as well as mine.
    What is the difference between the old and the new installation of Windows?

    In general the WLAN use is fairly simple.
    Wireless network card - must be installed correctly (listed in Device Manager
    WLAN card - must be enabled using FN + F8 key combination to activate the wireless network card
    -scan the available WLAN networks area, click on the button of your WLAN and use connect
    -put key WLAN if necessary and after a few seconds WLAN connection will work

    I did this many times on laptops preinstalled Win7 and didn't have any problems. On all laptop computers pre-installed with Toshiba recovery image (factory settings) is not necessary to change the WLAN settings.

  • How to reach the sequence in the database adapter query?

    Hi all

    I try voting records of the DB who gets the power from the external ERP system event. If the ORDER is important. I need to run these in order and I'm running in the environment in clusters (4 nodes). This parallelism is dead my processing sequence. I already used "Order By" in the configuration of the database adapter which does not guarantee the 100% according to the doc Oracle sequence.

    All the entries here?

    Thank you!!

    It is a classic problem, and it's not easy to solve... in fact I tend to think that it would be easier to re-design it, so you can have idempotent operations that don't depend on order, so you can unleash the power of a cluster multi environment... It is paradoxical to have such a power, and must treat a record after another like the old days...

    In any case, in reality, you can try with the mediator resequencer...

    https://docs.Oracle.com/middleware/1213/soasuite/develop-SOA/mediator-Resequencer.htm#SOASE85099

    The resequencer pick transposes in a related message flow but out of sequence in a sequential order. When the inbound messages arrive, they can be in random order. The resequencer ordered messages based on sequential or chronological information and then sends messages to the services target in an orderly manner. The sequencing is done based on the strategy of the selected sequence.

  • Recommendation for storing the database adapter / password

    Hi, so far I have just to save the password for the database in the database connection object to Jdeveloper (I check the option "password to deploy") and this is how I use the database adapter, but, if I want to change the DB password?

    So which is the best way to store a password of 'dynamic' database to use with bpel?

    You use data sources. The JNDI name location that you set at design time must be configured on the application server. In this way, you can change the DB connections on the application server. This is how we move through environments. You must also make sure that your development team uses the same connection names.

    see you soon
    James

  • How to specify SQL custom querying the db with option to delete logical adapter

    Hi all

    I write a composite SOA application using JDeveloper SOA Suite 11.1.1.4 connection to a SQL Server database with the help of a Secretary of the poll the DB adapter with the logical delete option to send data to a BPEL process.

    I have requirements that go beyond what is supported in the UI JDeveloper for polling of the adaptor DB options, namely:
    * update several columns to mark each line read, and
    * specify different SQL to remove operation logic based on if bpel surveyed data processing was successful or not.
    A complicating factor is that the query contains two tables. Here is my complete use case:

    (1) mark will select data from two tables: for example 'headers' and 'details' simplified for this example:
    Table: headers
    HID - primary key
    name - plate
    status - "raw", "transformed" or "error".
    processedDate - null when the data is loaded, the DateTime current when the treatment of the line
    Table: Details
    HID - foreign key pointing header.hid
    attr - name attribute of data
    value - value of the attribute data

    2) there are a many relationship: 1 from detail lines to the header through the hidden columns. The adapter db SELECT the voting clerk must return results of an outer join consisting of line a header and the associated detail rows where header.status = 'no' and header.hid = details.hid. (This is supported by the UI Jdeveloper)

    (3) the survey data will be sent to be processed by a bpel process:
    (3.1) if the bpel treatment is successful, the logical delete operation (UPDATE) must set header.status = 'transformed' and header.processedDate = 'getdate() '.
    (3.2) if bpel treatment fails (for example hits a data error during the processing of the selected data) the logical delete operation (UPDATE) must be set to 'impossible' = header.status, header.processedDate = 'getdate()' and header.errorMsg = '{of the text returned by bpel}.

    Several parts of the #3 are not supported by the UI JDeveloper: update several columns to mark the addressed line, using getdate() to fill a value of one of these updates to the column, update of different operations based on the results of the BPEL, processing of the data (success or error) and using data from BPEL treating it as a value of these updates of column (error message).

    I found examples that describe the specification that is customized by using querying SQL Delete option to create a template and then modify the toplink files to specify custom select and update SQL to implement a logical deletion. (for example, http://dlimiter.wordpress.com/2009/11/05/advanced-logic-in-oracle-bpel-polling-database-adapter/ and http://myexperienceswithsoa.blogspot.com/2010/06/db-adapter-polling-tricks.html). But none of them match what I have in my project, in the first case because maybe because I use a newer version of JDeveloper and the second I think because in my case, two tables are involved.

    Any suggestion would be appreciated. Thank you, John

    Hi John,.

    You raised a good script.
    First of all, let me say that the purpose of the DB of the election operation, is to have an option to start the process of a DB table/view and not update several fields in a table (or have other complex manipulations on the table).
    Thus, when choose update a field in a record, after reading it, you "say" the engine not to question this record again. Of course, I guess you can find a solution/workaround for it, but I don't think that this is the way...

    The question now is what to do?
    You can have another DB adapter where you can update the data after you have completed the process. In this case, after reading the data (on the query operation) - updated the "transformed" for example = header.status and after processing the selected data update the rest fields.

    Hope it make sense for you.

    Arik

  • Get the database name

    Hello

    I use JDev 11.1.1.4.0.

    A requirement for me is to send the notification by e-mail to a group of users. While composing a message, precede the object with the name of the database. For example, if the message carries on a new employee is added, the topic should read as follows:

    "HR: new employee has been added.

    Is there a way to get the name of DB without running the SQL "SELECT ORA_DATABASE_NAME FROM DUAL"?
    If not, should I create a new VO just for that?

    Thank you

    Joonsup

    Hello

    you create a public method in the AM Impl class and expose it as a client method. Then use the code below

        public String getDatabaseInformation(){
    
            DBTransaction dbTransaction = (DBTransaction) this.getTransaction();
            PreparedStatement prepStatement = dbTransaction.createPreparedStatement("select * from dual", 0);
            try {
    
              String dbSchema = prepStatement.getConnection().getMetaData().getUserName();
              String connectURL = prepStatement.getConnection().getMetaData().getURL();
    
              //returns schema_name@host:port:sid
              return dbSchema + connectURL.substring(connectURL.indexOf("@")-1);
    
            } catch (SQLException e) {
                e.printStackTrace();
            }
          return null;
        }
    

    In this way information is accessible from the web client and the BC ADF model itself

    Frank

    Published by: Frank Nimphius on August 2, 2011 17:02

  • How to get the database name/IP address of the server forms10g database

    Hello world
    How can I get the name of the database instance and the IP address of the database server?

    I use GEC 10 g and the database server is Oracle 10 g.

    Dobbelaere

    How can I get the name of the database instance and the IP address of the database server?

    To use the IP UTL_INADDR

    For example name you can use sys_context ('userenv', 'instance_name')
    or
    SQL > select instance_name from v$ instance;

  • How to get the database create 9iR2 db statement?

    Friends,

    OS: RHEL 3
    DB: Oracle 9iR2

    under sql will be the creation of tablespace.
    select dbms_metadata.get_ddl('TABLESPACE','TEMP') from dual;
    like the above, I want to get the creation of database statement

    is it possible using dbms_metadata or any other means?

    Thank you

    There were a few scripts or references to scripts to generate create statements of database in the past.

    I thought that I had actually downloaded one, but I don't know what I did with it. I however did a quick search and found the following:

    Of comp.databases.oracle.server. The last entry for the thread refer to such a tool are available on the web pages of the author.

    http://groups.Google.com/group/comp.databases.Oracle.Server/browse_frm/thread/a1457c459be3479a/63bcc6008e8273b7?hl=en&lnk=St&q=#63bcc6008e8273b7

    You can use the Oracle DBCA utility for fine screens to create a database and output, then save the scripts. You can now take those scripts and change the and adding additional orders for your goal.

    HTH - Mark D Powell.

  • request for information on the database adapter...

    Hello
    I have a scenario where I have to interview a few tables that is not related to each other and I get different queries for each table. I tried to create a single DB adapter and imported from all the tables in it. But I faced two places where I was asked to define a root table and also to set up a select query.

    As a result of reagrding doubts, I have this:

    1. do I need to need to create different DB adapter for each table?

    2. What is the significance of the db table root?

    Concerning
    Lokesh

    Yes, you must create 3 links of different partner using the DB adapter.

    In theory Yes, you would create a new partner link using the DB adapter for each table that is not bound. If you want to select PO_HEADERS_ALL and PO_LINES, this can be done in a single call because they are related.

    This review is based on the fact that you select batch data, no data rows. If you receive 1 row of several unrelated table, this could be done via a custome procedure / package. I don't want to lead you down the wrong path, so I need to learn more about your use case. In most senerios in Oracle apps you call API / packages.

    If you could provide more information about your use case, I'll try to offer the best advice

    see you soon
    James

  • file adapter and the database adapter

    Hello everyone,

    I use 10.1.3.1.o 10g

    I want to access the data of the .txt file and insert into the oracle table.

    I did the following:

    1. I have used the adapter (synchronous reading) leader of the local system.

    2. I used call activity to call data from the file adapter.
    3. I used asynchronous processes.

    so, what are the next steps I need to do?

    PLSE tell me what I need to do.

    Set up your database connection - the palette of components (Services) allows to drag - move a partnerlink data adapter in the left or right of your Async BPEL process binding.

    Add your invoke and variables for the partnerlink DB - use the component palette (business process) to drag and drop an Invoke activity in your BPEL process. It also lets you create your input and output variables. I'd like to shorten names by default before you click OK.

    Map data from the input file to the link of DB output - for simple maps (a small number of fields), use an activity entitled the palette of components (business process). For more than a few fields, looping, etc. use a palette of components (business process) transformation activity. It is much more powerful and flexible, with the added complexity that comes with it.

    Optional: assign one of the input values unique to your variable of input file to the output for your BPEL process variable or output in a legend of Java with addAuditTrailEntry(). It allows debugging to see if your problem has been reading the file or keep at the table. Of course, everything works first time, so it's not necessary. ;-)

    After this, deploy and start your process (BPEL Console-> dashboard-> Your_Process_Name-> run-> 'Message XML Message'.

    Andy

  • Configuration of the database adapter - how to manage between environments

    Hello

    I am new to Oracle SOA. I'm developing a new service that uses a database adapter for writing query data in the database.

    Currently I develop in a development environment and database adapter works as expected.

    My question is should I continue to change the server connection details in the db adapter before joining the service in the new environment (say dev to UAT then UAT Prod)?

    Thank you

    Priya.

    Hi Priya,

    You can cretae and use the configuration level:

    http://docs.Oracle.com/CD/E23943_01/dev.1111/e10224/sca_lifecycle.htm#BABDDDBE

    Arik

  • Validation of the transaction in the database adapter

    Hello

    When the validation occurs when a database adapter inserts a record.

    I have two process is db adapter to insert records and the second the db adapter to call the procedure for updating the records inserted by first calling card, but the records will be visible in the second card.

    Please advice, thanks in advance.

    Kind regards
    Abdou

    Yes because it is a single transaction, therfore you can restore in case the second fails.

    But if you make a dehydration, for example, wait, human task, receive activity then the first insert will be committed. so you will not be able to roll back. You will need to use a compensate activity.

    see you soon
    James

  • How to use the multiple selection list values in sql query

    Hi all
    In the search form, I have a multiselect llist tell (P3_STATUS) and I want to have a query using this element and fetch documents
    How to do a sql query based on the selection of the value of this element.
    SELECT "W"."START_DT" "Start Date",
           "W"."CAMPAIGN_CODE" "Campaign Name",  
           "W"."MKT_CHANNEL" "Channel",
           "W"."MKT_SUB_CHANNEL" "Sub Channel", 
           "W"."PROMO_CODE" "Promo Code",
           "W"."TRACKING_CODE" "Tracking Code",
           "W"."TFN" "TFN",
           "W"."STATUS" "Status",
           "W"."CAMPAIGN_CODE" "Edit"
           FROM 
             "WC_MKT_CAMPAIGN_DS" "W"
      
           WHERE 
         (MKT_CHANNEL = decode(:P1_CHANNEL,'%null%',MKT_CHANNEL,NULL,MKT_CHANNEL,:P1_CHANNEL))
       AND
    (MKT_SUB_CHANNEL= decode(:P1_SUB_CHANNEL,'%null%',MKT_SUB_CHANNEL,NULL,MKT_SUB_CHANNEL,:P1_SUB_CHANNEL))
    AND *STATUS = decode(.................*
    Please could someone help me on this?

    Thanks in advance
    Robert L

    Try to change your selection of status to

    AND INSTR(':'||:P3_STATUS||':',':'||STATUS||':') > 0
    
  • Im getting the database not found or sql error when I open some files from muse. I had not changed anything?

    Screen Shot 2014-07-11 at 5.54.07 PM.png

    Hello

    in case you still have questions, could you please share your with us .muse file to study? Please send it to [email protected]. If your file is more than 30 MB, you can use something like Adobe SendNow or SendThisFile. Don't forget to mention the link to this forum thread in your email (with Air/Muse/operating system version you are using) so that we can identify the file.

  • Unable to get the database searched with MAX and GROUP BY function

    Hello
    All the

    I have a table as below:
    COLUMN TYPE
    User_id VARCHAR2 (10 byte)
    ID_processus VARCHAR2 (30 bytes)
    END_TIME DATE (STAMP)
    TO_LOC VARCHAR2 (12 bytes)
    TO_LOC_TYPE VARCHAR2 (15 bytes)
    FROM_LOC VARCHAR2 (12 bytes)
    ITEM_ID VARCHAR2 (25 bytes)
    CASE NUMBER (12.4)
    LMS_UDA1 VARCHAR2 (250 bytes)
    AREA VARCHAR2 (2 bytes)

    I only want to get one record with all the columns, have only one clause MAX (END_TIME)
    But the other column value of the difference.
    When I use MAX (END_TIME) and GROUP OF USER_ID, ID_processus, CASE...
    the sql did not a single record,
    It gives the number of records

    Please help me on this

    Concerning

    Saven

    >
    I only want to get one record with all the columns, have only one clause MAX (END_TIME)
    But the other column value of the difference.
    >
    Maybe it's not possible because it depends on your data.

    If the combination of all columns except END_TIME is not unique then there will be multiple records; a record for each unique combination (GROUP BY) of all other columns.

    The only way to ensure that a record is

    SELECT MAX(END_TIME) FROM myTable
    

Maybe you are looking for