SQL query in adapter process task

Hi all,
I am building a custom connector with its bunch of adapters.
In one of the adapters, i need an auto increment number and therefore i have built an SQL sequence in the DB. Is there a way to use the tcDataProvider variable mapped to the adapter database reference to execute an sql query and retrieve the number? What other ways may i have to accomplish this task?
thx in advance

i've found the jar containing the tcErrorReceiver class. But now i get this exception
+ Thor.API.Exceptions.tcAPIException: Error while getting utility Thor.API.Base.tcUtilityOperationsIntf +
+     at Thor.API.tcUtilityFactory.getRemoteUtility(tcUtilityFactory.java:433) +
+     at Thor.API.tcUtilityFactory.getUtility(tcUtilityFactory.java:330) +
+     at FirstAPITest.main(FirstAPITest.java:46) +
below is my code.
+public static void main(String[] args) {+
+          System.setProperty("XL.HomeDir", "/home/alex/workspace/OIMSignatureClient"); +
+          System.setProperty("java.security.auth.login.config","/home/alex/workspace/OIMSignatureClient/config/authwl.conf"); +
+          System.setProperty("java.security.policy","/home/alex/workspace/OIMSignatureClient/config/xl.policy"); +
+          try{ +
+               System.out.println("Startup..."); +
+               System.out.println("Getting configuration..."); +
+               ConfigurationClient.ComplexSetting config = +
+                    ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer"); +
+               System.out.println("Login..."); +
+               Hashtable env = config.getAllSettings(); +
+               tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","Technology0"); +
+               System.out.println("Getting utility interfaces..."); +
+               tcBaseUtility mBaseUtil = (tcBaseUtility) ioUtilityFactory.getUtility("Thor.API.Base.tcUtilityOperationsIntf"); +
+               tcDataProvider databaseReference=mBaseUtil.getDataBase(); +
+               +
+          }catch (Exception e){ +
+               e.printStackTrace(); +
+          } +
+          System.exit(0); +
+     } +
+} +
any ideas?
Edited by: Prorad on Dec 17, 2010 6:48 AM

