Question

Custom FME Server parameters


Badge +10

Many of our published workspaces in FME Server share published parameters, like URLs or email addresses. If this information changes with time I have to change the value for this parameters for each and every published workspaces one by one.

A way to manage this kind of information is by storing it in a table into a Resources folder and read it from my workspaces using a specific reader. This is ok but I was wondering if there is another option, like defining new FME Server parameters that would be accessed from workspaces and would work like 'global published parameters'.


2 replies

Userlevel 5
Badge +25

I think I would personally prefer the first option: putting it into a file or database in the Resources folder and reading that when needed.

Badge

There is. You could creat a config file with the '.ini' extension, or create an XML containing all the parameters you use. Instead of having regular text, file, choice, ... parameters, make them a scripted python parameter. Read the value of each parameter from this .ini or .xml file and you are good to go.

 

 

I have implemented this often and it works really well. For example: if a workspace is called from desktop or server, different parameters are used to get data from different locations and to write data to a development of production environment.

 

 

A more technical explanation of this approach was already explained in these forum topics:

https://knowledge.safe.com/questions/34975/moving-workspaces-between-fme-installs-tips-and-tr.html

https://knowledge.safe.com/questions/35634/provide-dataset-path-to-reader-through-a-python-sc.html

Reply