Control the Execution Order of "Starter" Transformers

Related products: FME Form

There are some transformers having no input port, which will be "starter" of the translation in a workspace. e.g. Creator, SQLCreator, PythonCreator etc.
Currently there is no way to explicitly control the executing order of them, but I think it would be useful if users could control the order optionally.
An advantage is that performance (processing time and/or memory usage) of some transformers can be improved if the order of inputs could be controlled correctly. e.g. Clipper: Clippers First, FeatureMerger: Suppliers First, SpatialFilter: Filters First.
Additionally, it would also be useful if there were a workspace parameter that determines which run first, readers or starter transformers.
Really like this idea. We have a plan. Will see when we can get this into FME.

Good to hear. Thanks for your consideration.


Another +1 from me. I'm sure I opened a PR for this several years ago when I came across the need. But that's on my other spreadsheet, so don't know the number. :-)

 


Thanks your vote 🙂 I guess many users have come across similar situations. Hope this will be realized in the near future!


See also https://knowledge.safe.com/content/idea/18776/reorder-output-ports-on-any-transformer-move-upmov.html


Love this idea - I had a complex 3-day process that I was able to reduce to a 1-day process simply by manipulating the read-order to allow me to take advantage of "Supplier First = Yes" or "Candidates First = Yes" on various transformers. However my input data often comes from a SQLCreator looking at PostGIS, so the ability to control the read-order of this transformer as well would offer significant additional performance gains on a number of my workspaces.


For performance optimisation this would be superb. Being able to trigger a Creator to fire, before all readers, or after a certain reader or after all readers or...and this one is perhaps trickier, after all writers have closed... would be amazing. It waould also have the added benefit of providing a viable alternative to Startup and Shutdown scripts and in some cases workspace chaining. Love it.


If you're using FeatureWriters to do the writing -- gather all the Summary features into an Aggregator, when something comes out of that you know all the writing is done...


You voted, we listened. FME 2016.1 betas now have this functionality. I'll paste the comments I made on another version of this idea below. Please try it out and let us know what you think. I'd still like to tooltip the execution order, so let us know if that would be helpful too.


UPDATE: Originally we used the names of the creators to control their order, but we changed to an explicit dialog to move them up and down. And made it clear that all creators will fire before any features enter a transformer from a reader. And "Create At End" Creators go after the readers have all finished.


Original announcement below:


We are using the lexical order of the names of the transformers to govern the execution. So if you look at them in the navigator pane, that is the order they will fire. They will always go before any features from a "reader" are read in. If you need to interleave that, then you could use a Creator followed by a FeatureReader. We can't technically make Creators go in between "readers" that are otherwise added.


Even if you have custom transformers, within the custom transformer the Creators will fire in the right order, and if you make a custom transformer with no inputs, it will fire in the order of its name with respect to all other Creator-type transformers


I tested the new feature "Set Creator Runtime Order" with beta build 16480. It's a great feature. Thanks for the enhancement.

I noticed an inconsistency between the order shown in the "Creator Runtime Order" dialog and the actual order. I reported it to your support team already (C113427). Please check carefully before the official release.

In addition, I think it would be ideal if the user could move any creator transformer (including PythonCreator, SQLCreator, etc.) between "Before Readers" and "After Readers" via the "Creator Runtime Order" dialog. This could be the next step for 2017?


This has been released as part of FME 2016.1 . Visit http://www.safe.com/downloads to download and try it.


Yes, it has been released. Thanks for the great enhancement. However, unfortunately, there are outstanding issues about this functionality. The most critical issue is: there are some creator transformers which always run After readers (e.g. PythonCreator), but they always are listed as "Creators Run Before Readers" in the Creator Runtime Order dialog. I reported the inconsistency to Safe support in the 2016.1 beta stage, but it has not been resolved yet. Hope this will be resolved in the 2017.0 release.

'


Found that the Player (Playback Mode: PLAYBACK_AT_END) has an issue similar to the PythonCreator.

'


 

Good catch. We'll see what we can do.
Just FYI - this is the support article as I couldn't find how this was set:
http://docs.safe.com/fme/2017.1/html/FME_Desktop_Documentation/FME_Workbench/Workbench/Controlling-Transformer-Flow-at-Runtime.htm

I've install Desktop 2018.1.2.0 but I don't see any runtime settings when I right click my creators. Is there a setting I need to change?


Hi @colinjaconstanc, How many / What kind of creators are there in your worksapce?


I have 2 standard creators in my workspace:

http://docs.safe.com/fme/2018.1/html/FME_Desktop_Documentation/FME_Transformers/Transformers/creator.htm

I have set the one I want to active last to 'Create at End: Yes' but this runs before the data transformation process is complete.


In your case, the first Creator (Create At End: No) runs before any reader and the second Creator (Create At End: Yes) runs after every reader. Even if the workspace didn't contain any readers, the order would be the fixed. You cannot / don't need to control the order of the two Creators, so the "Set Creator Runtime Order" menu command is hidden, I think.

If the two Creators had the same value in the Create At End parameter or you added another Creator to the workspace, the command would be shown.


Ok, I should have been clearer about the overall process. I have 2 creators but I also have a separate reader/transformers/writer component that processes the downloaded data (creator 1). I'm downloading a file from ProjectWise, running a transform operation on it and then writing it back to ProjectWise. The problem is that I can't control the sequence of events very well which means that the final step (creator 2 - upload) occurs before my reader/transform/writer process has had a chance to update the file. I've tried using a decelerator on Creator 2 but the whole workbench gets stalled and not just the upload step. So creators run after the reader is initialized (if I set it to 'Create at End') but not at the end of the transform process - is there a way to set that?