About the XML_PassengerQuery message flow

The XML_PassengerQuery message flow retrieves the reservation details of the passenger specified in the input message. The type of information in the output message depends on the information given in the input message:

The message flow uses RouteToLabel and Label nodes to dynamically route a message based on information in the message itself, and without having to create a chain of filter nodes, which would require a true/false Boolean result to route messages along particular paths.

Two input messages are supplied for running the XML_PassengerQuery message flow to demonstrate the retrieval of both types of information described.

The following figure shows the XML_PassengerQuery message flow.

A screen capture of the XML_PassengerQuery message flow

The following table lists the types of nodes that are used in the XML_PassengerQuery message flow.

Node type Node name
MQInput XML_PASSENGERQUERY_IN
Compute DecideOnQuery; GetPassengerInformation; GetReservationsInformation
RouteToLabel

RouteToLabel

Label SinglePassenger; AllReservations
MQOutput XML_PASSENGERQUERY_FAIL_1; XML_PASSENGERQUERY_FAIL_2; XML_PASSENGERQUERY_OUT

For more information, read about the nodes in the XML_PassengerQuery message flow in the WebSphere Message Broker documentation. To see the ESQL that is used in this message flow, see Creating the XML_PassengerQuery message flow.

The XML_PassengerQuery message flow performs the following actions:

  1. The XML_PASSENGERQUERY_IN node gets the input message from the XML_PASSENGERQUERY_IN queue and identifies the input message as being in the XML domain. The message flow must, therefore, parse the message using the XML parser.
  2. The XML_PASSENGERQUERY_IN node passes the message to the DecideOnQuery node. Alternatively:
  3. The DecideOnQuery node decides which path the message should take through the message flow. The path that the message takes depends on the type of information provided in the message. The node updates the LocalEnvironment with the destination information:
  4. The DecideOnQuery node passes the message and the LocalEnvironment, through the Out terminal, to the RouteToLabel node.
  5. The RouteToLabel node passes the input message to the relevant Label node: the SinglePassenger node if the DecideOnQuery node put Single Passenger in the LocalEnvironment; the AllReservations node if the DecideOnQuery node put All Reservations in the LocalEnvironment.
  6. If the RouteToLabel node passed the input message to the SinglePassenger node, the SinglePassenger node passes the input message, which contains a reservation number, through the Out terminal, to the GetPassengerInformation node. The GetPassengerInformation node looks up the reservation number in the XMLPASSENGERTB table in the RESERVDB database and builds an output message from the information found in the XMLPASSENGERTB table, including the reservation number, the passenger's full name, the flight number, the flight date, and the class of seat. The GetPassengerInformation node then passes the output message, through the Out terminal, to the XML_PASSENGERQUERY_OUT node.
  7. If the RouteToLabel node passed the input message to the AllReservations node, the AllReservations node passes the input message, which contains a passenger's name, through the Out terminal, to GetReservationsInformation. The GetReservationsInformation node looks up the passenger's name in the XMLPASSENGERTB table of the RESERVDB database and builds an output message from the information found in the XMLPASSENGERTB table, including the passenger's full name, and the flight number, flight date, and class of seat for each reservation that the passenger has made. The GetReservationsInformation node then passes the output message, through the Out terminal, to XML_PASSENGERQUERY_OUT.
  8. The XML_PASSENGERQUERY_OUT node puts the output message on the XML_PASSENGERQUERY_OUT queue.

Main Page icon   Back to About the Airline Reservations sample