Develop a message flow with a TX Map
node specified with a source map, that, at run time, is triggered to run by
multiple inputs.
The TX Map node is used with a native
Collector node, which gathers the multiple inputs and, when specified event criteria are satisfied,
propagates the messages to the TX Map node
in the form of a message collection. For information about the Collector node and message
collection, see the specific IBM® Integration Bus product
documentation.
The map could have many input cards. Any number
of cards can receive data from the message collection, while any cards that
do not receive data pull data directly from their adapter.
The map
could have many output cards. Cards that are connected to the message flow
propagate data to the flow, while each of the unconnected cards send data
directly to their adapter.
To develop a simple message flow that demonstrates
this scenario, do the following steps. They are based on the
assumption that you used Map Designer to
create a source map (.mms) file containing an executable map with two input
cards, and one or more output cards.
- Create a new message flow project in the IBM Integration Development perspective.
- Create a new message flow in the project. Select Use
default broker schema, or provide your own schema name to qualify
the message flow name.
- Drag a TX Map
node from the palette onto the canvas for your message flow.
The
node initially has no output terminals and one failure terminal.
- Navigate to the Properties view.
- On the Basic tab of
the TX Map node,
select the source map.
-
Drag a Collector node to the canvas.
-
Drag an input node, for example, a FileInput node or MQInput node, to the canvas.
- Configure the input node with the necessary transport-related properties.
- On the Input Message Parsing tab of
the input node, configure the message template properties to describe the
format of the input message. Select the domain from the list of supported message domains.
- Right-click the Collector node, and select Add Input
Terminal. Enter the name of a new input terminal, which must match
the card name of the input card in the map that receives the input message.
The new input terminal is added to the Collection Definition table
on the Basic tab.
- On the Basic tab,
configure the required event criteria properties for the new input terminal,
namely Quantity, Timeout, Correlation
Path, and Correlation Pattern.
- Connect the out terminal of the input node
to the new input terminal on the Collector node.
- Repeat steps 7 through 12 for each different input the map requires
from the message flow.
- On the Basic tab of
the Collector node, configure the Collection Name and Collection
Expiry properties. In particular, you should specify a Collection
Expiry value.
- Connect the out terminal from the Collector
node to the in terminal of the TX Map
node.
Messages from the propagated message collection override
the adapters of the map’s input cards.
- Connect the expiry terminal from the Collector
node to the in terminal of the TX Map
node, to handle incomplete message collections.
-
Drag an output node, for example, a FileOutput node or MQOutput node, to the right of the TX Map node, and connect one of the output
terminals of the TX Map node to the
in terminal of the output node.
Connecting the output terminal overrides the adapter of the corresponding output card.
- Configure the output node with the necessary transport-related
properties.
- On the Outputs tab of
the TX Map node,
configure properties to describe the format of the output message propagated
by the output card.
- Click Add to add a set of properties.
The Add Properties entry dialog appears.
- Enter values for Card Number, Message
Domain, Message Set, and Message
Type, and click OK.
- Repeat steps 17 through 19 for each output terminal that you want
to connect.
- Press Ctrl+S to save the code.
An Unconnected
catch terminals warning message appears, which you can ignore.
Manually create and build the broker archive (bar) file, and then
deploy it to the broker.
When the message flow runs, the Collector
node gathers messages into message collections. As each collection completes,
it is propagated to the TX Map
node, and the TX Map
node runs the map. Each message in the collection is delivered to the matching
input card. For example, if a message in the collection arrived at the invoice Collector
node input terminal, it would be delivered to the invoice input
card. The messages in the collection override the adapter specified on the
input cards. For example, if the input cards use the File adapter, the map
does not read from the file; it uses the message from the message collection.
Connected output terminals override the adapters of the corresponding output
cards. For example, if an output card uses the File adapter, the map does
not write to the file; it propagates the message to the message flow.