Skip to main content
Question

Hi, I am currently using FME Form 2023.1.1.0. I found out that I can not directly add deployment parameters in the shutdown python script.


As workaround I can create user parameter as intermedia parameter then get it accessed by shutdown python script. But I am more like to find the way to let shutdown python script to DIRECTLY access deployment parameters. Any tip?

Thanks,

Daniel

6 replies

danminneyatsaf
Safer
Forum|alt.badge.img+12

Hi @daniel_yu​ 

 

I just tested in FME 2023.1.0.0 and was able to use a text deployment parameters in a python shutdown script.

Unfortunately, in the GUI when you're specifying your shutdown script, the deployment parameters will not show up on the left side of the window but you can manually enter the name of your deployment parameter.

For example, if I have a deployment parameter called databaseconnection then I can use the following syntax in my python script: $(databaseconnection).

 

Let me know if this works for you. If this is still not working, would you be able to provide some more details on what your shutdown script does and if it's accessing a text, web connection, or database connection deployment parameter?

 

Regards,

Dan


  • Author
  • November 28, 2023
danminneyatsaf wrote:

Hi @daniel_yu​ 

 

I just tested in FME 2023.1.0.0 and was able to use a text deployment parameters in a python shutdown script.

Unfortunately, in the GUI when you're specifying your shutdown script, the deployment parameters will not show up on the left side of the window but you can manually enter the name of your deployment parameter.

For example, if I have a deployment parameter called databaseconnection then I can use the following syntax in my python script: $(databaseconnection).

 

Let me know if this works for you. If this is still not working, would you be able to provide some more details on what your shutdown script does and if it's accessing a text, web connection, or database connection deployment parameter?

 

Regards,

Dan

Hi Dan,

 

Thanks for your response.

 

Please see attached. It seems I can get the value from deployment parameter, but I do not know why I cannot even print it out. It seems I can manipulate the parameter in python. Would you be able to shed some light?

 

Thanks,

 

Daniel


danminneyatsaf
Safer
Forum|alt.badge.img+12
daniel_yu wrote:

Hi Dan,

 

Thanks for your response.

 

Please see attached. It seems I can get the value from deployment parameter, but I do not know why I cannot even print it out. It seems I can manipulate the parameter in python. Would you be able to shed some light?

 

Thanks,

 

Daniel

In this case I think the error message is caused by missing double quotes in your print function.

Try print("$(AGS_Email_To)") instead. Hope that helps!


david_r
Celebrity
  • November 29, 2023
daniel_yu wrote:

Hi Dan,

 

Thanks for your response.

 

Please see attached. It seems I can get the value from deployment parameter, but I do not know why I cannot even print it out. It seems I can manipulate the parameter in python. Would you be able to shed some light?

 

Thanks,

 

Daniel

@danminneyatsaf​ Since this is non-standard Python behavior, can we assume that FME is simply doing string-substitution on the shutdown script before execution? Are there any plans to provide native support for deployment parameters through the "regular" Python mechanisms in e.g. the fme module?


  • Author
  • November 29, 2023
daniel_yu wrote:

Hi Dan,

 

Thanks for your response.

 

Please see attached. It seems I can get the value from deployment parameter, but I do not know why I cannot even print it out. It seems I can manipulate the parameter in python. Would you be able to shed some light?

 

Thanks,

 

Daniel

Thanks Dan. It worked in this way.


danminneyatsaf
Safer
Forum|alt.badge.img+12
daniel_yu wrote:

Hi Dan,

 

Thanks for your response.

 

Please see attached. It seems I can get the value from deployment parameter, but I do not know why I cannot even print it out. It seems I can manipulate the parameter in python. Would you be able to shed some light?

 

Thanks,

 

Daniel

@david_r​ I haven't tested deployment parameters through regular Python mechanisms such as the fme module. Have you found so far that it doesn't function as expected?

 

In the example I gave above I was using a Text Deployment Parameter (as opposed to a web or database connection based one), so I assume that's why the parameter appeared as a string value.


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