Passing dynamic query to DB adapter

Hi,
I am using jdeveloper 10.1.3.4 for configuring a BPEL flow. As per the requirements, I am supposed to have only one DB adapter which will handle all the operations on the database tables. The SQL is created at the runtime depending on the input. Is there any option for DB adapter where I can pass this dynamic query? Is there another way to implement this, if not this way?
Thanks
Taru

Taru,
I assume you're talking about the ESB/SOA Suite DB adapter - in which case, the SOA Suite forum would probably yield you better results.
John

Similar Messages

  • Dynamically Pass sql query in Database adapter

    hi',
    How can we dynamically pass sql query in Database adapter, is there any way, I am using SOA 11G.
    Thanks
    Yatan

    Hi,
    Tried that too. No luck. Gives me this.
    The selected operation process could not be invoked.
    An exception occured while invoking the webservice operation. Please see logs for more details.
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'selectUsingIn' failed due to: Pure SQL Exception.
    Pure SQL Execute of select interface_id, property_name, property_value from ( (?) ) failed.
    Caused by java.sql.SQLSyntaxErrorException: ORA-00903: invalid table name
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    Regards,
    Neeraj Sehgal

  • Sending a dynamic query to DB adapter

    Hi,
    I am using jdeveloper 10.1.3.4. As per the requirements, I am supposed to have only one DB adapter which will handle all the operations on the database tables. The SQL is created at the runtime depending on the input. Is there any option for DB adapter where I can pass this dynamic query?
    Thanks
    Taru

    Taru,
    I assume you're talking about the ESB/SOA Suite DB adapter - in which case, the SOA Suite forum would probably yield you better results.
    John

  • Dynamic query using DB Adapter

    Experts,
    I am using DB adapter to call a simple database query. I have selected the option of Execute Pure SQL and the query is -
    SELECT DEPT_NAME,EMPLOYEE FROM DEPARTMENT WHERE EMP_ID IN ( SELECT EMPID FROM EMPLOYEE WHERE (DEPT_ID=#DEPTID))
    When I run the query standalone on database passing the value of dept_id, it works perfect.
    Additionally when I hardcode the value of #DEPTID in db adapter, it works succesfully. But if I use the above query passing DEPTID as input from my bpel process, it returns nothing.
    Can anyone tell me where I am going wrong?
    Thanks

    It is better to have your query in stored procedure. It would help in avoiding deployments in case of a change.
    Cheers!

  • Dynamic Parameters to DB Adapter

    What are the different methods to pass dynamic parameters to DB adapter ?

    See if this helps..
    http://neeraj-soa-tips.blogspot.in/2012/05/multiple-in-parameters-in-db-adapter.html

  • Error while passing URL Dynamically in SOAP AXIS adapter..!!

    Hi ,
    Idoc> XI>SOAP-AXIS
    I am doing a scenario where I need to pass the URL dynamically in SOAP-AXIS adapter by taking the RCVPRN of Idoc.
    If
    RCVPRN = 100 , message has to go to http://10.190.25.16:8210/file/receiver
    RCVPRN = 200 , message has to go to    http://10.190.25.16:8210/file/receiver2
    RCVPRN = 300 , message has to go to    http://10.190.25.16:8210/file/receiver3
    I used the below UDF and it is working correctly and generating the URL dynamically .
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey keyHeader1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/SOAP", "TServerLocation");
    conf.put(keyHeader1, a);
    return "";
    The value is coming in SOAP document as expected like below.
    <sap:DynamicConfiguration xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
      <sap:Record namespace="http://sap.com/xi/XI/System/SOAP" name="TServerLocation">http://10.190.25.16:8210/file/receiver3</sap:Record>
      </sap:DynamicConfiguration>
    I used the below Configuration modules in receiver SOAP-AXIS adapter as suggested in Note 1028961.
    AF_Adapters/axis/AFAdapterBean ---> afreq
    AF_Adapters/axis/HandlerBean ---> xireq
    AF_Adapters/axis/HandlerBean ---> dc
    AF_Adapters/axis/HandlerBean ---> remover
    AF_Adapters/axis/HandlerBean ---> trp
    AF_Adapters/axis/HandlerBean ---> xires
    AF_Adapters/axis/AFAdapterBean ---> afres
    xireq -> handler.type-> java:com.sap.aii.axis.xi.XI30OutboundHandler
    dc -> handler.type-> javasap.aii.axis.xi.XI30DynamicConfigurationHandler
    dc ---> key.1 ---> write http://sap.com/xi/XI/System/SOAP TServerLocation
    dc ---> location.1 ---> context
    dc ---> value.1 ---> transport.url
    remover ---> handler.type ---> java:com.sap.aii.axis.soap.HeaderRemovalHandler
    remover ---> namespace ---> http://sap.com/xi/XI/Message/30
    trp ---> handler.type ---> java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender
    trp ---> module.pivot ---> true
    xires ---> handler.type ---> java:com.sap.aii.axis.xi.XI30OutboundHandler
    and I am getting the below error in SOAP-AXIS channel at the point java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender.
    2009-03-02 15:23:44 Success Axis: getting handler trp of java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender
    2009-03-02 15:23:45 Error Axis: error in invocation: (500)internal server error
    2009-03-02 15:23:45 Error MP: Exception caught with cause (500)internal server error
    2009-03-02 15:23:45 Error Exception caught by adapter framework: (500)internal server error
    2009-03-02 15:23:46 Error Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: (500)internal server error: (500)internal server error.
    2009-03-02 15:23:46 Error The message status set to NDLV.
    Kindly let me know if anyone has any idea what might be wrong?
    Note : The given URL is correct one because I cross checked by passing them normally by giving directly in adapter and they are all working and the message is going to receiver.
    Thanks
    Deepthi

    Hi Stefan,
    >> dc -> handler.type-> javasap.aii.axis.xi.XI30DynamicConfigurationHandler
    >> dc ---> key.1 ---> write http://sap.com/xi/XI/System/SOAP TServerLocation
    >> dc ---> location.1 ---> context
    >> dc ---> value.1 ---> transport.url
    >> Try read instead of write
    When I tried with this, I am getting the below error "Connection refused ".
    Success Axis: entering HandlerBean
    Success Axis: getting handler trp of java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender
    Error Axis: error in invocation: java.net.ConnectException: Connection refused
    Error MP: Exception caught with cause java.net.ConnectException: Connection refused
    Error Exception caught by adapter framework: ; nested exception is: java.net.ConnectException: Connection refused
    Error Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: ; nested exception is: java.net.ConnectException: Connection refused: java.net.ConnectException: Connection refused.
    Success The message status set to WAIT.
    It is going successfully when I tried sending directly. Looks like Dynamic Configuration is not working for SOAP-AXIS.
    Any Suggestion?
    Thanks
    Deepthi.

  • Dynamic query configuration in sender jdbc adapter

    Hi,
    According my undertsnading in XI.3.0 dynamic query in sender JDBC adapter is not possible.
    could any one confirms the possibility of this feature in XI 7.0 .
    Thanks,
    venu

    Hi VJ,
    sorry for late responding to your answer.
    One of our requirements is the query statement that we write in sender communication channel should be changed dynamically, for example in where condition the condition parameters values required to change.
    Thanks,
    venu

  • How to pass Username dynamically in Oracle Apps Adapter .jca file

    My BPEL process uses Oracle Applications Adapter. The following is the .jca file for the Adapter.  The Username is initialized statically to "sysadmin" when I created the Adapter. How can I change this to be passed dynamically at runtime? Can I use an EL Expression or an XPath variable. If so how to do and what the correct syntax is?
    Is it possible to pass in the username from the OWSM Security policy for the username value below? If so how to do? I appreciate your response.
    <adapter-config name="EBSAdapter" adapter="Apps" wsdlLocation="../WSDLs/EBSAdapter.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
      <connection-factory UIConnectionName="EBS1" location="eis/Apps/EBS1" UIConcurrentPgmName="" UIOracleAppType="DBOBJECT"/>
      <endpoint-interaction portType="EBSAdapter_ptt" operation="EBSAdapter">
        <interaction-spec className="oracle.tip.adapter.apps.AppsStoredProcedureInteractionSpec">
          <property name="SchemaName" value="APPS"/>
          <property name="PackageName" value="INTG"/>
          <property name="ProcedureName" value="GET_USER_PROFILE1"/>
          <property name="IRepInternalName" value="PLSQL:INTG:WEBCENTER_GET_USER_PROFILE1"/>
          <property name="Username" value="sysadmin"/>
          <property name="Responsibility" value="System Administrator"/>
        </interaction-spec>
      </endpoint-interaction>
    </adapter-config>

    1. Go to Invoke activity
    2. Click on Properties tab.
    3. click Add
    4. Add this property "jca.apps.Username" and map it with either variable or expression.
    5. Populate variable defined at previous step with some valid username value at runtime.
    hope this helps.
    Regards,
    Karan
    Oracle Fusion Middleware Blog

  • Build dynamic SQL query in Database Adapter.

    Hi All,
    I have a requirement to build dynamic sql query at Database Adapter.
    My BPEL process is getting search spec as input from siebel. I need to process this searchspec in BPEL and need to build the SQL query dynamically at Database Adapter to fetch the records from DB.
    it goes like this....
    1. Sieble Search Spec: city1 OR city2 OR city3 OR city4 .....
    I need to build query as
    select * from S_ADDR_PER where city like 'city1' OR city like 'city2' OR city like 'city3' OR city like 'city4' ......
    2. Siebel Search spec: city1 AND country1 AND state1....
    I need to build query as
    Select * from S_ADDR_PER where city like 'city1' AND country like 'country1' AND state like 'state1' ....
    3. Siebel Search spec: state
    I need to build query as
    select * from S_ADDR_PER where state like '%state%';
    Is it feasible in Database Adapter? if its Yes.
    Any guidelines to achieve this?
    Thank you
    Chandra

    Hi All,
    I have a requirement to build dynamic sql query at Database Adapter.
    My BPEL process is getting search spec as input from siebel. I need to process this searchspec in BPEL and need to build the SQL query dynamically at Database Adapter to fetch the records from DB.
    it goes like this....
    1. Sieble Search Spec: city1 OR city2 OR city3 OR city4 .....
    I need to build query as
    select * from S_ADDR_PER where city like 'city1' OR city like 'city2' OR city like 'city3' OR city like 'city4' ......
    2. Siebel Search spec: city1 AND country1 AND state1....
    I need to build query as
    Select * from S_ADDR_PER where city like 'city1' AND country like 'country1' AND state like 'state1' ....
    3. Siebel Search spec: state
    I need to build query as
    select * from S_ADDR_PER where state like '%state%';
    Is it feasible in Database Adapter? if its Yes.
    Any guidelines to achieve this?
    Thank you
    Chandra

  • Pass dynamic values to search-query in wlp-syndication-config for RSS

    Hi All,
    I want to pass dynamic values to the <search-query> element for the <syndication-feed> node in the wlp-syndication-config.xml file for implementing RSS feeds.
    Here's a sample
    <syndication-feed>
              <name>RSSFeed</name>
              <search-query>cm_objectClassInstance=='Node' &amp;&amp; date == 'x'_</search-query>
              <search-type>pubmeta</search-type>
         </syndication-feed>
    I tried passing the parameter in the url but the feed doesn't read it. The only option i have is to manually put the value to get the content from the repository, which sucks...because the values can change any time. is there any way that I can avoid it
    Any help on this would be appreciated.
    Thanks,
    K

    James:
    Passing filters to an IR within the URL is described here
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/app_comp.htm#sthref989
    Varad

  • Passing file name dynamically to the file adapter

    Hi All,
    I'm using a file adapter to create a file from the XML message after mapping in XI. The file name is given in the file adapter configuration. Is it possible to have the file name as a part of the message and pass it to the file adapter dynamically? Or is it possible to have the file name in some variable or something in XI (like a BPM variable) and pass it to the adapter for every message?
    Does someone have any idea?
    Thanks,
    Sandeep

    Hi Sandeep,
    This is possible.
    For creating filenames dynamically for your sender, you will have to crate a variable name ( eg: %VAR%) as you file name and then you will have to give the name of your file under variable substitution. Just check this link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    In the case of receiver file adapaters, you have 5 options for file creation like,
    1.Create
    2.Append
    3. Add time stamp
    4.Add Counter
    5. Add Message ID
    You can choose any of these options or you can do it dynamically from you payload. Just check out this help link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Hope this helps

  • Dynamic Query to display a page of records at a time

    I need some help creating procedure with a dynamic query that will query a table and pass out a certain number of records (like records 101 - 200 of 20,000). This procedure will receive the column names, table name, where clause, page number and number of records per page. It will then pass back the requested records to be displayed on a PHP page.
    Pseudo Code:
    Select Dynamic_Columns, ROWNUM
    Into Dynamic_Pl_Sql_Table
    From Dynamic_Table
    Where Dynamic_Where_Clause
    Total_Records_Out := Dynamic_PL_Sql_Table.Count
    Modulus := Mod(Total_Records_Out, Total_Records_Per_Page_In)
    Total_Pages_Out := (Total_Records_Out - Modulus) / Total_Records_Per_Page_In
    If Modulus > 0 Then
    Total_Pages_Out + 1
    End If
    Row_Start = Page_Number_In * Total_Records_Per_Page_In
    Row_End = Row_Start + Total_Records_Per_Page_In
    Results_Out = Dynamic_Pl_Sql_Table(Row_Start ... Row_End)
    Any help with this will be appreciated!

    Maybe this will help you
    1) If the Serial is 0 then page break
    2) total_rows gives you total number of rows selected.
    3) you can apply where clause to this and it will give you appropriate records.
    select empno, ename, sal, 
    mod(row_number() over (order by null),5) serial,
    count(*) over () tot_rows from emp ed
         EMPNO ENAME             SAL     SERIAL   TOT_ROWS
          7369 SMITH             800          1         14
          7499 ALLEN            1600          2         14
          7521 WARD             1250          3         14
          7566 JONES            2975          4         14
          7654 MARTIN           1250          0         14
          7698 BLAKE            2850          1         14
          7934 MILLER           1300          2         14
          7788 SCOTT            3000          3         14
          7839 KING             5000          4         14
          7844 TURNER           1500          0         14
          7876 ADAMS            1100          1         14
          7900 JAMES             950          2         14
          7902 FORD             3000          3         14
          7782 CLARK            2450          4         14
    14 rows selected.SS

  • How to create an LOV based on a dynamic query

    Hi,
    Can someone tell me how to query a dynamic query for LOV. On my base page I have a dropdown-box (that will show the table names for searching) and is dynamically populated based on users access e.g. if user A logs in he may see 5 values (these values are basically table names) in a drop down if user B logs in he may see 10 values. I also have two input fields one field a user can enter value and the other field is read only and a torch icon for LOV so the user can search and select values that are populated in the input fields on the base page.
    How can I have my LOV that takes in a value selected in the dropdown and anyvalue entered in one of the input fields and search in the table selected in the dropdown box.
    Basically my LOV should do a search on the table and some search value passed when clicking on the torch icon. So a user can select any table-name in the drop down and my LOV should do a search only on the selected table. Once on the LOV Popup want to have a search field there but it only searched on the table selected in the dropdown on the based page. And the selected value on the LOV Popup page gets populated in fields on the base page.
    Any help is appreciated.
    Thanks

    Hi,
    I have created 4 SQL Based VO's with the following sqls
    SELECT header_id AS ID, to_char(order_number) AS NAME
      FROM oe_order_headers_all
    SELECT party_id AS ID, party_name AS NAME
      FROM hz_parties
    SELECT quote_header_id AS ID,
           (quote_number || CHR (45) || quote_version) AS NAME
      FROM aso_quote_headers
    SELECT sales_lead_id AS ID, to_char(lead_number) AS NAME
      FROM as_sales_leadsI created on LOVRegin and have the following 2 messagestyle items now what do I set in the ViewInstance and View Attribute fields
    srcid
    srcname
    Can you provide some sample code to set ViewUsage and whereclause that I need to put in the controller of LOVRegion.
    Thanks

  • FTP how to pass dynamic filename/directory location - reading a file in 11g

    Hi All,
    We r using FTP adapter(SOA 11g) for getting files in remote server, May i know how to pass dynamic filename and directory where the file exists for reading in server.
    Thanks,
    Rak

    Hey according to my understanding, the Dynamic partner links are set only for the Outbound invocations only. Is my understanding right? if so, how do we create the dynamic partnerlinks for the ftp get kind of stuff...??
    Thanks in advance

  • How to pass dynamic filename to Receiver JMS channel

    Hi experts,
    I want to pass the dynamic filename to receiver JMS message Properties.
    for example
    I am passing directory name via adapter module AF_Modules/DynamicConfigurationBean with key and value combination like below. How to pass dynamic filename value to a dynamic property ( say DCJMSMessageProperty1)
    eg.
    key.0 - >insert http://sap.com/xi/XI/System/JMS DCJMSMessageProperty0
    value.0 - >  testdirectory ( which is static value)
    Note: Im have not created any ESR object . i just have to bypass the file to a jms queue. I have used AAE integrated configuration scenario ( file to jms )
    Regards,
    Balaji
    Edited by: Balaji Pichaimuthu on Jan 27, 2011 4:45 PM
    Edited by: Balaji Pichaimuthu on Jan 27, 2011 4:46 PM

    Already given link for the dynamic configuration code snippet in the earlier reply... Below is the code snippet
    Note: Use Adapter Specific Message Attributes for the target Communication Channel(CC).Check the indicator for filename in the advanced tab of CC
    //UDF code
    String filename="";
    String NameSpace = "http:/"+"/sap.com/xi/XI/System/JMS";
    try{
          DynamicConfiguration conf = (DynamicConfiguration) param.get(
            StreamTransformationConstants.DYNAMIC_CONFIGURATION);
          DynamicConfigurationKey key  =  DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File",   "FileName");
           // read filename value
           filename = conf.get(key);     
          // So far we extracted filename value .. now do your logic  something like this...
          DynamicConfigurationKey key2 = DynamicConfigurationKey.create(NameSpace,"yourjmsvalue goes here");
           conf.put(key2,filename);
         } catch(Exception e){

Maybe you are looking for

  • LOV not being applied to a column

    Problem: The first query runs quite fast as it is soft parsed, but the LOV values are not applied to the resulting values in the column CHECK_MARK. The second query is hard parsed (and slow due to that) but has its LOV value properly realized. The LO

  • Pop up window on dock freezes...

    When I click on an icon in the dock, the pop up window freezes...(Keep In Dock, Open at Login, Show in finder, etc... for example), the window will freeze and I get no action, nothing happens in the dock at this point...Everything else on my computer

  • I need to zero my itunes balance (0.16 USD) to change my country? How do I do that?

    Hi - I have 0.16 USD balance on my itunes which I dont want.. Unless I zero my balance, itunes does not allow me to change the country!! how do i do this or contacc apple support?

  • Problem inserting into tables

    Hello All, I hope that someone out there may be able to shed some light on my problem!! I have developed a series of JSP pages for my web site (using Tomcat 4.1)to allow a Customer to register themselves with the site. I have developed 3 correspondin

  • Imac yosemite x problems

    CAnnot start or restart.  Get error saying computer encountered an error and will resart which it does.  Same error measage and a flash of highlighted dialogue on left screen.  Restarts itself and half way through loading bar same thing happens.  Con