FME Form: 2024.1
Controlling Transformer Flow at Runtime
In general, the order in which transformers execute depends on how they are connected in a workspace—that is, how they "flow" from readers, to other transformers, and to writers. This order is especially evident when Using a Series of Transformers. However, in some cases, this order may not be so obvious, and can lead to unexpected results.
In the following scenarios, you can control the order in which transformers execute:
- When your workspace contains multiple transformers with no input ports.
- When a transformer outputs to multiple destinations from the same port.
Controlling Execution of Transformers with No Input Ports
Consider a workspace with two Creator transformers. There are no connections leading to either transformer, because they have no input ports. When you run this workspace, which one executes first? To find out, right-click on one of them and select Set Creator Runtime Order. A dialog opens that indicates the order in which each Creator executes. To change the order, select a Creator and use the arrows to move it up or down in the order.
Custom Transformers and Runtime Order
Set Creator Runtime Order also applies to custom transformers that contain Creators, but only if the custom transformer has no input port. For example, consider a workspace that contains: 1) a Creator transformer; and 2) a custom transformer with no input port that, in turn, contains a Creator transformer. In the workspace, right-click on either the Creator or the custom transformer, and select Set Creator Runtime Order. In the Creator Runtime dialog, you can control which Creator executes first - the one in the main workspace, or the one in the custom transformer.
Controlling Execution of Transformer Output to Multiple Destinations
If a transformer output port connects to more than one destination—either to other transformers or to other readers—you can control the order in which these connections execute.
Right-click on one of the connections and select Set Connection Runtime Order.
The Connection Runtime Order dialog opens, which indicates the order in which each connection executes. To change the order, select a connection and use the arrows to move it up or down in the order.