There is disclosed a method for flattening hierarchically structured flows
using a breadth-first approach. At each level of hierarchy of a
hierarchically structured source flow, complex nodes are flattened by one
level across the entire breadth of the flow. The results of this
flattening are placed in a target flow, and any connections that existed
in the source flow are re-established in the target flow in such a way
that any data input into the target flow will be processed as if it had
been input into the source flow. After a processing iteration, if there
are still complex nodes remaining in the target flow, the target flow
becomes the next source flow, and the process is repeated until the flow
has been completely flattened.