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


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.

About this task

The following information shows how to update the local environment:

Procedure

  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 2015-03-27 19:25:41