WebSphere Message Brokers
File: ac30470_
Writer: Catherine Tucker

Task topic

This build: July 31, 2007 21:20:16

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.
Related concepts
LocalEnvironment tree structure
Message flows overview
Related tasks
Designing a message flow
Creating destination lists
Defining message flow content
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:20:16

ac30470_ This topic's URL is: