I am trying to create a Python FME shutdown script. I need it to reference two types of variable - (1) a static variable; and (2) a variable whose value is only known at FME runtime.
Option (1) I can ebale through a Published Parameter and reference it in my shutdown script as $FME_MacroValues(myParam)
Option (2) is trickier. I tried to use a VariableSetter transformer in the workbench but the shutdown script did not seem to recognise the variable. I also tried to create a dummy published parameter and reset its value at runtime using the VariableSetter again, but the shutdown script only recognised it default value, not its runtime value.
Do I need to set a global variable first in a startup script; modfiy it at runtime; and the use it in a shutdown script - not quite sure on the syntax if this is the best practise here?
So how are you meant to expose a global variable and/or a published parameter that gets updated at FME runtime in a python shutdown script? If someone can provide some sample python syntax that would really help me out.
Regards
Mike