IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Updating the local environment with the JavaCompute node

The local environment tree is part of the logical message tree in which you can store information while the message flow processes the message.

The following information shows how to update the local environment:

  1. Make a new copy of the local environment to update it. Use the full version of the copy constructor to create a new MbMessageAssembly object, as shown in the following example:
    MbMessage env = assembly.getLocalEnvironment();
    MbMessage newEnv = new MbMessage(env);
    
    newEnv.getRootElement().createElementAsFirstChild(
    		MbElement.TYPE_NAME_VALUE,
    		"Status",
    		"Success");
    
    MbMessageAssembly outAssembly = new MbMessageAssembly(
    		assembly,
    		newEnv,
    		assembly.getExceptionList(),
    		assembly.getMessage());
    
    getOutputTerminal("out").propagate(outAssembly);
  2. Edit the copy to update the local environment.

ac30470_.htm | Last updated Friday, 21 July 2017