Database Adapter Custom SQL

Hi All,
Is there any way that we can add the variables from BPEL process in custom SQL of database adapter.
Example:
I have a variable defined in BPEL process and I have assigned a value to that variable. And in invoke process accessing database adapter is having Custom Sql operation then how can I use the variable in custom sql?
Any idea, please suggest.
Regards,
Sreejit

Sreejit,
You can assign/pass a value to your custom sql of DBAdapter like this.
select from <tablename> where tname = #variablename*+
ex: select * from emp where empno=#employeenum
Use an assign/transformation activity and do the mapping from the actual variable to the input variable(shows 'employeenum' as its variable) of invoke activity which invokes the DBAdapter.
I used this scenario extensively in my projects.
Thanx,
Sen

Similar Messages

  • Database Adapter and SQL Server procedure issue

    Hello,
    I am using Jdev 11.1.1.7.0 and SQL Server 2005.
    In the Database Adapter configuration wizard, Specify Stored Procedure step, I choose the “GEACupax” schema and got the following error after a click on “Procedure Browse” button:
    com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'GEACUPAX.INFORMATION_SCHEMA.SCHEMATA'.
    The command Database Adapter tried to execute was:
    (from jdev log:) select schema_name from GEACUPAX.INFORMATION_SCHEMA.SCHEMATA order by schema_name;
    Note, the schema name has changed to uppercase. I think that is the problem. If I try this query in SQLDeveloper, it returns the same error. I can fix it changing the schema name to “GEACupax”. The case matters.
    Any ideas?
    Leandro.

    Vijay,
    Thanks for you reply.
    I figure out a related bug:
    Bug 12859472: Cannot browse store procedure in case-sensitive MS SQL Database
    There are two possible workarounds:
    1. Use a database name with capital letters
    2. Do not use stored procedures, but access the tables directly.
    The notes on the Bug ticket describes that the issue would be scheduled to be fixed in PS7 which is 11.1.1.8.
    Cheers!
    Leandro.

  • Database Adapter with sql server connection cannot import user tables

    Hi,
    In jdeveloper 11g, I tried to create a sql server database connection, i could create the connection, i could see the tables and navigate through the data in
    Database navigator section. But while trying to import the tables in the Database adapter to do polling operation, It displays only the system tables like this
    syscolumns (dbo)
    syscomments (dbo)
    sysdepends (dbo)
    sysfilegroups (dbo)
    sysfiles (dbo)
    sysforeignkeys (dbo)
    sysfulltextcatalogs (dbo)
    sysindexes (dbo)
    sysindexkeys (dbo)
    sysmembers (dbo)
    sysobjects (dbo)
    syspermissions (dbo)
    sysprotects (dbo)
    sysreferences (dbo)
    systypes (dbo)
    sysusers (dbo)
    I am not understanding this wierd bahaviour of jdeveloper.
    please advise.
    -Chaitu
    Edited by: chaitu123 on May 13, 2010 9:16 AM

    This is NOT related solely to the SOA Suite. The same behavior appears in the Connections Navigator.
    IMHO, this is related to how JDeveloper is parsing the .getMetaData() response.
    Scott
    Edited by: user8951683 on May 21, 2010 8:08 AM

  • Schema/database name, custom sql folders

    We have created a single EUL for all business areas and when you create a simple or complex folder you can set the database attribute to default. Is there any way to do this with custom sql folders?
    Thanks, Jennifer

    oops, I don't think I gave enough information. In the custom folder the code is
    select c1, c2, c3 from schema_name.some_table
    (Discoverer refers to 'schema_name' as a 'database attribute' in simple & complex folders). We want to run a report, based on the custom folder, as a different user, attached to a different schema eg schema_b and get the results from schema_b. We can do this with simpe & complex folders by setting the 'database attribute' to <default> but can't find a way with custom folders.
    Thx Jennifer

  • Database adapter vs sql query

    Hi all, I am developing a small SOA application using a synch BPEL and Database adapter. But I have some problems getting the database results this is the query
    SELECT t1.Location, t1.ID, t2.quantity, t1.Name
    FROM tblitem t1 JOIN tblorderitem t2 ON (t1.id = t2.itemid)
    JOIN tblorder t3 ON (t2.orderid = t3.ID)
    WHERE (t3.id = #Order_id)
    ORDER BY t1.Location
    which get a sorted list according to the Order_id parameter, this query works perfectly on sqlplus, but not in database adapter, Anyone knows why?

    Hi Arik, I have managed to solve the problem. I don't actually understand why, but it is now solved. I am going to explain how I fixed the problem and I hope you or someone else can understand why.
    I am using three tables each one contains this information
    tblItem
    ID NUMBER
    Location NUMBER
    tblOrderItem
    ID NUMBER
    ItemID NUMBER
    OrderID NUMBER
    Quantity NUMBER
    tblOrder
    ID NUMBER
    And I changed the previous query to this
    SELECT t1.Location, t1.ID, t2.quantity, t1.Name
    FROM tblitem t1 JOIN tblorderitem t2 ON (t1.id = t2.itemid)
    WHERE (t2.OrderID = #Order_id)
    ORDER BY t1.Location
    I think that I had redundant information adding tblOrder which is filtered by OrderID, when that field is already in tblOrderItem. I don't think this matters, because I can match as many tables as I want to make a bigger query. Anyway, If you know the answer, please let me know.
    Thanks a lot.
    Jaume.

  • DB polling using custom SQL in SOA Suite 11g

    Hi,
    We are trying to poll records from a database using custom sql. But all the records in the table are being picked up at the same time and not as per the polling frequency set in the adapter.
    Below is the configuration from the .jca file:
    <endpoint-activation portType="II_ptt" operation="receive">
    <activation-spec className="oracle.tip.adapter.db.DBActivationSpec">
    <property name="DescriptorName" value="II.OrderRequest"/>
    <property name="QueryName" value="IISelect"/>
    <property name="MappingsMetaDataURL" value="II-or-mappings.xml"/>
    <property name="PollingStrategy" value="DeletePollingStrategy"/>
    <property name="PollingInterval" value="60"/>
    <property name="MaxRaiseSize" value="10"/>
    <property name="MaxTransactionSize" value="10"/>
    <property name="SequencingColumn" value="REQUEST_SAK"/>
    <property name="NumberOfThreads" value="1"/>
    <property name="ReturnSingleResultSet" value="false"/>
    <property name="DeleteDetailRows" value="false"/>
    </activation-spec>
    </endpoint-activation>
    Please let us know if anything else needs to be set to enable the polling as per the frequency in the adapter.
    Thanks.

    As the link from Anuj said, you need to also configure 'Distributed Polling' in the wizard. This speed limit trick will no longer work out of the box in 11.1.1.3 on, you will also have to set usesSkipLocking="false" in your DbAdapter connection pool definition. Skip locking eliminates the locking contention issue, so this primitive kind of load balancing is no longer needed in that case.
    Thanks
    Steve

  • Dynamic where clause in Database Adapter, or workaround?

    Hello friends,
    Is there any way to change where clause in Database Adapter (DA) dynamically.
    For e.g. i do have Database Adapter with sql statement: select col1,col2 from my_table. Originally i have many parameters which are not mandatory so instead of creating where clause in DA like:
    select col1, col2 from my_table where+
    *((#p_col_1 is not null and #p_col_1=col1) or #p_col_1 is null)*
    and ...
    and  ((#p_col_n is not null and #p_col_n=col_n) or #p_col_n is null)
    i would like to create a where clause dynamically depend on what parameters are not empty or receive where clause as parameter. Is it possible? Are there any others workarounds you can suggest?
    will appreciate any thoughts...

    Thanks Deepa for the links, their where quite helpful. And i must admit this partially answers my question (at least example i provided).
    However - how about if i'd like to use LIKE clauses instead of =, or IN or NOT IN? e.g:
    select col1, col2 from my_table where+
    ((#p_col_1 is not null and #p_col_1 LIKE col1) or #p_col_1 is null)
    and ...
    and ((#p_col_n is not null and col_n IN #p_col_n) or #p_col_n is null)
    Is it possible?
    thanks in advance

  • Error  While Polling Database changes using Custom SQL

    Hi,
    I am using Oralce SOA Suite 11g DbAdapter for polling Database changes.
    My source database is DB2,I am using custom query for polling the changes in source database.
    I am using "Update an External Sequencing Table on a Different Database" polling Strategy
    Query section of the Mapping file is as follows.
    <querying xsi:type="query-policy">
    <queries>
    <query name="ReceiveF554102TXEDataSelect" xsi:type="read-all-query">
    <call xsi:type="sql-call">
    <sql><![CDATA[SELECT FILE_NAME, LIBRARY_NAME,
                   USER_NAME, SEQUENCE_NUM,
                   JOURNAL_CODE, ENTRY_TYPE, TIME_STAMP, JOB_NAME, JOB_USER,
                   JOB_NUMBER, PROGRAM_NAME, ARM_NUMBER, ADDRESS_FAMILY, RMT_ADDRESS,
                   REMOTE_PORT, SYSTEM_NAME, REL_RECORD, OTRCLN, IBMCU, IBITM, IBLITM,
                   IBAITM, IBY55ETAFR, IBY55ETATH, IBY55NUM01, IBY55NUM02, IBY55NUM03,
                   IBY55NUM04, IBY55NUM05, IBY55NUM06, IBY55NUM07, IBY55NUM08,
                   IBY55NUM09, IBY55NUM10, IBELM01, IBELM02, IBELM03, IBELM04, IBELM05, IBY55STR01,
                   IBY55STR02, IBY55STR03, IBY55STR04, IBY55STR05, IBY55CHA01,
                   IBY55CHA02, IBY55CHA03, IBY55CHA04, IBY55CHA05, IBY55DAT01, IBY55DAT02,
                   IBY55DAT03, IBY55DAT04, IBY55DAT05, IBUSER, IBPID, IBJOBN, IBUPMT,
                   IBUPMJ FROM PY_JRNMON.F554102T WHERE ((TIME_STAMP > (SELECT LAST_READ_DATE FROM SOALIB.SOASEQHDR WHERE (TABLE_NAME = 'F554102T'))) AND (TIME_STAMP < SYSDATE)) ORDER BY TIME_STAMP ASC]]> </sql>
    </call>
    <reference-class>ReceiveF554102TXEData.F554102T</reference-class>
    <lock-mode>none</lock-mode>
    <container xsi:type="list-container-policy">
    <collection-type>java.util.Vector</collection-type>
    </container>
    </query>
    </queries>
    <delete-query xsi:type="delete-object-query">
    <call xsi:type="sql-call">
    <sql>UPDATE SOALIB.SOASEQHDR SET LAST_READ_DATE = #LAST_READ_DATE WHERE (TABLE_NAME = 'F554102T')</sql>
    </call>
    </delete-query>
    </querying>
    I am getting following Error after defining the custom SQL in my mapping.xml file. (After executing the Created Process)
    Caused by: BINDING.JCA-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by BINDING.JCA-11626
    Query Not Found Exception.
    Could not find Named Query [ReceiveSampleCustomPollSelect] with ? arguments, belonging to Descriptor [ReceiveSampleCustomPoll.F554102T] for [oracle.tip.adapter.db.DBActivationSpec@2ec733b0] inside of mappings xml file: [ReceiveSampleCustomPoll-or-mappings.xml].
    You may have changed the queryName info in either the _db.jca or toplink-mappings.xml files so that they no longer match.
    Make sure that the queryName in the activation/interactionSpec and in the Mappings.xml file match. If an old version of the descriptor has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this named query.
    You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server. This exception is considered not retriable, likely due to a modelling mistake. This polling process will shut down, unless the fault is related to processing a particular row, in which case polling will continue but the row will be rejected (faulted).
         at oracle.tip.adapter.db.exceptions.DBResourceException.createNonRetriableException(DBResourceException.java:653)
         at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:619)
         at oracle.tip.adapter.db.exceptions.DBResourceException.couldNotCreateTopLinkSessionException(DBResourceException.java:291)
         at oracle.tip.adapter.db.DBManagedConnectionFactory.acquireSession(DBManagedConnectionFactory.java:883)
         at oracle.tip.adapter.db.transaction.DBTransaction.getSession(DBTransaction.java:375)
         at oracle.tip.adapter.db.DBConnection.getSession(DBConnection.java:266)
         at oracle.tip.adapter.db.InboundWork.init(InboundWork.java:322)
         at oracle.tip.adapter.db.InboundWork.run(InboundWork.java:526)
         ... 4 more
    Caused by: BINDING.JCA-11626
    Query Not Found Exception.
    Could not find Named Query [ReceiveSampleCustomPollSelect] with ? arguments, belonging to Descriptor [ReceiveSampleCustomPoll.F554102T] for [oracle.tip.adapter.db.DBActivationSpec@2ec733b0] inside of mappings xml file: [ReceiveSampleCustomPoll-or-mappings.xml].
    You may have changed the queryName info in either the _db.jca or toplink-mappings.xml files so that they no longer match.
    Make sure that the queryName in the activation/interactionSpec and in the Mappings.xml file match. If an old version of the descriptor has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this named query.
         at oracle.tip.adapter.db.exceptions.DBResourceException.queryNotFoundException(DBResourceException.java:694)
         at oracle.tip.adapter.db.ox.TopLinkXMLProjectInitializer.initializeQuery(TopLinkXMLProjectInitializer.java:1238)
         at oracle.tip.adapter.db.DBManagedConnectionFactory.acquireSession(DBManagedConnectionFactory.java:728)
         ... 8 more
    Help required to fit custom SQL in mapping.xml file for complex queries.
    Thanks,
    Arun Jadhav.

    "Execuite Custom SQL" in DB adapter and you'l get it.
    But in this case you'll have to implement your own polling strategy (if you need one).
    If you want to use one of the predefined polling strategy you should use "Poll for New or Changed records" and import all the tables you use and connect them in wizard.

  • Error while invoking custom API using Database Adapter

    Hi,
    I've a requirement where in I need to fetch the data returned by a recordtype of a custom API. I've implemented this by invoking the custom API using Database Adapter. I'm facing a problem while performing this.
    The custom API holds the signature as:
    PROCEDURE EMP_DET
    Argument Name Type      In/Out Default?
    P_DEPTNO NUMBER IN
    L_LINE_TBL TABLE OF RECORD OUT
    I've a schema with which it needs to be validated. It looks like:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:po="http://www.mycompany.com/ns/sales" targetNamespace="http://www.mycompany.com/ns/sales" elementFormDefault="qualified">          
    <element name="EmployeeDetails">          
    <complexType>               
    <sequence>                    
    <element name="EmpNo" type="integer"/>                    <element name="EName" type="string"/>                    <element name="Job" type="string"/>                    <element name="Mgr" type="integer"/>                    <element name="HireDate" type="date"/>                    <element name="Sal" type="decimal"/>                    <element name="Comm" type="decimal"/>               </sequence>          
    </complexType>     
    </element>
    </schema>
    I did a transformation to the above stated Emp.xsd with the xsd created for my custom API by the BPEL process. I could create the process and deploy successfully, but while invoking I get the following error. (I'm using BPM 10.1.3.1 with JDev 10.1.3.1)
    <remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>6502</code>
    </part><part name="summary"><summary>file:/D:/OraBPEL/bpel/domains/default/tmp/.bpel_my_poc_1.0_16c5d0f7b937c780d27d8975726a15cb.tmp/emp_details.wsdl [ emp_details_ptt::emp_details(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'emp_details' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the SCOTT.BPEL_EMP_DETAILS.EMP_PKG$EMP_DET API. Cause: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    [Caused by: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    ; nested exception is:
         ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the SCOTT.BPEL_EMP_DETAILS.EMP_PKG$EMP_DET API. Cause: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    [Caused by: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
    </summary>
    </part><part name="detail"><detail>
    Internal Exception: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    Error Code: 6502</detail>
    </part></remoteFault>
    Can someone let me know as to why I'm getting this error? Also lemme know if such an approach is valid to do, if not please suggest me alternate methods to do this.
    Thanks in advance,
    Gayathri

    The 'numeric or value error' is one we have seen many times. The problem has been identified and fixed. Refer to this thread for more information.
    Issue with DB Adapter - ORABPEL-11811

  • How to specify custom SQL in polling db adapter with logical delete option

    Hi all,
    I am writing a SOA composite app using JDeveloper SOA Suite 11.1.1.4 connecting to a SQL Server db using a polling DB Adapter with the logical delete option to send data to a BPEL process.
    I have requirements which go beyond what is supported in the JDeveloper UI for DB Adapter polling options, namely:
    * update more than one column to mark each row read, and
    * specify different SQL for the logical delete operation based on whether bpel processing of the data polled was successful or not.
    A complicating factor is that the polling involves two tables. Here is my full use-case:
    1) Polling will select data derived from two tables: e.g. 'headers' and 'details' simplified for this example:
    table: headers
    hid - primary key
    name - data label
    status - 'unprocessed', 'processed', or 'error'
    processedDate - null when data is loaded, set to current datetime when row is processed
    table: details
    hid - foreign key pointed at header.hid
    attr - data attribute name
    value - value of data attribute
    2) There is a many:1 relationship between detail and header rows through the hid columns. The db adapter polling SELECT shall return results from an outer join consisting of one header row and the associated detail rows where header.status = 'unprocessed' and header.hid = details.hid. (This is supported by the Jdeveloper UI)
    3) The polled data will be sent to be processed by a bpel process:
    3.1) If the bpel processing succeeds, the logical delete (UPDATE) operation shall set header.status = 'processed', and header.processedDate = 'getdate()'.
    3.2) If bpel processing fails (e.g. hits a data error while processing the selected data) the logical delete (UPDATE) operation shall set header.status = 'failed', header.processedDate = 'getdate()', and header.errorMsg = '{some text returned from bpel}'.
    Several parts of #3 are not supported by the JDeveloper UI: updating multiple columns to mark the row processed, using getdate() to populate a value of one of those column updates, doing different update operations based on the results of the BPEL processing of the data (success or error), and using data obtained from BPEL processing as a value of those column updates (error message).
    I have found examples which describe specifying custom SQL using the polling delete option to create a template then modifying the toplink file(s) to specify custom select and update SQL to implement a logical delete. (e.g. 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've got in my project, in the first case because maybe because I'm using a higher version of JDeveloper, and in the second I think because in my case two tables are involved.
    Any suggestions would be appreciated. Thanks, John

    Hi John,
    You've raised a good scenario.
    First of all let me say that the purpose of the DB polling transaction, is to have an option to initiate a process from a DB table/view and not to update multiple fields in a table (or have other complex manipulation on the table).
    So, when choose to update a field in a record, after reading it, you are "telling" the engine not to poll this record again. Sure, i guess you can find a solution/workaround for it, but I don't think this is the way....
    The question now is what to do?
    You can have another DB adapter where you can update the data after finishing the process. In that case, after reading the data (on polling transaction) - update the header.status = 'processed' for example, and after processing the selected data update the rest of the fields.
    Hope it make some sense to you.
    Arik

  • Java.sql.SQLException: Invalid column index in database adapter

    I have a query that works fine if I run the sql in a JDeveloper SQL editor, but I get a "java.sql.SQLException: Invalid column index" error if I paste it in a database adapter. If I put this query in the adapter:
    select <column>
      from <table>
       where <column> in (select
        trim( substr (txt,
              instr (txt, ',', 1, level  ) + 1,
              instr (txt, ',', 1, level+1)
                 - instr (txt, ',', 1, level) -1 ) )
          as token
        from (select ','||#bindVariable||',' txt
                from dual)
      connect by level <=
         length(#bindVariable)-length(replace(#bindVariable,',',''))+1)I get the error. But if I just put the sub query in the adapter as:
    select
        trim( substr (txt,
              instr (txt, ',', 1, level  ) + 1,
              instr (txt, ',', 1, level+1)
                 - instr (txt, ',', 1, level) -1 ) )
          as token
        from (select ','||#bindVariable||',' txt
                from dual)
      connect by level <=
         length(#bindVariable)-length(replace(#bindVariable,',',''))+1the error goes away. Does anyone know what might be causing this?
    Thanks in advance

    Hi,
    Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
    This is the option you will get when you are extending your vo. So make sure that both are same.
    You can refer the below link too
    VO extension leads to "Invalid column index" exception
    Thanks
    Bharat

  • How to operate multiple querys using DB Adapter and 'Execute Custom SQL'

    I have a requirment that I need to create database adapter in your BPEL process with 'Execute Custom SQL' to operate multiple query in DB in one atomic
    here are the details:
    inbound request:
    <ns1:Query_bpelProcessRequest>
    <ns1:input>
    <ns1:ItemDetail>
    <ns1:ItemID>1123DDDS</ns1:ItemID>
    </ns1:ItemDetail>
    <ns1:ItemDetail>
    <ns1:ItemID>1126EWWA</ns1:ItemID>
    </ns1:ItemDetail>
    <ns1:ItemDetail>
    <ns1:ItemID>11208FSAA</ns1:ItemID>
    </ns1:ItemDetail>
    </ns1:input>
    </ns1:Query_bpelProcessRequest>
    I use for-each fuction in XSLT to mapping the all ItemID value:
    <xsl:template match="/">
    <xsl:for-each select="/tns:Query_bpelProcessRequest/tns:input/tns:ItemDetail">
    <ns1:QueryFromDB_Input>
    <ns1:ItemID>
    <xsl:value-of select="tns:ItemID"/>
    </ns1:ItemID>
    </ns1:QueryFromDB_Input>
    </xsl:for-each>
    </xsl:template>
    and in DB Adapter I use the 'Execute Custom SQL' to query the CONTENT value according the ItemID value:
    select distinct CONTENT from agile.item where ITEM_NUMBER=’<ItemID>’
    However, in the result, It only query the first item value for <ns1:ItemID>1123DDDS</ns1:ItemID>
    <<QueryFromDB_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="QueryFromDB_Input_msg">
    <QueryFromDB_Input xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB">
    <ns1:ItemID>1123DDDS</ns1:ItemID>
    </QueryFromDB_Input>
    </part></QueryFromDB_InputVariable>
    <QueryFromDB_OutputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="QueryFromDB_OutputCollection">
    <QueryFromDB_OutputCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB">
    <QueryFromDB_Output>
    <ITEM_NUMBER>1123DDDS</ITEM_NUMBER>
    <CONTENT >SJIFESSFFJ</CONTENT >
    </QueryFromDB_Output>
    </QueryFromDB_OutputCollection>
    </part></QueryFromDB_OutputVariable>
    the other two querys are not operated.
    what can I do to operate multiple querys??
    Thanks

    Hi Rod,
    I are using while loop and assign array inputvalue to the inputvarable of DBadapter now, but actually it doesn't work.
    Throw expection
    <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>XPath query string returns multiple nodes.
    According to BPEL4WS spec 1.1 section 14.3, The assign activity part and query /client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID["ItemIndex"] should not return multipe nodes.
    Please check the BPEL source at line number "89" and verify the part and xpath query /client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID["ItemIndex"].
    Possible reasons behind this problems are: some xml elements has maxOccurs > 1 or the xml data is invalid according to XML Schema.
    To verify whether XML data received by a process is valid, user can turn on validateXML switch at the domain administration page.
    </summary>
    </part></selectionFailure>
    my inbound XSD:
    <element name="ItemsQuery_bpelProcessRequest">
    <complexType>
    <sequence>
    <element name="input" type="tns:inputType"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="inputType">
    <sequence>
    <element name="inputDetail" minOccurs="0" maxOccurs="unbounded">
    <complexType>
    <sequence>
    <element name="ProductID" type="string" minOccurs="0"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    <element name="ItemsQuery_bpelProcessResponse">
    <complexType>
    <sequence>
    <element name="result" type="tns:outputType"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="outputType">
    <sequence>
    <element name="ItemOutput" minOccurs="0" maxOccurs="unbounded">
    <complexType>
    <sequence>
    <element name="item_id" type="string" minOccurs="0"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    DB Adapter XSD:
    <xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/QueryItem" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryItem" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="QueryItem_Input" type="QueryItem_Input"/>
    <xs:complexType name="QueryFrom_Input">
    <xs:sequence>
    <xs:element name="ProductID" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="QueryItem_OutputCollection" type="QueryItem_OutputCollection"/>
    <xs:complexType name="QueryItem_OutputCollection">
    <xs:sequence>
    <xs:element name="QueryItem_Output" type="QueryItem_Output" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="QueryItem_Output">
    <xs:sequence>
    <xs:element name="item_id" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    the bpel assign:
    <assign name="Initial_Index">
    <copy>
    <from expression="0"/>
    <to variable="ItemIndex"/>
    </copy>
    </assign>
    <while name="While_1"
    condition="bpws:getVariableData('ItemIndex')&lt;ora:countNodes('inputVariable','payload','/client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID)">
    <sequence name="Sequence_1">
    <assign name="Assign_QueryInput">
    <copy>
    <from variable="inputVariable" part="payload"
    query='/client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID{bpws:getVariableData('ItemIndex')}'/>
    <to variable="QueryItem_InputVariable"
    part="QueryItem_nput_msg"
    query="/ns2:QueryItem_Input/ns2:ProductID"/>
    </copy>
    </assign>
    <invoke name="Invoke_QueryDB" partnerLink="QueryItem"
    portType="ns1:QueryItem_ptt"
    operation="QueryItem_PSFT"
    inputVariable="QueryItem_InputVariable"
    outputVariable="QueryItem_OutputVariable"/>
    <assign name="Assign_Output">
    <copy>
    <from variable="QueryItem_OutputVariable"
    part="QueryItem_OutputCollection"
    query="/ns2:QueryItem_OutputCollection/ns2:QueryItem_Output/ns2:item_id"/>
    <to variable="outputVariable" part="payload"
    query='/client:ItemsQuery_bpelProcessResponse/client:result/client:ItemOutput/client:item_id{bpws:getVariableData('ItemIndex')}'/>
    </copy>
    <copy>
    <from expression="bpws:getVariableData('ItemIndex')+1"/>
    <to variable="ItemIndex"/>
    </copy>
    </assign>
    </sequence>
    </while>
    I use {} instead of  []  for array,  because [] seams not reveal in this message board
    seems I can't assign array values to the DB inputvalue, Are there any solutions for this ?
    I still haven't found any way for operating multiple querys using DB Adapter.
    Thanks
    Edited by: user1065212 on 07-Jan-2010 19:39
    Edited by: user1065212 on 07-Jan-2010 19:41
    Edited by: user1065212 on 07-Jan-2010 19:44
    Edited by: user1065212 on 07-Jan-2010 19:45

  • DB Adapter Custom Select SQL with Timestamps

    Hi,
    I am facing an issue with the DB Adapter Custom select sql: here is my scenario:
    I am trying to select diff records from the database between user input start time & the sysdate. for this i am trying to use Execute Pure SQL option database adapter.
    I am framing the SQL as below:
    select  * from tablename1,tablename2 where tablename1.id = tablename1.id  and column1 like #userinput1 and tablename1.request_timestamp between to_date(#Userinput_requestTime) and sysdate
    My question is whether the query
    tablename1.request_timestamp between to_date(#Userinput_requestTime) and sysdate
    is correct or not? I even given a try to_date(#Userinput_requestTime,'DD-MON-YY HH24:mi:ss') and sysdate 
    that too not worked ,
    I have created OSB business service using the generated adapter and the input i am giving it as '04-MAR-15 03.36.23.368179000 PM -06:00' and the input is of type xs:string .
    i am getting errors like java.sql.SQLDataException: ORA-01830: date format picture ends before converting entire input string
    Whether my custom sql is correct or not ? please help me in resolving this issue.
    THanks,
    SV

    if
    tablename1.request_timestamp
    is timestamp then you need to compare as
    timestamp beetween timestamp and timestamp
    so convert date to timestamp by CAST as example
    check How to convert DATE to TIMESTAMP

  • How to add custom sql operations in Database adapters?

    I have a database adapter in ESB configured with insert, update and select operations.
    I wanted to add another select operation with pure sql. When I added the operation it gave me error "Start of the root element expected" while registering the service.
    Can't we do like this?
    I use SOA suite 10.1.3.4.
    - Sam

    Hi Thanks for reply.
    There is an option while configuring the DB adapter "Execute Custom SQL" where you can specify the query you want to execute. It will generate the schema as per the query you enter in the wizard.
    I have created adapters with this type of custom SQLs and even I have put multiple operations in the same adapters where all use Custom SQL and they are working fine.
    Thease custom SQL operations can be anything insert, update, select and they even work with other operations using procedures in the same adapter. But yes we need to modify the WSDL manuallly.
    My problem was that when I try to add the custom SQL operation in the adapter which is configured with normal select, insert and update operation, I was getting the error mentioned.
    - Sam

  • Notice update or delete in Database via WCF SQL Adapter

    Hi Folks,
    i try to notice any changes in a database table via SQL Adapter: so i check for a special column wich contains '0' for new datasets and '1' for those i already copied via BizTalk.
    This works fine as long as you only insert datasets, update or delete is not recocnized...
    Whats the best or possible way to react on these actions too?
    Thanks for your Ideas!

    Hi,
    I am shure there are many different approaches so here is what I have in mind:
    In case you need to react to deleted rows in your original table you need a sub table to trigger your biztalk for datasets that do not exist any longer.
    In this table you need 2 colums:
    first one to correlate to your original data row (id),
    second one to hold the status: For ex. 0= new, 1=update, 3=deleted
    Then you need a
    Trigger event on your original table that sets the status for the modified data id in your new table.
    You can then poll on this sub table as you already mentioned in your question.

Maybe you are looking for

  • Multi-Mapping Error after copying into new namespace

    Hi everybody, we got a BPM running using a multi-mapping. We decided to design new namespaces. After copying every IR object (datatype, message-type, mappings etc.) --> SXMB_MONI shows a mapping-error. But when I take the payload and test the mapping

  • Time Capsule not working after 10.5.3 update

    The following link shows screenshots of how Time Machine is behaving after the 10.5.3 update. http://badtastic.com/stuff/tmprobs.jpg Ever since the lates 10.5.3 update Time capsule / Time machine has been incapable of successfully completing a backup

  • ERROR Integration Engine configuration

    hi all, i have an error. en sxmb_adm -->Integration Engine configuration y configured next parameters: rol:Integration Server corresponding Int. Server: http://<server>:<port>/sap/xi/engine?type=entry When press in SL buttom, and error occure: No Acc

  • Having connection issues with wireless usb adapter

    During the day when I'm just surfing the web or watching shows on hulu.com or using NHL game center live my adapter doesn't have any problems staying connected. But at night when I let my torrent client run my, adapter will disconnect and I will have

  • DreamWeaver CS4-CS5 Creates Syntax Errors

    I cannot seem to find any info on this online but my DreamWeaver CS4 and a trial of DreamWeaver CS5 both create PHP and SQL queries that are loaded with syntax errors. I use XAMPP on my computer as I have done for years, and it works fine with phpMyA