I have this code on my python shutdown script. I am invoking a second workbench, but I would like FME to prompt for the parameters upon execution, so the second workbench runs with its own parameters, according to whatever the client decides to enter:
import pyfme import os import subprocess logger = pyfme.FMELogfile() fmeExecutable = os.path.normpath(FME_MacroValuesc'FME_HOME'])+'\\fme.exe' workBench = os.path.normpath(FME_MacroValuesM'Workbench_To_Run']) # initiate materialized view refresh if changes to either source if FME_TotalFeaturesWritten > 0: logger.log('Eecutable '+ fmeExecutable) logger.log('Updates detected, executing materialized view refresh script - ' + workBench) args = BfmeExecutable, workBench] p = subprocess.Popen(args)
Unfortunately, the call to the second workbench runs with the default parameters, and never prompts for values. How can I :
- Make FME to prompt for the parameters in the second workbench or:
- Prompt for the parameters in the first workbench and pass them onto the second workbench?
Any help, will be much appreciated,
Thanks,
Richard