WebSphere Message Brokers
File: ar25245_
Writer: Cerys Giddings

Concept topic

This build: July 31, 2007 21:36:17

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.
  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 message domain

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 determined by the Message Domain property of the message set. For example, when a message set is first created, the default message domain is MRM. Therefore, the Mapping node generates ESQL with the following format:
SET OutputRoot.MRM.Fielda...
If you change the runtime parser to XMLNSC, for example, the Mapping node generates ESQL with the following format:
SET OutputRoot.XMLNSC.MessageA.FieldA...
The parser of the source message is determined by the contents of the MQRFH2 header or by the properties of the input node. The Mapping node generates a target message with a parser that matches the message domain of the message set. The Mapping node supports the following message domains:
  • MRM
  • XMLNSC
  • XMLNS
  • MIME
  • JMSMap
  • JMSStream
  • XML
To change the message domain property of your message set:
  1. Open the message set file messageset.mset.
  2. Change the Message Domain property to a supported domain.
  3. Save your message set, and save any message flows and message maps that reference your message set, if they have not already been saved. Saving these files generates updated ESQL for mapping the changed message set.
    If you have made no updates to your flows or message maps after changing the message domain of your message set, you must clean the related message flow projects so that updated ESQL code can be generated:
    1. Select a project and click Project > Clean Project.
    2. Select Clean all projects or Clean selected projects.
    3. Click OK.
  4. Deploy the changed message set.
  5. Deploy the message flow that contains the mappings, and test your ESQL in a Compute node and in other nodes to ensure that the message flow still functions as expected.

Override the database schema name

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

Map batch messages

You can configure a message mapping that sorts, orders, and splits the components of a multipart message into a series of batch messages. These components can be messages or objects, and they can have different formats; in this 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 using 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 the required functionality by calling an ESQL function or procedure. The following restrictions apply:
  • Mixed content fields cannot be mapped.
  • Exceptions cannot be thrown directly in mapping nodes.
  • Self-defined elements cannot be manipulated in mapping nodes (support for wildcards is limited if the wildcards represent embedded messages).
  • The Environment tree cannot be manipulated in the Mapping node.
  • User variables cannot be defined or 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
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:36:17

ar25245_ This topic's URL is: