Oracle BLOB value to a LC variable

Hello,
Is it possible in LC ES2 to coerce oracle blob value to some livecycle variable ?
When mapping sql query result (column of type BLOB) to a LC variable (of type Document), we receive:
com.adobe.workflow.datatype.InvalidCoercionException: Cannot coerce object: oracle.sql.BLOB@27e7d6 of type: oracle.sql.BLOB to type: com.adobe.idp.Document
We have tried mapping to string, binary, Document (, we even desperately hardcoded sql.oracle.BLOB to process XML), but none of this works.
Is it possible to solve this other way, then following ?
http://groups.google.com/group/livecycle/browse_thread/thread/6c4b9156b52b71a7
Thanks.

My idea is to fetch the BLOB column data as UTF8 (base64) encoded string and then use getDocumentFromBase64 available in ES2.
I am not sure what syntax is to fetch from ORACLE.
I have used MySql database and the query is:
SELECT CONVERT(Blob_Column USING UTF8) as MyBlobDataAsBase64Str FROM myTableName;
Now using SetValue activity to look like:   myXMLvariable = getDocumentFromBase64(strVariableHoldingBase64Data)
This case works perfectly without any issues.
The problems is you should find out the appropriate syntax for ORACLE.
I was searching about CONVERT() & UNISTR() functions. But i'm unable to evaluate.
Try by yourself..
Nith

Similar Messages

  • PDF binary variable won't save in Oracle blob

    I am reading in a small, legitimate PDF as a binary variable and them immediately saving that variable into a blob. But the blob doesn't store the data.
    <cffile action="readbinary" file="C:\Test_Files\test.pdf" variable="testdoc">
    now shows isbinary(testdoc) = YES
    In fact, I can output to the screen using cfcontent, and it displays fine.
    But if I try to save the testdoc variable to an Oracle blob, CF seems to think it is trying to insert an empty variable.
    <cfquery name="ins" datasource="#request.a_datasource#">
    INSERT
    INTO PROD_WCT.T_DOCS (
    PDF_BLOB
    VALUES (
    <cfqueryparam value="#testdoc#" cfsqltype="CF_SQL_BLOB">
    Now if I retrieve that row (query name=”get_pdf”) and check the value, it appears empty:
    now shows isbinary(get_pdf.pdf_blob) = NO
    Nothing is done in betweent the cffile and the insert. Any ideas?

    Just an update here to note that this problem has not yet been resolved.
    This could be in incompatibility between Oracle 10g BLOBs and Coldfusion 8.
    To review, my BLOB setting in CFADMIN is enabled. To make this as simple and possible, I created a PDF from the words "Test text," so the PDF document can't get much smaller. The PDF does save to the BLOB, because in TOAD I can save the BLOB contents to a file and view it as a PDF just fine. It's when I retrieve the record in CF8 where the trouble arises. Coldfusion 8 doesn't get anything from the BLOB. It has a zero length, and isbinary = NO. We are using Oracle 10g. And using CF8. My understanding is that an Oracle blob uses pointers to locate the blob data in an area external to the database. Apparently, Coldfusion cannot retrieve the data. The process worked for the first few records when retrieving a blob and displaying it with cfcontent, but after a few records it can no longer retrieve the subsequent blob records. It just abruptly fails at that point. But again, the PDF binary data is there in TOAD.
    Could this be a bug or incompatibility with Oracle 10g? We are a state government, and it sure would help if the Adobe people could give come help here.
    Thanks in advance for any thoughts.

  • How To Pass Oracle Procedure Value using Tidal Oracle Database Job Definition to Tidal Variable

    how do i pass the parameter value from an oracle database tidal job to a tidal variable? for example i have this oracle db job that is defined to execute an oracle database procedure and i need to pass the parameter value to the tidal variable.
    SQL tab:
    begin
      procedure_get_user_info(<OracleUserVariable.1>);
    end;
    thanks,
    warren

    tesmcmd is a binary that sits in your TIDAL master installation bin directory. It takes options, one of which is varset which let's you set variable values.
    So you can run a system level script ( a unix example is given below) which can set values for group variables.
    Looking at your example you need to find a way to define OracleUserVariable.1
    Where does the value for this variable come from?
    Sample variable set script:
    GROUP_FILE_VAR=`echo $2 | sed -e 's/\.xml\.pgp/\.xml/'`
    tesmcmd varset -i $1 -n GROUP_FILE_XML -v $GROUP_FILE_VAR
    XSD_FILE_VAR=`echo $2 | sed -e 's/\.xml\.pgp/\.xsd/'`
    tesmcmd varset -i $1 -n GROUP_FILE_XSD -v $XSD_FILE_VAR
    And we call the job using
    setvar.sh <JobID..p> <Group.REQUEST_FILE>
    which are overrides from a file event.

  • Oracle error ORA-01461when trying to insert into an ORACLE BLOB field

    I am getting Oracle error ‘ORA-01461: can bind a LONG value only  for insert into a LONG column' when trying to insert into an ORACLE BLOB field. The error occurs when trying to insert a large BLOB (JPG), but does not occur when inserting a small (<1K) picture BLOB.(JPG). Any ideas?
    BTW, when using a SQL Server datasource using the same code.... everything works with no problems.
    ORACLE version is 11.2.0.1
    The ORACLE datasource is JDBC using Oracle's JDBC driver ojdbc6.jar v11.2.0.1 (I also have tried ojdbc5.jar v11.2.0.1; ojdbc5.jar v11.2.0.4; and ojdbc6.jar v11.2.0.4 with the same error result.)
    Here is my code:
    <cfset file_mime = Lcase(Right(postedXMLRoot.objname.XmlText, 3))>
    <cfif file_mime EQ 'jpg'><cfset file_mime = 'jpeg'></cfif>
    <cfset file_mime = 'data:image/' & file_mime & ';base64,'>
    <cfset image64 = ImageReadBase64("#file_mime##postedXMLRoot.objbase64.XmlText#")>
    <cfset ramfile = "ram://" & postedXMLRoot.objname.XmlText>
    <cfimage action="write" source="#image64#" destination="#ramfile#" overwrite="true">
    <cffile action="readbinary" file="#ramfile#" variable="image_bin">
    <cffile action="delete" file="#ramfile#">
    <cfquery name="InsertImage" datasource="#datasource#">
    INSERT INTO test_images
    image_blob
    SELECT
    <cfqueryparam value="#image_bin#" cfsqltype="CF_SQL_BLOB">
    FROM          dual
    </cfquery>

    Can't you use "alter index <shema.spatial_index_name> rebuild ONLINE" ? Thanks. I could switch to "rebuild ONLINE" and see if that helps. Are there any potential adverse effects going forward, e.g. significantly longer rebuild than not using the ONLINE keyword, etc? Also wondering if spatial index operations (index type = DOMAIN) obey all the typical things you'd expect with "regular" indexes, e.g. B-TREE, etc.

  • Oracle & BLOB/LONG RAW

    Hi everybody,
    I need to store binary data (> 32K) in an oracle BLOB field, respectivly commit the data to an oracle PL/SQL stored procedure.
    First I tried to use LONG RAW, but failed to commit more than 32K of data. This seems to be a documented problem, you can store 2GBs in an LONG RAW field, but PL/SQL can only store 32K in an LONG RAW variable.
    Then I tried to switch from LONG RAW to BLOB (both the field in the table and the in variable in the stored procedure) but it seems to be very complicated to use BLOB fields with JDBC.
    I've found example for a plain INSERT. First execute an INSERT with an empty BLOB, then make an SELECT FOR UPDATE on the row, obtain the reference to the BLOB-Object, alter the BLOB-Object and create an UPDATE-Statement with it.
    I've not tried this yet, but according to various web sites it should work.
    The problem is, that it does not solves the problem how to commit a BLOB value to a PL/SQL stored procedure.
    Does anyone knows a solution?
    Thx and regards,
    Robert

    Hi,
    thx for your answer.
    That's the solution I described (INSERT, SELECT, UPDATE) and only works with Statements.
    But I think I've already found a mistake of mine, I have to try this today.
    I already succeeded in creating a BLOB-Object without obtaining it from a resultset, the constructor is not documented but it exists, it looks like BLOB( OracleConnection, byte[] ).
    I think I can commit the BLOB to the stored procedure but it won't be a valid BLOB locator.
    What I've not tried yet and what I think migth be the solution is creating the valid BLOB locator inside the stored procedure using the PL/SQL BLOB methods.
    Sounds simple but for some reasons I have not thougth about it yet. :-)
    I'll report the result here if somebody else is interested in the issue. :o)
    Thx and regards,
    Robert

  • Error while inserting BLOB value in the database

    I am trying to insert a BLOB value in the database. This action results in the following exception:
    java.sql.SQLException: ORA-22925: operation would exceed maximum size allowed for a LOB value
    The method i am using is as follows:
    public void insertBlob(Connection Con, StringBuffer Message)throws SQLException
    String Query = "INSERT INTO MSGBLOCKS (MSGDB_ID, MSGBLOCKTYPE, MESSAGE) VALUES (20, 1 , ?)";
    PreparedStatement PS = Con.prepareStatement(Query);
    byte[] bytes = new String(Message).getBytes();
    ByteArrayInputStream bi = new ByteArrayInputStream(bytes);
    PS.setBinaryStream(1, bi, bytes.length);
    PS.executeUpdate();
    The manifest file of ojdbc14.jar being used is: 10.1.0.5.0 and I am using jdk 1.4.
    Also the message being tried to insert is of 9 Kb only.
    Any help would be greatly appreciated.
    Thanks!!!

    Did you check if the Message is having only that small 9kb of data? also check the maximum allowed size for that column in the Oracle DB, the size can be restricted to 8Kb also.
    Edited by: DynamicBasics on Jul 28, 2010 5:54 PM

  • Assigning a value to a substitute variable

    Hi, I would like to know if it is possible to assign a value to a substitute variable.
    This is what I'm doing:
    - Prompting user for input
    ACCEPT uom CHAR PROMPT 'Enter number of UOM system you would like: ' DEF '0'
    (displayed list of options are numbers 0-5)
    - Based on input, open corresponding file
    (start i:\utc\all\oracle\uom\uom_column_heading_&&uom..sql)
    Problem:
    - Default selection is 0, meaning use the CURRENT UOM system (a number, 1-5)
    - That being said, &&uom must be assigned a 1-5 value in order to open the file that corresponds to the CURRENT UOM system
    Let me know if any additional information is needed.
    Thanks!

    I apologize for the format. I tried to make it more legible, but was not able to. FYI: It appears to be easier to read in "Edit" view.
    Thanks, I tried the &&uom := your_function(); suggestion, but I am getting an error. It looks like the "value" of &&uom is being read in the assignment statement, not the variable name.
    I have copied the piece of the code, for your reference.
    ACCEPT uom CHAR PROMPT 'Enter number of UOM system you would like: ' DEF '0'
    DECLARE
    v_uom_sys_selection NUMBER;
    v_curr_uom_sys VARCHAR2 (50);
    v_uom_num NUMBER;
    BEGIN
    v_uom_sys_selection := to_number(&uom);
    v_curr_uom_sys := EG.GET_CURRENT_UOM();
    v_uom_num := eg.get_user_selected_uomnum(v_curr_uom_sys);
    &&uom := to_char(v_uom_num);
    dbms_output.put_line('v_uom_num = ' || v_uom_num);
    dbms_output.put_line('&&uom = ' || &&uom);
    END;
    --prompt "&&uom"
    start i:\utc\all\oracle\uom\uom_column_heading_&&uom..sql
    Below are the results I get when commenting out the &&uom := to_char(v_uom_num); line. NOTE: the "value" of &&uom = 0.
    v_uom_num = 1
    0 = 0
    If I leave that line in, I get the following error:
    PLS-00103: Encountered the symbol "0" when expecting one of the following:
    begin case declare end exit for goto if loop mod null pragma
    raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe
    The symbol "<an identifier> was inserted before "0" to continue.
    Message was edited by:
    user449676

  • DB2Exception - The value of a host variable in the EXECUTE or OPEN statemen

    I want to store a XML file into database.
    To undersdande my problem, please see the code below:
    java.sql.Connection conn = null ;
    PreparedStatement ps;
    // Here I'm calling a function to get Database Connection.
    String sXmlFile = "" ; // This variable stores a XML file as String
    String sSQL = "INSERT INTO Crs_x_xml (XML_TRAN_ID,XML_MESSAGE,SUSPENDED_FLAG ) VALUES(?,?,?)";
    try {
         ps = conn.prepareStatement(sSQL);
         ps.setLong(1,1);
         ps.setBytes(2, sXmlFile.getBytes());
         ps.setString(3,"A");
         ps.executeUpdate();
         conn.close();
    } catch (Exception e) {
         e.printStackTrace();
    The Problem:
    The table Crs_x_xml that I used has three columns, the first is a int, the second is a BLOB and third is Char(1) and its in DB2 running on AIX.
    Sometimes it execute very well. But sometimes gives following error :=
    COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/AIX64] SQL0302N The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use. SQLSTATE=22001
    I dont know whats going wrong. Plz help....
    ~Abhijeet

    Hi,
    I am using a CMP query in websphere, in which i am trying to execute a select query.
    The query is as follows:
    SELECT OBJECT(o) FROM HrTmmbrAct o WHERE o.tmmbrActC IN ( 1,2,3 ) AND o.effD BETWEEN '2000-02-11' AND '2008-02-22'
    The tmmbrActC is defined as a string in the Websphere CMP fields. I am not sure now to pass the value to it. Do we need to pass it as objects. pls help.
    Thanks
    - Giri

  • Oracle Blob using Java help (Error: JVM_recv in socket input stream read )

    I am trying to insert a record with Blob column (size of image 'mg.jpg' about 15KB) and I get the runtime error:
    [java] java.sql.SQLException: Io exception: Connection reset by peer: JVM_recv in socket input stream read
    [java]      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    [java]      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    [java]      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
    [java]      at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2061)
    [java]      at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
    [java]      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
    [java]      at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    [java]      at test.ProvisioningParser.TestBlob.main(Unknown Source)
    This is what code looks like: I am not sure what's wrong, any help appreciated. Thanks!
         try{
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   con = DriverManager.getConnection("jdbc:oracle:thin:@VALUED-20606295:1521:dbbook","jvending","jvending");
                   java.util.zip.ZipInputStream zip = new java.util.zip.ZipInputStream(new java.io.FileInputStream(new java.io.File("D:\\work\\mywork\\source\\test\\ProvisioningParser\\test.par"))) ;
                   int len = 0 ;
                   java.util.zip.ZipEntry entry = null;
                   do{
                        entry = zip.getNextEntry();
                        if (entry != null){
                             if (entry.getName().equalsIgnoreCase("mg.jpg")){
                                  len = (int)entry.getSize();
                                  break;
                   }while(entry!=null) ;
                   stmt = con.prepareStatement( "Insert into icon (parid, clientbundleid, id, iconfile ) values ( ?,?,?,?)"
                         stmt.setString(1,"101");
                         stmt.setString(2,"101");
                         stmt.setInt(3,1);                    
                         stmt.setBinaryStream( 4, zip, len);
                   stmt.setQueryTimeout(0);
                   stmt.executeUpdate();
                   con.close();               
              catch(Exception e){
                   e.printStackTrace();
              }Thanks,
    Rashmi

    As a guess what you are doing with that zip stuff is very odd.
    You do realize that it is just going to put some binary data into the blob right? And the methods that is going to use will not necessarily create a 'complete' zip file?
    If you want a zip file then just load the file, dont use the zip classes.
    And if you want part of a zip file, (and want to store the parts as a zip) then extract it from the file and create another zip entity using a byte stream rather than a file.
    Finally I suspect your error with the blob occurs because you do not close the statement. But at any rate you should figure out how to do the blob code independent of the zip stuff.
    And what oracle driver version are you using? Some of the older ones need oracle specific handling for blobs.

  • Displaying BLOB value

    Hello,
    Working on Oracle 10G R2/Windows
    There is a way to display BLOB value from SQL*PLUS or other tools?
    Thank for your help

    from sql*plus you can only display first 32767 character from the blob ,however you can write to file using pl/sql and read that file.
    DECLARE
    l_file UTL_FILE.FILE_TYPE;
    l_buffer RAW(32767);
    l_amount BINARY_INTEGER := 32767;
    l_pos INTEGER := 1;
    l_blob BLOB;
    l_blob_len INTEGER;
    cursor c1 is SELECT RAWCONTENT FROM BLOCK;
    BEGIN
    -- Get LOB locator
    -- Open the destination file.
    l_file := UTL_FILE.fopen('BLOBS','Myfile.lst','w', 32767);
    open c1;
    loop
    fetch c1 into l_blob;
    exit when c1%notfound;
    l_blob_len := DBMS_LOB.getlength(l_blob);
    -- Read chunks of the BLOB and write them to the file
    -- until complete.
    WHILE l_pos < l_blob_len LOOP
    DBMS_LOB.read(l_blob, l_amount, l_pos, l_buffer);
    UTL_FILE.put_raw(l_file, l_buffer, TRUE);
    l_pos := l_pos + l_amount;
    END LOOP;
    end loop;
    -- Close the file.
    UTL_FILE.fclose(l_file);
    EXCEPTION
    WHEN OTHERS THEN
    -- Close the file if something goes wrong.
    IF UTL_FILE.is_open(l_file) THEN
    UTL_FILE.fclose(l_file);
    END IF;
    RAISE;
    END;
    /

  • Write blob value into a file

    Hi, all
    I'm looking for the correct method of writing an internal blob value into a file. I know that the best way is using some external language. I.e. Java or C. But also I met a number of solutions of doing within pl/SQL block. All of them look like this:
    CREATE OR REPLACE PROCEDURE Write_Binary_file
       PC$Directory IN VARCHAR2
      ,PC$File_Name IN VARCHAR2
      ,PC$SQL_Order IN VARCHAR2
      ,PB$Raise     IN BOOLEAN DEFAULT FALSE
    -- Procedure to dump a BLOB column onto a file
    -- parameters:
    -- PC$Directory : name of an existing Oracle Directory
    -- PC$File_Name : name of the expected output file
    -- PC$SQL_Order : SQL order to select the BLOB column
    -- PB$Raise     : boolean to indicate if the process
    --                would be stopped after an error
    IS
      src_lob    BLOB;
      buffer     RAW(16384);
      amt        BINARY_INTEGER := 16384;
      pos        INTEGER := 1;
      LF$FicOUT  UTL_FILE.FILE_TYPE ;
      LC$Msg     VARCHAR2(2000) ;
    BEGIN
    -- get the BLOB column --
    BEGIN
      EXECUTE IMMEDIATE PC$SQL_Order INTO src_lob ;
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        LC$Msg := 'Write_Binary_File(): NO_DATA_FOUND' ;
        IF PB$Raise THEN
          RAISE_APPLICATION_ERROR( -20100, LC$Msg ) ;
        END IF ;
        Dbms_Output.Put_Line(LC$Msg) ;
      RETURN ;
    END ;
    -- open the output file --
    LF$FicOUT := UTL_FILE.FOPEN( PC$Directory, PC$File_Name, 'W', 32764 ) ;
    -- write the file --
    LOOP
      -- read the chunks --
      Dbms_Lob.READ (src_lob, amt, pos, buffer);
      -- write the chunks --
      Utl_File.Put_Raw(LF$FicOut, buffer);
      pos := pos + amt;
    END LOOP;
    -- close the file --
    Utl_File.Fclose(LF$FicOut);
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        utl_file.fclose(LF$FicOut);
      WHEN OTHERS THEN
        LC$Msg := 'Write_Binary_File() Error : ' || TO_CHAR( SQLCODE ) || ' while managing file ('
    || PC$Directory || ') ' || PC$File_Name ;
        IF PB$Raise THEN
          RAISE_APPLICATION_ERROR( -20100, LC$Msg ) ;
        END IF ;
        Dbms_Output.Put_Line(LC$Msg);
    END Write_Binary_file;
    But this code seems not working. The problem is it always creates a file with a bit bigger size than initial one. So jpg copy will be never be opened with any viewer.
    Can anybody explain this issue and give any workaround?
    Thanks

    You need a code block like this:
    DECLARE
       l_file       UTL_FILE.FILE_TYPE;
       l_buffer     RAW (32767);
       l_amount     BINARY_INTEGER     := 32767;
       l_pos        INTEGER            := 1;
       l_blob       BLOB;
       l_blob_len   INTEGER;
    BEGIN
    -- Open the destination file. Note the third parameter "wb"
       l_file := UTL_FILE.FOPEN ('TEST_DIR', 'extract3.jpg', 'wb');
    -- Get LOB locator
    FOR rec IN (
    SELECT blob_col  l_blob
          FROM test_my_blob
       --AND ROWNUM =1
    LOOP
       l_blob_len := DBMS_LOB.getlength (rec.l_blob);
    -- Read chunks of the BLOB and write them to the file
    -- until complete.
       WHILE l_pos < l_blob_len
       LOOP
          DBMS_LOB.READ (rec.l_blob, l_amount, l_pos, l_buffer);
          UTL_FILE.put_raw (l_file, l_buffer, FALSE);
          l_pos := l_pos + l_amount;
       END LOOP;
      commit;
    END LOOP;
    -- Close the file.
       UTL_FILE.FCLOSE (l_file);
    EXCEPTION
       WHEN OTHERS
       THEN
    -- Close the file if something goes wrong.
          IF UTL_FILE.IS_OPEN (l_file)
          THEN
             UTL_FILE.FCLOSE (l_file);
          END IF;
          RAISE;
    END;

  • Make List of Values for Required Bind Variables

    In the SQL query for my View Object, I have a bind variable, which I set to "required". In the search form resulting from a View Criteria, a textbox shows up asking the user for the value of that variable. Is there a way to make it a List of Values instead?

    Hi WV,
    Create a transient attribute in your VO that contains the LOV and then set the value of your bind variable to point to this new transient attribute. Also here is another approach
    https://blogs.oracle.com/shay/entry/adf_query_with_parameters_and
    Let us know how it goes.
    -Juan Camilo

  • Forms.INS(72) No String value associated with this variable

    When I try to distribute my application I need to make sure that
    when my app installs it either adds or creates the environment
    variable Forms60_Path. This can be done in the project
    builder. When going through this one of the steps you have
    ability to add new environment variables. So I add on one named
    Forms60_Path with a value and contents of %PROD_HOME% and with
    the append set to yes.
    This now will give me either one or two errors when installing
    the application. The first error is that because i am choosing
    append set to yes it doesn't appear to be checking if the
    variable is already there or not. What it does do is give me a
    messages saying "A file not found while trying to translate
    Forms60_Path from '$Oracle' would u like to retry, ignore or
    process' I have choosen to process and the installer correctly
    adds the registry entry. That is a good thing but i still
    should not recieve an error when doing this it should check to
    see if the Reg entry is there if not then create it, if it is
    there then append to it. This only happens if you have append
    set to yes and the environment variable does not exist in the
    registry yet.
    The second error is more concerning because it just cancels out
    of the install all together. What it does no matter what under
    any circurmstance after you have added an environment variable
    in the delivery wizard is give u a message saying that
    "Form_Name.INS(72) No String Value associated with this
    variable" This error always comes up no matter what. After
    looking throught the INS file I took out the line
    "win32_register_map_variable(repl_var);" and I no longer
    recieved that error. My question is why do I get this error and
    what is the ramifications of taking this line out of the INS
    file?
    If no one else has had these problems I will be simply amazed!!!
    Thanks,
    Spencer Tabbert
    null

    Spencer,
    I am also getting the error you got months ago. (The second one: FORM.ins(72): No string value associated with this variable.) Can you tell me how you were able
    to fix it? I would appreciate it.
    I am new to Project Builder and pretty
    confused.
    Thanks,
    Monika

  • Assigning a Jython variable value to an ODI variable

    I have to implement database cursor functionality in ODI.
    For storing the returned values from database, I am using a Jython list.
    The next functionality that I have to implement is as follows:
    (i) For each value in the Jython list, I have to pass that value as a variable to an interface and then execute the interface
    (ii) Return back to the Jython list to get the next value in it
    (iii) Execute the interface for the new value from Jython list
    (iv) Have to execute the interface for as many values as in the list and stop when list is over.

    Hi,
    Thanks for your replies.
    I tried your method of using source as a query in procedure and using ODI startScen in the Target of the same procedure. But the scenario runs only once, and then stops even though the Source query returns 4 rows.
    Do we have to write Source and Target in separate steps of the procedure?
    Does ODI store the many records returned into some internal variables?
    I need to implement a cursor functionality so what is the best approach?
    Can i pass array variable value to some odi variables and do a loop?
    I used a workaround....it works but dont know if that's a good way of doing things:
    I retrieved all the different values that I need in a string by appending the values(this was done using Java loop).
    In my next step in the procedure I call a scenario(package which has some variables and my interface), which passes this long variable from Java as <@...@>
    Then in the package I use an iteration variable which is used to find out the SubString position so that I can extract the correct string to use for my Interface in the next step of the Package.
    It is working fine as of now.....but things could be made simpler if I could call the scenario in the Java loop, then I wouldn't need the iteration variable etc.

  • Assigning a node value from an XML variable to a String type  in Weblogic Process Integrator

    Hi,
    Is there any way to assign a node value from an XML variable to a String variable
    in Weblogic Process Integrator...
    Thanx.
    Narendra.

    Nerendra
    Are you talking about using Xpath on the XML document and assigning to a
    variable, it is unclear what you are asking
    Tony
    "Narendra" <[email protected]> wrote in message
    news:3bba1215$[email protected]..
    >
    Hi,
    Is there any way to assign a node value from an XML variable to a Stringvariable
    in Weblogic Process Integrator...
    Thanx.
    Narendra.

Maybe you are looking for