I have a very large and complex Python/arcpy script that does lots of custom calculations, and I am trying to port it to an FME environemnt. The script runs beautifully under ArcGIS. The problem in porting is that some of the ESRI-specific functionality, especially geoprocessing tools, has to be replaced with similar FME functionality. So, I would like to inquire if there is a way to run FME transformers, e.g. HullReplacer, from a PythonCaller script in an FME workspace.
True, the project could be rewritten completely in Workbench. I have no doubt about that; however, that would take a lot of time and effort ... and to be completely honest, I am doing the port to FME for someone else who actually has the FME license. I do not have access to FME myself. Most of the functions of the existing script have ported almost without change to FME Workbench. Works great. There are a few places, though--right smack dab in the middle of the code--where some FME functionality is needed to replace some ESRI functionality, and "there's a transformer for that." If I could execute a transformer in those places and continue processing the existing code with the output of the transformer, I could easily port the rest of the script. I just don't know if it is possible programmatically to execute a transformer from Python. I can't find any direct mention of this in online FME documentation or in online searches. I have noted that a Python wrapper has been created for the IFMELibrary. That provides a promising hint, but frankly I don't know what the IFMELibrary is or what it entails. There is no documentation for it.
Can anyone shed any light on this for me? Thanks, all, for the help.
ADDITION: Hmmm. I see in this post some sample code (in the first block) showing a transformer being called through Python. Is this a valid and supported syntax? If so, is there an online documentation set that covers the Python/fmeobjects syntax for calling each of the transformers?
CONCLUSION: After a lot of searching, testing, and -- finally!-- being able to submit a question to Safe Software, my conclusion is that one cannot call FME transformers from within a Python script in a PythonCaller transformer. This is disappointing. I must proceed with chopping the scripts into little pieces and redoing the whole process in FME Workbench.