The LocalEnvironment tree includes a subtree called Variables. This is always created, but is never populated by the message flow. Use this area for your own purposes, for example to pass information from one node to another. You can create other subtrees in the LocalEnvironment tree if you choose.
The advantage of
creating your own data in a scratchpad in the LocalEnvironment is that this
data can be propagated as part of the logical tree to subsequent nodes in
the message flow. If you create a new output message in a Compute node, you
can also include all or part of the LocalEnvironment tree from the input message
in the new output message.
To ensure that the information
in the LocalEnvironment is propagated further down the flow, the Compute mode property of the Compute
node must be set to include LocalEnvironment as part of the output tree (for
example, specify LocalEnvironment
and Message). See Setting the mode for
further details about Compute mode.
However, any data updates or additions that you make in one node are not retained if the message flows backwards through the message flow (for example, if an exception is thrown). If you create your own data, and want that data to be preserved throughout the message flow, you must use the Environment tree.
You can set values in the Variables subtree in a Compute node that are used later by another node (Compute, Database, or Filter) for some purpose that you determine when you configure the message flow.
Because LocalEnvironment
is not in scope in a Compute node, InputLocalEnvironment and OutputLocalEnvironment must
be used instead.
SET OutputLocalEnvironment.Variables.OutputLocation = 'MQ';
IF InputLocalEnvironment.Variables.OutputLocation = 'MQ' THEN SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueManagerName = 'myQManagerName'; SET OutputLocalEnvironment.Destination.MQ.DestinationData.queueName = 'myQueueName'; END IF;
In the example queueManagerName and queueName are
set for the Destination subtree in the output message. The Compute
mode of the second compute node must be set to include the LocalEnvironment
tree in the output message. Configure the MQOutput node to use the destination
list that you have created in the LocalEnvironment tree by setting property Destination Mode to Destination
List.
For information about the full list of elements in the DestinationData subtree, see Data types for elements in the DestinationData subtree.
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ac16870_ |