Hi FME'ers,
I wanted to write up a brief guide to connecting transformers (and other objects) on the FME canvas, and rather than making a full blog post out of it as I've done before, I thought I'd experiment by posting it in the forums here.
So here's a quick guide to the shortcuts for connecting transformers. I'm hoping that it covers any techniques you might not be aware of.
Guide to Connecting TransformersMethod 1: Drag and ReleaseI'm sure you all know this method, but here it is anyway:
You drag a connection from one port and drop it at a second port.
Method 2: Quick Add with InsertHere we have a connection between a reader and writer feature type. The workspace author wishes to place a transformer between them. Rather than place and then connect the transformer in a number of steps, the author can do it in one by pre-selecting the connection:
In other words, whatever is selected when you use Quick Add, that's where the transformer is placed.
Method 3: Drag-and-InsertHere the author has a transformer ready to connect. What's the easiest way to do that? Drag-and-drop. Notice how the transformer gains a little green arrow when it is moved. This arrow marks the location where FME is looking for a connection to make:
This Drag-and-Insert method has options to control it, particularly which ports to connect, that can be found under Tools > FME Options > Workbench > Transformer Options.
Also note that you can switch the side on which the green arrow appears, by pressing (then releasing) the Alt key, just like this author is doing:
This makes it easier to place the transformer when the required connection is towards the right.
Method 4: Single Port ConnectionsDid you know that the Drag-and-Insert option also works on a port, not just a connection. For example here the author connects the transformer by releasing it onto a port:
Notice the smooth way in which the author uses the Alt key to switch the green arrow to the right-hand side, making it easier to connect to the Labels feature type.
Oh, and remember when I said "whatever is selected when you use Quick Add, that's where the transformer is placed"? That applies to ports too!
Method 5: Moving ConnectionsIf you have a connection that is in the wrong place, you don't necessarily need to delete and replace it. You can drag one end of the connection into the correct position:
You'll probably already know that when you hover over a connection, that connection is highlighted. But did you notice that one end of the connection is highlighted with a thicker line than the other. That shows you which end of the connection would move if you started to drag it from that position.
Method 6: Multiple Port ConnectionsThis is perhaps my favourite shortcut. When you drop a transformer onto a port with multiple connections, all of them are adjusted to connect the new transformer:
It basically inserts the transformer between the port and all connections. The same technique works on an input or output port.
Method 7: Click ConnectDid you notice that you can click on and select an individual port? Click on another - opposite - port, and a connection is made:
This is especially useful in a very large workspace, where the ports to connect are not on screen at the same time. Rather than dragging a connection across a scrolling screen, you can instead click the first port, scroll across, then click the second port.
Method 8: Feature Type Connections WindowAlthough this window is called "Feature Type Connections", it can connect all workspace objects. Here the author first connects a set of feature types to a single transformer port. Then they connect all ports on the AttributeFilter using an Auto Connect option:
Auto-connect works by matching the port name to the Writer Feature Type. You can open this window using View > Windows > Feature Type Connections on the menubar.
I hope you found this useful. We don't talk about these techniques all the time because it would get boring. But sometimes newer users aren't aware of them because they aren't all intuitive. Hence this post.
I'm planning to create a few posts like this - short community engagement pieces - so if there are any subjects you'd like me to cover, then comment or answer below. Also comment if you know of any other connection techniques that I might have missed out!
Regards
Mark (aka FME Evangelist)