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

Environment tree structure

The environment tree is a part of the logical message tree in which you can store information while the message passes through the message flow.

The root of the environment tree is called Environment. This tree is always present in the input message; an empty environment tree is created when a message is received and parsed by the input node. You can use this tree as you choose, and create both its content and structure.

IBM® Integration Bus uses fields in the Environment tree in only two situations. (Contrast this with the Local environment tree structure, which the broker uses in many situations):

The environment tree differs from the local environment tree in that a single instance of it is maintained throughout the message flow. If you include a Compute node, a Mapping node, or a JavaCompute node in your message flow, you do not have to specify whether you want the environment tree to be included in the output message. The environment tree is included automatically, and the entire contents of the input environment tree are retained in the output environment tree, subject to any modifications that you make in the node. Any changes that you make are available to subsequent nodes in the message flow, and to previous nodes if the message flows back (for example, to a FlowOrder or TryCatch node).

If you want to create your own information, create it in the environment tree in a subtree called Variables.

The following figure shown an example of an environment tree:

An Environment tree, with a Variables subtree that contains five children. The fifth child also contains children.

You could use the following ESQL statements to create the content shown above.

SET Environment.Variables = 
      ROW('granary' AS bread, 'riesling' AS wine, 'stilton' AS cheese);
SET Environment.Variables.Colors[] = 
      LIST{'yellow', 'green', 'blue', 'red', 'black'};
SET Environment.Variables.Country[] = LIST{ROW('UK' AS name, 'pound' AS currency),
   	 ROW('USA' AS name, 'dollar' AS currency)};

When the message flow processing is complete, the Environment tree is discarded.


ac12620_.htm | Last updated Friday, 21 July 2017