When you connect message flow nodes together, the broker determines the way in which the different connections are processed. This includes the order in which they are processed. If you have connected more than one node or sequence of nodes to a single output terminal, you cannot predict whether one sequence is processed before another for any given message.
If the order of processing is important in your message flow, use the FlowOrder node to force a prescribed order of processing of the messages that are propagated by this node.
The FlowOrder node has two output terminals that you can connect to control the order in which subsequent nodes process the message. The output terminals, named first and second, are always processed in that order.
When you connect a node or sequence of nodes to the terminal named first, the input message is passed to the next node, and all processing defined by all subsequent nodes in this sequence is completed before control returns to the FlowOrder node.
The input message is then propagated to the next node in the sequence of nodes connected to the terminal named second.
The message passed to both sequences of nodes, from the terminal named first and the terminal named second, is identical. It is always the message that the FlowOrder node receives as input. The message that the FlowOrder node propagates to the terminal named second is in no way affected by the processing of the message that has been performed by the sequence of nodes connected to the terminal named first.
The FlowOrder node provides no other processing on the input message; it is used only for imposing order on subsequent processing.