Message mapping tips and restrictions

These tips assume that you have created a mapping node within the message flow, opened the Message Mapping editor, and selected both a source and a target message:

Source is a list and target is a list from source but with a new entry at the top of the list

  1. Expand the target to display the element for which you want to create a new first instance. This might be a structure or a simple element.
  2. Right-click the element and click If. A condition line appears immediately below.
  3. Right-click the element and click Copy. Move to the condition line and click Paste. There are now two entries in the spreadsheet for your element.
  4. Set the first of these entries to values of your choice. This is the first instance.
  5. Right-click the second entry and click For. A for line appears in the spreadsheet.
  6. Set the second entry to the value or values mapped from the source.
  7. Set the for entry to the looping condition.
  8. Click for, then drag the source field that represents the loop condition to the Expression editor.

Change the target runtime parser

When you first create a mapping, you nominate a message set for the target message. The parser that is associated with the output message is the runtime parser that is associated with the message set. For example, when a message set is first created, the default runtime parser is MRM. This means that the Mapping node generates ESQL with the following format:
SET OutputRoot.MRM.Fielda...
If you change the runtime parser to XML or XMLNSC for example, the Mapping node generates ESQL with the following format:
SET OutputRoot.XMLNSC...
The source message's parser is determined by the MQRFH2 header or the input node. The Mapping node can handle all parsers on input. The Mapping node generates a target message with a parser that matches the runtime parser of the message set.
  1. Open the message set file messageset.mset.
  2. Change the runtime parser to a value of your choice, and save the message flow project or projects, referencing this message set for mapping purposes.
  3. If you changed the parser to MRM, deploy the message set.
  4. Deploy the message flow that contains the mappings and test your ESQL in a Compute node and other nodes to ensure that they still function as expected.

Override the database schema name

To change the database schema name that is generated in ESQL, use the Override RDB schema wizard in the Specify Runtime Schema dialog box, The default is the schema name of the database definitions that are imported into the Message Brokers Toolkit. Use this dialog box to change the value.

Map batch messages

You can configure a message mapping that sorts, orders and splits the components in a multipart message into a series of batch messages. These components can be messages or objects and they can have different formats. If this is the case, each component is converted and the message is reassembled before being forwarded.
  1. Use a RouteToLabel node in the message flow to receive multipart messages as input.

    The RouteToLabel node is the next node in sequence after the Mapping node, and causes the flow to jump automatically to the specified label. You can specify a single RouteToLabel value in a splitting map, for all maps that output a message assembly. You can also use conditions to set the RouteToLabel value depending on the values in the source message.

  2. Use the Message Mapping editor to build maps that transform and propagate batch messages in a single node, without having to define an intermediate data structure.

Multipart messages can also contain repeating embedded messages, where each repeated instance of a message is propagated separately. Embedded messages must be from the same message set as the parent message.

Mapping restrictions

Unless stated explicitly, you can achieve required functionality by calling an ESQL function or procedure. Here are some restrictions:
  • Mixed content fields cannot be mapped.
  • Exceptions cannot be thrown directly in mapping nodes.
  • Self-defined elements cannot be manipulated in mapping nodes (there is limited support for wildcards when the wildcards represent embedded messages).
  • The Environment tree cannot be manipulated in the Mapping node.
  • User variables cannot be defined and set.
  • CASE expressions cannot be emulated; you must use if/else.
  • Trees cannot be copied from input to output in order to modify elements within the copied tree. For example, the following ESQL cannot be modeled in a Mapping node:
    SET OutputRoot.MQMD = InputRoot.MQMD; SET OutputRoot.MQMD.ReplyToQ = 'NEW.QUEUE';
    You must set each field in the structure individually if you intend to modify one or more sibling fields.
Related concepts
Message Mapping editor
MRM parser and domain
XML parsers and domains
Related tasks
Developing ESQL
Related reference
Mapping node
Compute node
RouteToLabel node
Message mappings