Skip to main content
Solved

Make Workbench call to prompt for parameters


Hello:

 

 

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_MacroValues['FME_HOME'])+'\\fme.exe' workBench     = os.path.normpath(FME_MacroValues['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 = [fmeExecutable, 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

Best answer by muratgu

I noticed that when I run a worksapce from explorer by "FME Quick Translator", it does prompt for parameters, so you may want to use "fmequicktranslator.exe" as your fmeExecutable instead and see what happens.
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

david_r
Celebrity
  • March 21, 2013
Hi Richard,

 

 

as far as I know, it is not possible to make FME prompt for published parameters when you execute your workspace from the command line.

 

 

Your best bet is probably to ask for all the parameters in workspace1, then pass the relevant over to workspace2.

 

 

See also the previous answer I gave you for an example on how to do this using fmeobjects.

 

 

Hope this helps.

 

 

David

Forum|alt.badge.img+2
  • March 21, 2013

Richard

Is the second workbench only updating materialised views e.g. with an SqlExecutor or does it do more. If only that I would think there is a simpler way keeping everything in one workbench. Of course you might have other reasons for doing it this way!


Forum|alt.badge.img
  • Best Answer
  • March 21, 2013
I noticed that when I run a worksapce from explorer by "FME Quick Translator", it does prompt for parameters, so you may want to use "fmequicktranslator.exe" as your fmeExecutable instead and see what happens.

  • Author
  • March 25, 2013
Thanks very much for all who took the time to get back to me. My apologies for the delay on responding. Fighting a flu !!

 

 

Indeed, I needed to keep these two workbenches separated, as they are needed to be run independently if desired.

 

 

@muratgu : the fmequicktranslator.exe did everything as I wanted it: propmpting for the parameters for the second workbench. Thanks very much!

 

 

Best regards,

 

 

Richard

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings