Updating the Global Environment with the JavaCompute node
The Global Environment tree is always created when the logical tree is created for an input message. However, the message flow neither populates it nor uses its contents. You can use this tree for your own purposes, for example to pass information from one node to another. You can use the whole tree as a scratchpad or working area.
About this task
The Global Environment can be altered across the message flow, therefore do not make a copy
of it to alter. The following Java™ code
shows how to alter the Global Environment:
MbMessage env = assembly.getGlobalEnvironment();
env.getRootElement().createElementAsFirstChild(MbElement.TYPE_NAME_VALUE, "Status", "Success");
getOutputTerminal("out").propagate(assembly);