Hi everyone...
There have been a number of people asking about compound transformers on
the list, with many rumours and much intrigue. Well, we've finally
enabled this functionality in the latest FME betas. Build 1618 and
later should have it.
So what *ARE* compound transformers? Dale outlined it in his previous
email. A compound transformer is, essentially, a reusable transformer
you create yourself from other existing transformers. You can take a
string of transformers in a workspace and collapse them all into a
single compound transformer, which can then be edited, and re-used
multiple times in a workspace. This is a good way to deal with
workspaces that have gotten way too big, or ones where you find yourself
dropping the same string of transformers down in multiple locations.
The easiest way to start is to take a workspace you've already got lying
around, drag a box around a string of transformers, right-click on one
of them and select 'Create Compound Transformer'. You will be asked for
a name for the transformer, and an optional description. Once you hit
OK you'll be looking at your new compound transformer, which will
contain all the things you had selected. There will also be a new tab
at the top of the window. If you go back to the 'Main' tab, you'll
notice all the transformers you selected have been replaced by a single
minty-green transformer.
A compound transformer has a certain number of inputs and outputs, these
correspond to the inputs and outputs in the transformer's instance in
the Main window. Inputs and outputs can be added via the Insert menu,
or by right-clicking on the canvas. As you modify the inputs and
outputs, you'll notice the transformer's instance in the Main window
will change as well. Other than that, you can edit a compound
transformer just like you do the Main workspace window, except that you
can't add any datasets (feature types).
You can make compound transformers inside of other compound
transformers, to further simplify a workspace.
You can make as many instances of a compound transformer as you'd like.
In the transformer gallery, a new folder will appear (Compound
Transformers) that will contain all the ones you have made. You can
double-click or drag them onto the workspace like other transformers.
Note that the transformers may be disabled if you're currently editing a
compound transformer, and adding it would cause recursion. You can,
also, of course, copy and paste the compound transformer to get another
instance.
Compound transformers are contained within a single workspace. We're
hoping to tackle that limitation down the road (via an external
transformer library of some kind, kind of like Custom Formats). For
now, you can copy and paste compound transformers between workspaces,
and their definitions will be copied as well if necessary.
You can publish parameters for a compound transformer, by finding the
parameter in the tree view, right-clicking on it, and selecting 'Always
Prompt' (this menu option will most likely change to 'Publish' very
soon). That parameter will now become a parameter for the transformer
itself, so you can give different values for each of the compound
transformer's instances. This is also how you would use attributes
outside of the compound transformer in parameters for transformers
within the compound transformer.
Hopefully this functionality will help all of you out there with complex
workspaces. Give it a shot and let us know how it works out!
--
--------------------------------------------------------------
Matt Adam [EMAIL PROTECTED]
Developer, Safe Software Inc. (604)501-9985 ext.234
--------------------------------------------------------------
Get the maximum benefit from your FME, FME Objects, or SpatialDirect via our
Professional Services team. Visit www.safe.com/services for details.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/fme/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/