Updating the local environment with a .NETCompute node
The local environment tree is part of the logical message tree where you can store information while the message flow processes the message.
About this task
public override void Evaluate(NBMessageAssembly inputAssembly)
{
NBOutputTerminal outTerminal = OutputTerminal("Out");
// This code creates an output Assembly based on the input Assembly
// The Local Environment is copied and editted to provide a dynamic override for the MQOutput node
NBMessage inputLocalEnvironment = inputAssembly.LocalEnvironment;
NBMessage outputLocalEnvironment = new NBMessage(inputLocalEnvironment);
NBElement mqLE = outputLocalEnvironment.RootElement.CreateFirstChild(null, "Destination").CreateFirstChild(null, "MQ");
mqLE.CreateFirstChild(null, "DestinationData").CreateFirstChild(null, "queueName", "DOTNET.OUT");
NBMessageAssembly outAssembly = new NBMessageAssembly(inputAssembly, inputAssembly.Message, outputLocalEnvironment, inputAssembly.ExceptionList);
outTerminal.Propagate(outAssembly);
}
For information about the .NET classes and methods that are supported in IBM® App Connect Enterprise, see the .NET API documentation.