Skip to main content
Hi!

 

 

When using a workspacerunner on a workspace it will go through the FAILED port if it fails and the SUCCESS port if it succeedes. However what if I have a situation where I want it to write to an output - BUT under certain conditions I also want it to FAIL AFTER writing the file. Can I set the attribute SUCCESS or FAIL on a python-shutdown script, if yes, what is the name of the parameter?

 

Hi,

 

 

I'm not sure whether such parameter exists, but there could be other approaches to reach your purpose. For example, raising an exception in Shutdown Script would be a way to make the workspace fail after completion of all transformations.   import fmeobjects if <condition>:     raise fmeobjects.FMEException('Failed.')   Or, writing the finished situation to an external file in Shutdown Script and reading it by PythonCaller after WorkspaceRunner succeeded might be also available and more flexible way.
Thank you very much Takashi all the way from Norway to Japan!

 

 

Just what I was looking for but could not find! It works perfectly. I am a bit new on python within FME - so I havent examined the documentation thoroughly yet.

 

 

Sigbjørn

Reply