In our flow we are setting the following variables and then trying to access these variables in Java compute node that is the next node...
CREATE FILTER MODULE SchedulerInit_StoreRequest
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- Define JSON domain in Global Environment
CREATE LASTCHILD OF Environment.Variables DOMAIN('JSON') TYPE Name NAME 'schedulerMessage';
-- Save the entire incoming request message
SET Environment.Variables.schedulerMessage = Root.JSON.Data;
-- continue normal processing
RETURN TRUE;
END;
END MODULE;
In the Java compute node
MbMessage globalenv = inAssembly.getGlobalEnvironment() ;
MbElement envVariables = globalenv.getRootElement().getFirstChild();
System.out.println("Element name is "+envVariables.getName()); -- prints "Element name is Variables"
But when I try to get this "Environment.Variables.schedulerMessage"
System.out.println("Element is "+envVariables.getFirstChild());
using the following it prints "Element is null" it should be schedulerMessage
I am not sure what am I missing here... it is quite annoying....
Can some one please point out the issue here...
Thanks in advance for the answer :-)
------------------------------
Kareem Qureshi
------------------------------