This topic contains sections marked as revised for this release

WebSphere Message Brokers
File: ar03045_4_
Writer: Cerys Giddings

Task topic

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

Add the database Select operation

Before you start:
This topic provides instructions on how to add a database select operation that makes a qualified selection from a data source. In the spreadsheet pane the $db:select statement has the default value fn:true(), which returns all entries in the table. You must therefore replace this value with one that qualifies the selection, for example:
$db:select.LAB13STA.ARGOSTR.XREF.STATE=$source/AirlineRequest/Purchase/Customer/State

The XPath in this example selects only the records from the database where the value in the STATE column for each record matches the value of the State field from the input message. In the spreadsheet pane the $db:select statement is associated with a For entry which is used to iterate over the mappings for the target message. For each row in the database matching the $db:select statement a separate target message is created with the mappings beneath $target.

The following steps describe how to create message mappings to generate a target message based on records in a database matching the contents of an input message:

  1. In the spreadsheet pane replace the existing value fn:true() with the value to match in the database (for example a field in the input message as shown in the preceding example).
  2. Create mappings from the database fields in the Source pane to include in the target message, by dragging them from the source pane onto the target elements. A $db:select statement is added to the value column in the spreadsheet pane (for example, $db:select.AIRLINEDB.AIRLINE_SCHEMTREE.XREF.ABBREV).
  3. Create any mappings you require from the source message to the target message.
  4. Save the mapping by clicking File > Save.
  5. Save the message flow.
  6. Check for any errors in the Problems view.
You have now made a qualified selection from the database.
Now go to Deploy the mapping.
Related reference
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:07

ar03045_4_ This topic's URL is: