I am trying to create a simple scripted parameter that creates a unique random id to insert into a DB for reporting purposes.
I am following step by step the example in the FME help pages:
https://knowledge.safe.com/articles/60080/python-scripted-parameters.html
I create a variable and I assign to it a UUID using the python module (interpreter 3.4+)
https://docs.python.org/3.4/library/uuid.html
import uuid
import fme
custom_uuid = str(uuid.uuid4())
# I tried both with and without conversion to string
# custom_uuid = uuid.uuid4()
return custom_uuid
FME workbench does not read the parameter as the result of what is returned in the script, but reads the text of the script (adding some custom FME tags).
See from logger:
Logger: UUID is: import<space>uuid<lf>import<space>fme<lf><lf>custom_uuid<space>=<space>uuid.uuid4<openparen><closeparen><lf><lf>return<space>custom_uuid<lf>
what I am doing wrong for FME not reading the returned results from the script?