This topic describes how you can determine the path that a message takes through the message flow using the RouteToLabel and Label nodes.
These nodes provide a more flexible way to process messages than the Filter node, which depends on the Boolean result of an ESQL expression for its logic.
When you use RouteToLabel and Label nodes, you must include a Compute node that determines, using some combination of message content, database content, and ESQL logic, how messages are to be processed next. Configure the Compute node to create a destination list (within the DestinationList folder in the LocalEnvironment subtree) that contains the destination for each message, specified as the LabelName of a Label node. The Compute node passes the message to the RouteToLabel node, which reads the destination list and propagates the message to either the first or last item on the destination list, according to the value that is specified for the RouteToLabel node's Mode property. Although there is no limit to the number of destinations that the Compute node writes in the destination list, the RouteToLabel node propagates the message only to a single label node. This use of the destination list is in contrast to its use to define the final recipients of the output messages. For more information about the procedure for creating a destination list, see Creating destination lists.
If you intend to derive destination values from the message itself, or from a database, you might also need to cast values from one type to another. For more information about the LocalEnvironment, see LocalEnvironment tree structure. For more information about casting, see Supported casts.
The XML_PassengerQuery message flow in the Airline Reservations sample demonstrates how you can use the destination list in the LocalEnvironment to route messages based on the information in the message itself. You can view samples only when you use the information center that is integrated with the Message Brokers Toolkit.