Out of Java simple assignment to a Variable

Is it possible to have a variable in a package that is assigned a value returned by a call to the Java method so that I can use this variable across all interfaces in the package. Here's what I'd like to see (pseudocode)

-Beginning of package execution
-Java.util.UUID.randomUUID (m:System.NET.SocketAddress.ToString assing to variable 'UUID ()) '.
-Run interface 1
-#UUID in a field map
-Run interface 2
-card of the same value in a field #UUID
-Start to end run

Thank you
Michael

Yes it is possible. You must create an odi for this procedure. Inside of the odi procedure take technology java beanshell and write code like below.
<>
Java codes hoes here
String java_v = "Chantal".
Java codes hoes here
@>

Now drag this procedure in the odi package. Then, drag another odi odi package variable. Set mode assign the java variable to the odivariable as follows.
<@=java_v@>

Its done. Are you reeady to use variable odi everywhere wherever you need in a single package.

Chantal
http://dwteam.in

Tags: Business Intelligence

Similar Questions

  • Assignment of global variables

    I apologize if this is a fundamental and simple question, but I was pulling my hair out for the last week trying to get this working and Google becomes sick and tired of my questions to get answers.  This should not be so difficult, but I'm not a designer, not a programmer, I'm just a tech trying to make my life easier, then Yes, I brought it on me.

    I have converted an InDesign form that has a bunch of boxes in a document of LiveCycle.  I want the boxes when they are verified to assign a value to the variable assocated.  In the properties of the form, I've set up global variables and assign the value to '0 '.

    The box I put the method/property to change to have the following code:

    If (topmostSubform.Page1.Back_Cover.rawValue == 1)

    BC.value = 6300;

    on the other

    BC.value = 0;

    I have a textbox that I am taking all these values and based on what is checked and this is not it must calculate the total for this field.  Here is the code I have for the calculation of the value of text using the method/property to calculate:

    premium.rawValue = BC.value + IFC.value + IBC.value;  There are three check boxes associated with this value

    However, no matter what I do not values seem to are they assigned to the variable of BC.

    Can someone tell me please in common sense as to why it doesn't work?

    Thank you very much.

    Tom

    Hello

    I think Steve is right, you want to avoid using global (or form) variables in this case, particularly in the case of calculating as any change that value will not cause a recalculation.  I have also try and keep all the logic of calculation in one place.  So, in the case of calculating the premium field, I would put the following JavaScript code;

    this.rawValue = (Back_Cover.rawValue = 'On')? 6300: 0;

    this.rawValue += (Inside_Front_Cover.rawValue = 'On')? 5775: 0;

    this.rawValue += (Inside_Back_Cover.rawValue = 'On')? 5350: 0;

    Note that the power of your checkboxes values are the strings 'On' and 'Off '.

    Bruce.

    PS nice shape looking

  • Parameter IN or OUT to missing index: 1 using the variable date ODI.

    Hello

    I created the variable of data type date as EXTRACT_FROM_TS and also the default value for this.
    Now I use this variable as a filter in the source table in the design of the Interface as below...
    LAST_UPDATE_DATE > = #p_extract_from_ts where LAST_UPDATE_DATE is the field in the source database with date data type not null not forced...
    I have lkm hv used SQL for Oracle...

    Above variable refresh and interface scenario running one after another in ODI package...
    Variable gets refresh every time successfully, but Interface fails at the step of loading data... error message as below...


    ODI-1227: SrcSet0 (load) task fails on the source of ORACLE R12DEV connection.
    Caused by: java.sql.SQLException: parameter IN or OUT to missing index: 1
    + oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1890) +.


    If we remove the filter LAST_UPDATE_DATE > = #p_extract_from_ts, then it works well...

    I do not know why this error pops up on adding filter... Please help on this...


    Thank you
    Roshan Y

    Hello

    put a step DECLARATION above all. After that in my opinion, it is better to put a TO_CHAR().

    Try putting your variable in text mode and change your filter in

    TO_CHAR (LAST_UPDATE_DATE, 'YYYYMMDDHHMI') > = TO_CHAR(#PROJ.) P_EXTRACT_FROM_TS, "YYYYMMDDHHMI")

    In your operator if you click on the variable whose value you see?

  • java.sql.SQLException occurs in variable binding

    Hello.

    I use jdev11.1.5
    I had created a vo based on the following code
    select count(*) "var_count",aj_appl
          from appl_journals
    where 
    aj_status = :status and
    aj_appl = :ajappl or :ajappl is null
    group by aj_appl
    In this I am passing status, ajappl is a liaison status variable has an initial "n" variable
    When I try to run this vo in my browser component of business I get the error

    < font color = "red" > (java.sql.SQLException) parameter Missing or OUT to index: 1 < / make >

    How can I fix this error

    see the section * 5.10.1 how to add Variables to link to a view object definition *.
    http://download.Oracle.com/docs/CD/E12839_01/Web.1111/b31974/bcquerying.htm#CEGDGIJH

  • OSB: BEA-382510: OSB Assign action failed variable update

    Hi all

    I just started learning the OSB and created a simple process.

    It's my request:

    < soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
    < xmlns:soap soap: Header = "http://schemas.xmlsoap.org/soap/envelope/" >
    < / soap: Header >
    < soapenv:Body >
    < xmlns:hel hel: getGreeting = "http://hello.alsb.com/" >
    <!-in option: - >
    < arg0 > string < / arg0 >
    < / hel: getGreeting >
    < / soapenv:Body >
    < / soapenv:Envelope >
    ------------------------------------------------------------------------
    im getting an error in entitled response:

    < soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
    < soapenv:Body >
    < soapenv:Fault >
    soapenv:Server < faultcode > < / faultcode >
    < faultstring >
    BEA-382510: OSB Assign action doesn't have a variable update 'Test': weblogic.xml.query.exceptions.XQueryTypeException: {err} XP0006: ' the return element {{http://www.w3.org/2004/07/xpath-datatypes} untypedAny} ': bad value for a string of type {http://www.w3.org/2001/XMLSchema}
    < / faultstring >
    < detail >
    < con xmlns:con: fault = "http://www.bea.com/wli/sb/context" >
    < con: errorCode > BEA-382510 < / con: errorCode >
    < con: reason >
    OSB Assign action failed 'Test' for variable update: weblogic.xml.query.exceptions.XQueryTypeException: {err} XP0006: ' the return element {{http://www.w3.org/2004/07/xpath-datatypes} untypedAny} ': bad value for a string of type {http://www.w3.org/2001/XMLSchema}
    < / con: reason >
    < con: location >
    < con: node > RouteTo_HelloWorldBiz < / con: node >
    pipeline response - < con: path > < / con: path >
    < / con: location >
    < / con: fault >
    < / details >
    < / soapenv:Fault >
    < / soapenv:Body >
    < / soapenv:Envelope >

    -----------------------

    It's my Xquery:

    XQuery version "1.0" encoding "Cp1252";

    declare namespace xf = "http://tempuri.org/GoodbyeWorld_SB/XQuery/Hello_to_GoodBye/";

    declare function xf:Hello_to_GoodBye($helloStr_as_xs:string)
    as XS: String {}
    Replace ($helloStr, 'HELLO', 'goodbye')
    };

    declare the variable $helloStr as XS: String external;

    XF:Hello_to_GoodBye ($helloStr)

    ------------------------------------------------

    in my message response service proxy pipeln:

    I added the entitlement and taking into account the expression: $body / hel: getGreetingResponse / return
    var: Test

    After the entitlement: I gave an alternative activity:

    XPath: ./hel:getgreetingresponse/return

    varabile: body

    Expression: string ($Test)


    When I test it in the console of the OSB:

    im getting this error:

    < soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
    < soapenv:Body >
    < soapenv:Fault >
    soapenv:Server < faultcode > < / faultcode >
    < faultstring >
    BEA-382510: OSB Assign action doesn't have a variable update 'Test': weblogic.xml.query.exceptions.XQueryTypeException: {err} XP0006: ' the return element {{http://www.w3.org/2004/07/xpath-datatypes} untypedAny} ': bad value for a string of type {http://www.w3.org/2001/XMLSchema}
    < / faultstring >
    < detail >
    < con xmlns:con: fault = "http://www.bea.com/wli/sb/context" >
    < con: errorCode > BEA-382510 < / con: errorCode >
    < con: reason >
    OSB Assign action failed 'Test' for variable update: weblogic.xml.query.exceptions.XQueryTypeException: {err} XP0006: ' the return element {{http://www.w3.org/2004/07/xpath-datatypes} untypedAny} ': bad value for a string of type {http://www.w3.org/2001/XMLSchema}
    < / con: reason >
    < con: location >
    < con: node > RouteTo_HelloWorldBiz < / con: node >
    pipeline response - < con: path > < / con: path >
    < / con: location >
    < / con: fault >
    < / details >
    < / soapenv:Fault >
    < / soapenv:Body >
    < / soapenv:Envelope >


    Ttout suggestions on where is the problem.

    IM completely stuck here:

    TIA,
    knockaert

    It is not clear at what point you call Hello_to_GoodBye and using what argument

    in any case, it is likely that you pass an Xml (a knot, something like Charlie) element instead of a simple type (a string like 'Charlie')

    You must use the data($body/bla) function or the text ($body/bla/text () to retrieve the value (Charlie) of your item

  • Simple form (text input variables problem) GET

    I'm trying to move some info to flash to another page, it should be very simple.

    All I have is an input text field and a button, the input text has the instance name search_txt

    I have this code on the button

    on (click) {;}
    searchText = search_txt
    searchON = 'OK '.
    getURL ("search.php", "_self", "GET");
    }

    the searchON is just a variable I need for the php - and that works very well
    but for searchText I get searchText = undefined

    so I think I should do something as defined as a variable, where and how do I do this?

    what I'm after is search.php? searchText = everything that was in the text entry field& theRestOfTheStuff

    Thanks for any help

    You shouldn't have VARs with the same name as an instances of the object, guess that's the reason for the strange things in your last post.
    I deleted the var assigned to the textfield and allows
    searchText = _root.search_txt.text;
    He gets the text in the TextField. You can check this with a trace:

    on {(click)
    trace (_root.search_txt. (Text);
    searchText = _root.search_txt.text;
    searchON = 'OK '.
    getURL ("search.php", "_self", "GET");
    }

    However, he has not opened a new site during the test... Another reason why I never use components, their just strange behavior too often. I recommend using the standard buttons or MCs with the onRelease event, if you do not need special visual style that provide the components button.

    see you soon,
    blemmo

  • New update knocked out my java from sun on vista.

    After logon has noticed a new update was available for my Vista, downloaded and it disabled my sun java. No website would not display same MSN. I went to the control panel and deleted the new update, rebooted the pc and now works fine. It took a long time to figure out how to get sun java installed on vista and it finally got on this pc. Please correct. I know that all of the updates are very important for all computers, but I really need to use my java.

    Thank you

    Vahallah

    Hi Vahallah,

    Update when it is installed has caused Sun Java to stop working (check the number of KB)?

    As you know that all updates that are released by Microsoft are important for your computer I suggest you to download and install the update.

    If you meet him same problem of Java does not I suggest you uninstall Java completely from your computer by using the Windows Cleanup utility and download and install the latest version of Java from the link provided.

    Windows Cleanup link utility

    http://download.Microsoft.com/download/e/9/d/e9d80355-7ab4-45b8-80e8983a48d5e1bd/msicuu2.exe

    Download the utility, install it and then run and uninstall Java from the machine.

    Once you have uninstalled Java completely from the computer, download the latest version from the link below.

    http://www.Java.com/en/download/Inc/windows_new_ie.jsp

    Hope this information is useful.

    Amrita M

    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Why the operator: = is not working when it is in a string concatenated and assigned to a variable?

    I met with an error ORA-00904: "V_DEPTNO": online: 14 (My PL/SQL code is below), while playing with the cursor of reference (for the end of the apprenticeship).
    I debugged it and the problem was solved and it returns the desired output.  However, the solution of it is not sensible for me even if the output
    has been posted/successfully recovered.    Here's a clearer description of the code:


    On line 14, I have a variable called stmt and stmt value concatenated with the string "where deptno =: v_deptno' and then finally assigned to this stmt variable."

    In this line, he returned ORA-00904 but it was fixed by using =: operator instead of the = operator.

     stmt:=stmt || 'where deptno=:v_deptno'; 
    

    In sql pure when it is intended to add where clause for such purpose, the = comparison operator is used.
    Example:

    Select empno,ename,sal from emp where deptno=10;
    

    But in my pl/sql code, =: operator was used.

    Why is this? Can someone explain what it is? Even if I did my research, but I couldn't find the explanation yet.

    All what I've understood so far, is that this may mean the following (I may be wrong):
    1 - everything first, assign the value 10, of v_deptno, who was declared, to easily compare.
    2. compare the value assigned with deptno.
    On this basis, recover data.


    Thus, he worked as a = + tour operator defined in another high programming language such as c#... etc.
    Example:

    int a = 0;
    
    a =+ 1;    //  a was declared as an integer that has value 0
            // then  we tried to increment by 1 or add by one
             // so it would be  a=a+1;  
                    //which is  a=0+1;
    

    It works the same?

    Here's my complete code pl/sql, just in case...

    --ref cursor
    declare 
    
    type emp_refcur  is ref cursor;
    emp_cv emp_refcur;
    emprec emp%rowtype;
    stmt varchar2(299):= 'select * from emp';
    v_deptno number:=10;
    
    begin
    
    if v_deptno is null then
      open emp_cv for stmt;
    
    else
      stmt:= stmt || ' where deptno=:v_deptno';
      open emp_cv for stmt using v_deptno;
    end if;
    
    loop
    fetch emp_cv into emprec;
    exit when emp_cv%notfound;
    dbms_output.put_line(emprec.empno||chr(9)||emprec.ename||chr(9)||emprec.deptno);
    end loop;
    close emp_cv;
    end;
    /
    
    
    
    
    
    
    
    

    I would you to explain and share with me something to read or give me some clues.

    Thanks in advance!

    In this line, he returned ORA-00904 but it was fixed by using =: operator instead of the = operator.

    There is no "=:" operator.

    The colon character ': ' is used to define a binding (placeholder) variable in the query string.

    The value of this variable must be passed ("linked") after analysis and run step so that the query is executed correctly. That's what the USING clause in your code.

    Thus, he worked as a = + tour operator defined in another high programming language such as c#... etc.

    Example:

    1. int a = 0;
    2. a = + 1;    one has been declared as an integer that is set to 0
    3. then we tried to increment by 1 or add one
    4. so it would be a = a + 1;
    5. which is a = 0 + 1;

    It works the same?

    No, nothing to do with it.

  • A query for the IP address and assign value to variable

    I'm working on information from our host and put in a spreadsheet.

    I can get the value of this way:

    $network = $esxi | Get-VMHostNetworkAdapter-name vmk0

    $WorkSheet

    . cells.item(16777216) (11,$i( )

    = $network.ip

    But is there a way to get the IP assigned in one order without having to be defined first in a variable and then referencing .ip?

    You can combine your code with a single command, as follows:

    $WorkSheet.cells.item(11,$i) = ($esxi | Get-VMHostNetworkAdapter -name vmk0).ip
    
  • read XML in BPEL and assign values to variables

    Hello

    I need to read an xml message in BPEL and assign variables created in the BPEL XML message elements values. What is the best way to do it.

    When you say "' * read an xml message *", the XML comes as input message or you need read the file? "

    If you want to read the file, you can make use of the slot feature.

    Returns the string value of an element defined by lookupXPath in an XML (docURL) given its parent XPath (parentXPath), the XPath (keyXPath) key, and the value of the key (key). Usage: oraext:lookup - xml (docURL as string, parentXPath as string, keyXPath as string, lookupXPath as string, key as String)

    Example: oraext:lookup - xml ("file: / d:/country_data.xml ',' / country/Country ', 'Short', 'FullName', 'UK'") returns the value of the FullName child/country / countries where abbreviation = "UK" in the d:\country_data.xml file

    Thank you
    Vijay

  • How can I assign a primitive variable by reference?

    If a variable assignment is complex, it is always by reference

    var a: Sprite = new Sprite()

    var b:Sprite

    b = a

    changing any property of b (e.g.width) will change one

    var s:Number = 3

    var t:Number

    t = s / / t will be 3

    t = 32 / / s will be unchanged

    THEN

    How can I

    assign t so that it makes reference to s?

    OR (this would also)

    assigns a parameter in a reference function?

    Graham

    use a vector or an array:

    var a: Vector. = new Vector. (1);

    a [0] = 1;

    var b:Vector. = a;

    trace (b [0]);

    a [0] = 3;

    trace (b [0])

  • Assign the substitution variable to another variable of substitution with truncation of value

    I launch sql * more script .sql through a competitor job. Simultaneous work provides date a parameter to the script.  Task log displays the date passed to scrpit as:

    Arguments

    ------------

    2013/09/01 00:00:00

    For aesthetic purposes in the position of the output, I want to convert/truncate the string in a format for the end user of the 09/01/2013.

    Try to simply change a variable substitution

    (below does not work, but we hope to Telegraph my intention):

    Undefine Low_date
    Set Low_date = ' 2013-09-01 00:00:00 '
    Undefine Low_date_10
    Set Low_date_10 = "yyyy-mm-ds."

    Select substr ('& Low_Date', 1, 10) in & double Low_date_10;

    Guest of "value of the Variable is: & Low_date_10.
    /

    WHICH PRODUCES:

    old: select substr ('& Low_Date', 1, 10) in & double Low_date_10
    New: select substr ("2013-09-01 00:00:00 ', 1, 10") in yyyy-mm-double ds

    Error from the 8 in the command line:
    Select substr ("2013-09-01 00:00:00 ', 1, 10") in yyyy-mm-double ds
    Error in the command line column: 8:55
    Error report:
    SQL error: ORA-00905: lack of keyword
    00905 00000 - 'lack the key word'
    * Cause:
    * Action:
    old: prompt "value of the Variable is: & Low_date_10.
    New: prompt "value of the Variable is: yyyy-mm-ds."
    "Value of the variable is: yyyy-mm-dd"

    "I need to get to" value of the Variable is: 01/09/2013.

    Hello

    SELECT... IN works in PL/SQL.

    In SQL * Plus, you can use the COLUMN... New_value, like this:

    SET low_date = ' 2013-09-01 00:00:00 '

    COLUMN low_date_10_col new_value by low_date_10

    SELECT REPLACE (SUBSTR ('& Low_Date', 1, 10))
    , '-'
    , '/'
    ) AS low_date_10_col
    DOUBLE;

    Value of the PROMPT Variable is: & Low_date_10

  • Simple matter of coding: variable added to a string

    I can't understand what is the syntax for this in Actionscript. Basically I have a variable that I want to add in a chain that will appeal to a certain group based on the selection of the language of the user. Then...

    var currentPage:int; < < that updates dynamically when nextPage, previousPage, etc. are called

    If (currentLanguage == 'English') {}

    myMovie.gotoAndStop ("English %n", currentPage);

    }


    ElseIf (currentLanguage == 'Spanish') {}

    myMovie.gotoAndStop ('%n in Spanish', currentPage);

    }

    Then each image of myMovie will be called "French1" "English.2" "Spanish2" "Espagnol1" etc., in correlation with the page numbers.

    Is this possible in Actionscript 3.0?

    Thank you!

    you don't know.  You can use a variable in place of the image tag or stage name.  from your code, you use a variable stage name instead.  It should work (if you use scenes).

    If you want to go to frame label French1, when currentPage 1, you must use:

    myMovie.gotoAndStop ("english" + currentPage, possiblescenenamehere);

    and because I don't think you use scenes, simply use:

    myMovie.gotoAndStop ("english" + currentPage);

    or better yet:

    var currentPage:int;  defined somewhere;

    var language: String;  defined somewhere;

    myMovie.gotoAndStop (language + currentPage);

  • 30EA1: 100% of the CPU out of Java Heap space

    Hello

    Just my initial 20 minute eval of the new 3.0 and already had 2 blocks on my XP and 10g DB; 1 open the tasks view (keeps looking for the tasks of the application, with progress bar), the other on the opening of the generator queries tab (maintains loading of available objects and relations with hourglass). No exception in the debug console to run out of space for the heap.

    Hope that these get reviewed and debugged before production.
    K.

    K-

    Indeed, it does. Thanks for your help this stalking. Finally, there are a few things going on here.

    1. you don't have to open a connection. Just launching Developer SQL and opening view tasks will do the same.
    2 an indexer view tasks should not be what she does.
    3. the option tasks should not be at all in the view menu.

    These are addressed.

    FYI: I could be wrong, but since terrils you sent, it looks like you are running with a space for the very low max 200 MB (Xmx) heap. I ran with 512 and used almost all of it at some point, there been no errors. (As far as I know the default is 640 MB [ide/bin/ide.conf], or at least was - I'll download the actual EA & verify.)

    Brian Jeffries
    SQL development team

  • For loop Query - by assigning values to Variables

    I have the following code slot in my flash file...

    Q2A random + (10) = 1;
    Q2B random + (10) = 1;
    years2 = q2a + q2b;

    I have 18 thing similar to this in my file, where it basically... increments q3a etc. Y at - it a simple way of creating a loop that will iterate through all of them? I could not the syntax just when I tried it myself.

    :

Maybe you are looking for