WebSphere Message Brokers
File: ac16860_
Writer: Bill Oppenheimer

Task topic

This build: July 31, 2007 21:18:44

Accessing the LocalEnvironment tree

The LocalEnvironment tree has its own correlation name, LocalEnvironment, and you must use this name in all ESQL statements that refer to or set the content of this tree.

The LocalEnvironment tree is used by the broker, and you can refer to and modify this information. You can also extend the tree to contain information that you create yourself. You can create subtrees within this tree that you can use as a scratchpad or working area.

The message flow sets up information in two subtrees, Destination and WrittenDestination, below the LocalEnvironment root. You can refer to the content of both of these, and you can write to them to influence the way in which the message flow processes your message. However, if you write to these areas, ensure that you follow the defined structure to ensure that the tree remains valid.

If you want the LocalEnvironment tree to be included in the output message that is propagated by the Compute node, you must set the Compute node property Compute mode to a value that includes LocalEnvironment (for example, All). If you do not, the LocalEnvironment tree is not copied to the output message.

The information that you insert into DestinationData or Defaults depends on the characteristic of the corresponding node property:

If necessary, configure the sending node to indicate where the destination information is. For example, for the output node MQOutput, set Destination Mode:

To find more information about ESQL procedures that perform typical updates to the LocalEnvironment see Populating Destination in the LocalEnvironment tree. Review the ESQL statements in these procedures to see how to modify LocalEnvironment. You can use these procedures unchanged, or modify them for your own requirements.

To find more information about how to extend the contents of this tree for your own purposes see Using scratchpad areas in LocalEnvironment.

For another example of how you can use LocalEnvironment to modify the behavior of a message flow, refer to the XML_PassengerQuery message flow in the following sample program: The Compute node in this message flow writes a list of destinations in the RouterList subtree of Destination that are used as labels by a later RouteToLabel node that propagates the message to the corresponding Label node. You can view samples only when you use the information center that is integrated with the Message Brokers Toolkit.
Related concepts
Message flows overview
LocalEnvironment tree structure
ESQL overview
Related tasks
Designing a message flow
Creating destination lists
Defining message flow content
Managing ESQL files
Related reference
Compute node
HTTPRequest node
MQeOutput node
MQOutput node
RouteToLabel node
Data types for elements in the DestinationData subtree
Notices | Trademarks | Downloads | Library | Support | Feedback

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

ac16860_ This topic's URL is: