Use the Compute node to copy part of an input message to an output message. The results of such a copy depend on the type of input and output parsers involved.
Where both the source and target messages have the same folder structure at root level, a like-parser-copy is performed. For example:
SET OutputRoot.MQMD = InputRoot.MQMD;
copies all the children in the MQMD folder of the input message to the MQMD folder of the output message.
Another example of a tree structure that supports a like-parser-copy is:
SET OutputRoot.XMLNS.Data.Account = InputRoot.XMLNS.Customer.Bank.Data;
If both input and output messages are not in the MRM domain, you must use the Compute node and specify the structure of the messages yourself.
Where the source and target messages have different folder structures at root level, you cannot make an exact copy of the message source. Instead, the unlike-parser-copy views the source message as a set of nested folders terminated by a leaf name-value pair. For example, copying the following message from XML to MRM:
<Name3><Name31>Value31</Name31>Value32</Name3>
produces a name element Name3, and a name-value element called Name31 with the value Value31. The second XML pcdata (Value32) cannot be represented and is discarded.
The unlike-parser-copy scans the source tree, and copies folders, also known as name elements, and leaf name-value pairs. Everything else, including elements flagged as special by the source parser, is not copied.
An example of a tree structure resulting in an unlike-parser-copy is:
SET OutputRoot.MRM.Data.Account = InputRoot.XMLNS.Data.Account;
If the algorithm used to make an unlike-parser-copy does not suit your tree structure, you might need to further qualify the source field to restrict the amount of tree copied.
Be careful when you copy information from input messages to output messages in different domains. It is possible to code ESQL that creates a message structure or content that is not completely consistent with the rules of the parser that will process the output message. This can result in an output message not being created, or being created with unexpected content. If you believe that the output message generated by a particular message flow does not contain the correct content, or have the expected form, check the ESQL that creates the output message, and look for potential mismatches of structure, field types, field names, and field values.
-- Copy message to the output, moving from XMLNS to MRM domains SET OutputRoot.MRM = InputRoot.XMLNS; -- Set the CWF format for output by the MRM domain SET OutputRoot.Properties.MessageType = '<MessageTypeName>'; SET OutputRoot.Properties.MessageSet = '<MessageSetName>'; SET OutputRoot.Properties.MessageFormat = 'CWF';