You can also connect them to other nodes in the same way. Because you can define a subflow once, and use it in more than one message flow (and even in more than one message flow project), a subflow can provide benefits:
However, you must remember that a subflow is not a single node, and its inclusion increases the number of nodes in the message flow, which might affect its performance.
Consider these examples of subflow use:
The use of subflows is demonstrated in the Error Handler sample and the Coordinated Request Reply sample.
The Error Handler sample uses a subflow to trap information about errors and
store the information in a database. The Coordinated Request Reply sample
uses a subflow to encapsulate the storage of the ReplyToQ and ReplyToQMgr
values in a WebSphere MQ message so that the processing logic can be easily
reused in other message flows and to allow alternative implementations to
be substituted.