Author |
Message
|
tom_hanks |
Posted: Wed May 31, 2006 1:07 am Post subject: Need to pass variables from ESQL node to Java node. |
|
|
Apprentice
Joined: 19 May 2006 Posts: 32
|
Hai all,
How can i pass variables from ESQL node to Java node.
thanks
Tom |
|
Back to top |
|
 |
sourdas2 |
Posted: Wed May 31, 2006 1:43 am Post subject: |
|
|
 Voyager
Joined: 21 Apr 2006 Posts: 90 Location: Kolkata,India
|
Hi tom,
Which types of variable are u talking about? You can only pass localenvironment,environment variable from node to node.. _________________ Thanks and Warm Regards
Sourav |
|
Back to top |
|
 |
tom_hanks |
Posted: Wed May 31, 2006 1:50 am Post subject: |
|
|
Apprentice
Joined: 19 May 2006 Posts: 32
|
Hai Sourdas2,
I have some string variable in Compute Node.
Now i want to use that in Java Compute node.
hope you got it?
thanks
Tom |
|
Back to top |
|
 |
wschutz |
Posted: Wed May 31, 2006 2:15 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Okay, in the esql node, put that string variable into the LocalEnvironment tree and then you can access that from the java compute node. _________________ -wayne |
|
Back to top |
|
 |
tom_hanks |
Posted: Wed May 31, 2006 2:25 am Post subject: |
|
|
Apprentice
Joined: 19 May 2006 Posts: 32
|
Okey wschutz,
In ESQL i coded like this.
Code: |
SET OutputLocalEnvironment.var1 = 'tom@abcd.COM'; |
How can i read var1 from java node.
thanks.
Tom |
|
Back to top |
|
 |
sourdas2 |
Posted: Wed May 31, 2006 2:34 am Post subject: |
|
|
 Voyager
Joined: 21 Apr 2006 Posts: 90 Location: Kolkata,India
|
Set the string in environment variable in ESQL node..
Access it from Java compute node. If it is local environment variable then..
Code: |
MbMessage env = assembly.getLocalEnvironment();
MbMessage newEnv = new MbMessage(env);
--- do processing here
MbMessageAssembly outAssembly = new MbMessageAssembly(
assembly,
newEnv,
assembly.getGlobalEnvironment(),
assembly.getExceptionList(),
assembly.getMessage());
getOutputTerminal("out").propagate(outAssembly); |
If it is a global environment do ..
Code: |
MbMessage env = assembly.getGlobalEnvironment(); |
_________________ Thanks and Warm Regards
Sourav |
|
Back to top |
|
 |
wschutz |
Posted: Wed May 31, 2006 2:36 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
do a search in the broker's info center for "getLocalEnvironment", there's several pages of info that should be helpful. _________________ -wayne |
|
Back to top |
|
 |
tom_hanks |
Posted: Thu Jun 01, 2006 4:29 am Post subject: |
|
|
Apprentice
Joined: 19 May 2006 Posts: 32
|
thanks wayne and sourdas.
Now i am able to use variables across nodes.
thanks a lot.
-Tom |
|
Back to top |
|
 |
|