Similar Messages

  • How the SQL Query Parsing is processing inside SQL/PLSQL engine?

    Hi all,
    Can you explain how the SQL Query Parsing is processing inside SQL/PLSQL engine?
    Thanks,
    Sankar

    Sankar,
    Oracle Database concepts - Chapter 24..
    You will find the explanation required under the heading parsing.
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14220/sqlplsql.htm

  • Using item values in a pl/sql block or sql query in a process

    Hi,
    I am new to apex. Developing my first application.
    I have created a form with 2 items. Based on the values in these items, when I click a button, want to execute a
    query.
    eg: emp_name(item1), deptno(item2). When I clock on find button, I want to fetch the record and disply the resultant
    columns in other created items like sal,comm etc.
    How can I do this?
    I tried the following pl/sql block in a process
    begin
    select sal,comm into p1_sal,p1_comm from emp where name=p1_name and deptno=deptno;
    end;
    But it is not accepting the page items in the block.
    How to achieve this?
    Thanks,
    Kavitha

    We have many OBEs, tutorials, etc. Please visit the <a hef="http://www.oracle.com/technetwork/developer-tools/apex/learnmore/index.html" target="_window">Learn More</a> tab of our otn site.
    This is the section of the User's Guide that discusses session state -
    -- Sharon

  • Jars location(Adapter- Process task)

    Hi,
    I had created an adapter and had attached to a process task. The adapter had the custom jar file. Now, I want to modify the jar file. And to do this I tried to download the jar using DownloadJar utility. But OIM throws FileNotFound Exception saying the jar file is not found in the database. IN which table does these jars stored in OIM 11g DB. I tried in PLUGINS,OIMHOME_JARS table but didnt see my jar. Can anyone please let me know how to find the jar file.
    Thanks,

    while creating adapter where did you put your custom jar?
    have you uploaded using uploadjars utility if not it should be in <IDM_HOME>/server/JavaTask folder
    --nayan                                                                                                                                                                                                                                                                                                                                                   

  • Clarification Adapter-Process task association

    Hi,
    yet another basic question...
    I have built my IT resource+resource object+adapters+provisioning process.
    This is for study purpose.
    The user get`s correctly created. What is now not clear to me is how can I tell
    to OIM which process task to use for updating the user. The same for delete/
    enable/disable.
    I realize that this must be done in the lookup definition in the design console,
    but do not now how. Can you please shed a light on this?
    Thank you very much.

    Hi
    Edits are typically done on the process form of the resource by an admin. for example say some attribute e.g. First Name needs to be changed on the target system after provisoning (i.e. account creation).
    You will need to create a conditional task (not required for completion) which has a name "First Name Updated".
    OIM understands tasks that are named with the <attribute/field name> Updated (the attribute name must be the exact case as the field name in the process form)<space>Updated (notice "U" upper case) are special and you can attach any adapter (business logic) to make OIM do what you need it to do. In this case you will attach a modify adapter that will update the value of the corresponding field on the target system.
    For Enable and Disable you will need to create a task with any name typically people use "Enable User" "Disable User" respectively but thats not necessary. Whats of essence is the task effect drop down on the "Edit Task" window of the task you created (Disable User or Enable User in this case), select the "Disables process or access to application" for disable user task and attach your adapter for disabling the account on the target system, and set the task to Object status mapping C as "Disabled".
    For enable just select the Enables.... from the drop down and attach your adapter for enabling the account on the target system, and set the task to Object status mapping C as "Enabled".
    For delete/revoke, you can create a task with any name e.g. Delete User but what you need to do is put this task in the undo/recovery of the "Create User" task or whatever task that creates the account e.g. Create User task.
    hope this helps.

  • Script task to convert output from a sql query into send mail task body formatting

    SSIS 2008R2 Version
    Code from script task
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_29dd6843bd6c4aee9b1656c1bbf55ba8.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            public void Main()
                Variables varCollection = null;
                string header = string.Empty;
                string message = string.Empty;
                Dts.VariableDispenser.LockForWrite("User::gsEmailMessage");
                Dts.VariableDispenser.LockForWrite("User::gsWebserviceName");
                Dts.VariableDispenser.LockForWrite("User::gsNoOfCallsInADay");
                Dts.VariableDispenser.LockForWrite("User::gsCalledBySystem");
                Dts.VariableDispenser.GetVariables(ref varCollection);
                //Set the header message for the query result
                if (varCollection["User::gsEmailMessage"].Value == string.Empty)
                    header = "Hi, Count is greater then 50 :\n\n";
                    //header = "Execute SQL task output sent using Send Email Task in SSIS:\n\n\n";
                    header += "----------------------------------------------------------------------------------------------------------------------" + "\n";
                    header += string.Format("{0}\t\t\t\t{1}\t\t{2}\n", "WebService Name", "No Of Calls In A Day", "Called By System");
                    header += "----------------------------------------------------------------------------------------------------------------------" + "\n";
                    varCollection["User::gsEmailMessage"].Value = header;
                //Format the query result with tab delimiters
                     message = String.Format("<HTML><BODY><P>{0}</P><P>{1}</P><P>{2}</P></BODY></HTML>",
                                            varCollection["User::gsWebserviceName"].Value,
                                            varCollection["User::gsNoOfCallsInADay"].Value,
                                            varCollection["User::gsCalledBySystem"].Value);
                varCollection["User::gsEmailMessage"].Value = varCollection["User::gsEmailMessage"].Value + message + "\n";
                Dts.TaskResult = (int)ScriptResults.Success;
    Above code will return data in below format and then i send this output in aemail using send mail task.
    Hi, count is greater then 50 :
    WebService Name                                                         
    No Of Calls In A Day                        Called By System
    WebServiceone                                                     1                             
    Internetbutiken
    WebServiceGetdetailstwo                                                  1                             
    Internetbutiken
    Servicenamethree                                                            2                             
    MOB
    As you can see above code is not in align as if we service name is shorter then 2nd column get disallign and its not look good.I need output should be like below.
    Hi, count is greater then 50 :
    WebService Name                                                         
    No Of Calls In A Day                        Called By System
    WebServiceone                                                              1                             
    Internetbutiken
    WebServiceGetdetailstwo                                              1                             
    Internetbutiken
    Servicenamethree                                                          2                             
    MOB
    Please suggest something...
    Thanks 
    SR_MCTS

    See code explained here
    http://microsoft-ssis.blogspot.in/2013/08/sending-mail-within-ssis-part-2-script.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
    This will not help.As I am not creating smtp connectin ,send from ,send to in script task.I am just creating email body from sql output.

  • How to bind/pass multiple input parameters to sql query in BPEL Process

    Hi,
    I have a requirement to invoke a query on a database table to fetch the records based on the few input values or bind variables?
    I have created a Partner link using the DBAdapter service and have used custom SQL, how can i bind and pass multiple bind/input parameters for these queries.
    foreg: if i have to query employee records based on name , desgination and age, these three params would be my input parameter that i will pass when i invoke the BPEL process, bow how can i pass these parameters to the partner link using DBADAPTER service.
    Please help
    Regards

    If the parameter-value is not known beforehand and cannot be determined based on the process instance data at that time, there are 2 options. Either invoke the PL/SQL procedure you named using a DB adapter service to get the value and pass it to the other DB adapter service. Or create a single service (e.g. PL/SQL procedure) that determines the parameter value, executes the query and returns the result. However, this is more a design issue. Does it makes sense to combine these actions in a separate service and use it or are these actions not related? You furthermore state that additional (DB adapter) services make the process heavier. Do you have strict requirements on the time process-instances may run or other such requirements? If not, I think the design-choice on whether combining these actions in a single service should have more priority.

  • Query to find dependent task attached to task on some response in OIM 11g

    can anyone help me in making a sql query to find dependent task attached to task on some response in OIM 11g
    Edited by: user13331347 on Sep 3, 2012 2:09 PM

    Use below query to find all dependent task in OIM 11g:-
    select pkg.pkg_name, mil.mil_name, rsc.rsc_data, rsc.sta_key, sta.sta_status, sta.sta_bucket, mil2.mil_name
    from     pkg pkg, tos tos, mil mil, mil mil2, rsc rsc, sta sta, rgm rgm
    where     pkg.pkg_key = tos.pkg_key
    and tos.tos_key = mil.tos_key
    and mil.mil_key = rsc.mil_key
    and rsc.sta_key = sta.sta_key
    and rgm.rsc_key = rsc.rsc_key
    and rgm.mil_key = mil2.mil_key
    order by pkg.pkg_name, mil.mil_name, rsc.rsc_data, sta.sta_status, mil2.mil_name

  • On Submit process not firing -report (PL/SQL function returning SQL query)

    Can anyone suggest possible causes / solutions for the following problem?
    I have a report region that uses a PL/SQL function returning SQL query. The report allows the user to update multiple fields / rows and then click a button to submit the page which should run the On-Submit process to update the database. However the process does not run and I get a 'HTTP404 page cannot be found' error; and when I navigate back using the Back button I cannot then navigate to any other page in my application without getting the same error. The button was created by a wizard selecting the options to submit the page and redirect to a (same) page. The button does not actually have a redirect in its definition but the wizard created a branch to the same page which should work and the button has the text 'submit as SUBMIT' next to it so it appears to be set up correctly.
    I have recreated this page several times in my application and I cannot get the On-Submit process to run. However I have created a cut down version of the same page in the sample application on apex.oracle.com at http://apex.oracle.com/pls/otn/f?p=4550:1:179951678764332 and this works perfectly so I am at a loss to understand why it does not work in my application. I cannot post any part of the application itself but if anybody would like to check out page 30 of the sample application (Customer Update Test tab) updating the surnames only, using credentials ja, demo, demo this is pretty much what I have got in my application.
    Any ideas would be much appreciated?

    Thanks for the suggestions guys. I have now identified that the problem goes away when I remove the second table from my report query. The original report query retrieved data from two tables and the process was updating only one of the tables. I thought I had approached the task logically i.e. first get the report to display the records from the two tables, then get the process to update the first table and finally to modify the process further to update the second table.
    Can anyone point me to an example of multiple row updates on multiple tables using a PL/SQL function returning an SQL query?

  • Reg: SQL select Query in BPEL process flow

    <p>
    Hi,
    I am suppose to execute a SQL select query (in BPEL Process flow) as mention below in JDeveloper using Database adapter.
    </p>
    <p>
    SELECT LENGTH, WIDTH, HEIGHT, WEIGHT,
    </p>
    <p>
    LENGTH*WIDTH* HEIGHT AS ITEM_CUBE
    </p>
    <p>
    FROM CUBE
    </p>
    <p>
    WHERE ITEM= &lt;xyz&gt;
    </p>
    <p>
    AND OBJECT= (SELECT CASE_NAME FROM CUBE_SUPPLIER WHERE ITEM=&lt;xyz&gt; AND SUPP_IND = &lsquo;Y')
    <strong>Now my question is:
    1.</strong> What does this "*" refer to in the query and how can I retrieve the value of LENGTH*WIDTH* HEIGHT from the query where LENGTH,WIDTH and HEIGHT are the individual field in the table.
    2.What does this " AS" refer to? If " ITEM_CUBE " is the alies for the table name "ITEM" to retrieve the value, then query shoud be evaluated as
    </p>
    <p>
    SELECT LENGTH, WIDTH, HEIGHT, WEIGHT,
    </p>
    <p>
    LENGTH*WIDTH* HEIGHT AS ITEM_CUBE
    </p>
    <p>
    FROM CUBE
    </p>
    <p>
    WHERE <strong>ITEM_CUBE.ITEM</strong>= &lt;xyz&gt;
    </p>
    <p>
    AND <strong>ITEM_CUBE.OBJECT</strong>= (SELECT CASE_NAME FROM CUBE_SUPPLIER WHERE ITEM=&lt;xyz&gt; AND SUPP_IND = &lsquo;Y')
    Is my assumption correct?
    Please suggest asap.
    Thanks...
    </p>
    <p>
    </p>

    Hi
    Thank for your reply!
    I have a nested select query which performs on two different table as shown below:
    <p>
    SELECT LENGTH, WIDTH, HEIGHT, WEIGHT,
    </p>
    <p>
    LENGTH*WIDTH* HEIGHT AS ITEM_CUBE
    </p>
    <p>
    FROM CUBE
    </p>
    <p>
    WHERE ITEM= &lt;abc&gt;
    </p>
    <p>
    AND OBJECT= (SELECT NAME FROM SUPPLIER WHERE ITEM=&lt;Item&gt; AND SUPP_IND = &lsquo;Y')
    I am using DB adapter of Oracle JDeveloper in BPEL process flow, where I can able to select only one master table in DB adapter say SUPPLIER and its attributes at a time.But as per my requirment I need to select both the table (CUBE and SUPPLIER) in a single adapter to execute my query.
    It can be achievable by using two DB adapter , One to execute the nested query and another to execute the main qyery considering value of nested query as a parameter.But I want to achieve it by using a single one.
    Am I correct with my concept?
    Please suggest how to get it ?
    </p>
    Edited by: user10259700 on Oct 23, 2008 12:17 AM

  • 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

  • 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

  • Process Task Adapter that looksup value

    Hi,
    Any help on creation of a process task adapter that will lookup a value in OIM.
    I wanted to make this as a generic adapter, by passing the lookup name and a codekey value which should fetch the decoded value in that lookup table.
    By doing so, I wanted to set few attributes so that when a attribute value got changed in USR form, it should search the mapped lookup and the codekey value (using a process task definition) and then set the decoded value in the targetted attribute.
    Thanks in advance.
    Regards.

    Here is the thread which might help you. Solution is there.
    Adapter for querying lookup table
    Sunny

  • Complex SQL Query in BPEL DB Adapter

    Hi,
    Is it possbile to write a complex query in BPEL DB Adapter using "Custom SQL Query"?
    I would like to write an IF ELSE condition in the DB Adapter similar what is given below..
    IF((SELECT COUNT(*) FROM F5898001 WHERE CT58SRCNME = 'CA_TEST' AND CTJOBNAME = '12345' AND CTEDBT = 'EDBT' AND CTEDSP = 'B') < 1)
    BEGIN
    insert into f5898001 (CTJOBNAME,CTEDSP,CTEDBT,CT58SRCNME) VALUES (#jobname, #edsp, #edbt, #srcnme)
    END.

    In a single pass no.
    You could use a DB link to perform select and return result to BPEL process variable. Put a switch decision depending on result in variable that calls a DB Adapter to perform the insert.
    Wouldn't be in a single transaction and not very elegant, but might be a way round.

  • How to notify in case SQL query(JDBC sender adapter) does not fetch records

    hi,
    How can we notify(by alerts or something) in case SQL query(JDBC sender adapter) does not fetch records? In channels logs it only says processing started & finished(no message is created for same).
    Thanks,
    Mayank

    Hi,
    1 ) What is exact audit log message ?
    2) Try fetching the count in SQL statement  if there are any valid records it will give the count.
        May for testing you can use <TEST> in update statement.
    3) Have you used taskTimeout parameter ?
    4) Are multiple channels polling on same table ?
    regards
    Ganga

Maybe you are looking for

  • Service Broker Activation Deadlocking

    I have implemented a (slightly) modified version of conversation recycling using conversation timers and stored procedure activation from http://rusanu.com/2007/05/03/recycling-conversations/ . However it appears that, occasionally, deadlocks  occur

  • Why can't i connect to any of my bluetooth devices that i have already paired?

    Why can't I connect to any of my Bluetooth devices i have already paired with?

  • ITunes 9.2 XML file does NOT contain any iBooks information

    I have a little script that I have that generates a webpage to list what is in my iTunes library. I noticed that the XML file does not contain ANY information about iBooks or PDFs that you import. Any idea why that is? If my main library file gets co

  • Java.lang.IllegalStateException: duplicate Id for a component

    Hi everyone, please I'm really having a serious issue on the duplicate id for a component in view. I have a page of which I used the <jsp:include> tag to add to some pages of my application. The page have the following code snippet in it <%@taglib pr

  • Problem in the Columns Display

    Hi all, I am using sql developer 1.1.0.23. I am facing some weird problem: 1. Execute the following query. select * from all_objects where object_name like UPPER('%&object_name%') and object_type in ('TABLE','VIEW'); 2. Fetch the records and note the