Skip to main content

Hi Guys,

I'm looking for a possibility to set published parameters of a workspace by running another workspace. My scenario is as follows:

  • I've a set of workspaces with a lot of published parameters in a repository folder
  • for some users, these workspaces are copied from my repositors to user-folders
  • inside these user-folders the published parameters must be set to different values workspace.

Copying the workspaces to the user-folders is done by a workspace to avoid interactive work. But I can't figure out if the second part of my task (definition of the published parameters) can also be addressed to any FME functionality, or if I have to do this manually.

 

To be 100% clear at this point, usage of a batch-command or a Workspace Runner to set published parameters at runtime is no option in my case! I must be able to run the user workspaces in FME Workbench without any tweaking of the published parameters, except input/output path.

An option might be to create a PRIVATE Parameter with choice and alias.

 

And then at runtime you fetch the FME_SECURITY_USER parameter (not sure about the name - but I think there is a parameter that gets the username of the user that runs the workspace)

And then you can "select" that path in the workspace by saying runninguser = find correct choice.

Not sure if this helps @whkarto ?

 

Full list of parameters and description can be found here: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/!Transformer_Parameters/FME_Server_Parameters.htm

 


An option might be to create a PRIVATE Parameter with choice and alias.

 

And then at runtime you fetch the FME_SECURITY_USER parameter (not sure about the name - but I think there is a parameter that gets the username of the user that runs the workspace)

And then you can "select" that path in the workspace by saying runninguser = find correct choice.

Not sure if this helps @whkarto ?

 

Full list of parameters and description can be found here: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/!Transformer_Parameters/FME_Server_Parameters.htm

 

Ohh this is cool, I'm going to make some user specific office pranks. :-D


Ohh this is cool, I'm going to make some user specific office pranks. :-D

Please share :)


Ohh this is cool, I'm going to make some user specific office pranks. :-D

Make all the workspaces run by your boss, with a fail message :)


Make all the workspaces run by your boss, with a fail message :)

Yes, or send him here http://tiny.cc/ffabgz

 

 

 


Yes, or send him here http://tiny.cc/ffabgz

 

 

 

I wonder if we can build a RickrollDetector custom transformer...


@sigtil, interesting idea, but I it's going to be quite complicated if there are several parameters to be set with multiple users. I had hoped for some sort of look up table solution where I can set up the proper configuration in some external software (e.g. Excel) and use the published parameter name as join attribute. That way I don't have the need to edit the workspace itself for every new client/parameter


I wonder if we can build a RickrollDetector custom transformer...

This got me thinking - and since it is friday - ENJOY 🙂 https://hub.safe.com/publishers/sigtill/transformers/webpageopener


This got me thinking - and since it is friday - ENJOY 🙂 https://hub.safe.com/publishers/sigtill/transformers/webpageopener

Blast you beat me to it! Well here's the RickRoller: https://hub.safe.com/publishers/virtualcitymatt/transformers/rickroller

 

Enjoy Pranking

 

 


Blast you beat me to it! Well here's the RickRoller: https://hub.safe.com/publishers/virtualcitymatt/transformers/rickroller

 

Enjoy Pranking

 

 

You can use the link to my Custom transformer inside your Custom transformer. Then your RickRoller can benefit opening it on multiple browsers. Well, time for a beer and weekend now. Have a nice weekend!


@sigtil, interesting idea, but I it's going to be quite complicated if there are several parameters to be set with multiple users. I had hoped for some sort of look up table solution where I can set up the proper configuration in some external software (e.g. Excel) and use the published parameter name as join attribute. That way I don't have the need to edit the workspace itself for every new client/parameter

I mean, at the end of the day FME workspaces are just text files. You could try with the txtfile reader/writer to replace the places needed.

 

 

But I would guess this could end up being more work than simply opening the workspaces and setting them specifically

@sigtil, interesting idea, but I it's going to be quite complicated if there are several parameters to be set with multiple users. I had hoped for some sort of look up table solution where I can set up the proper configuration in some external software (e.g. Excel) and use the published parameter name as join attribute. That way I don't have the need to edit the workspace itself for every new client/parameter

Then I guess you can use a python startupscript to read a "settings file" in the users folder or something?

https://knowledge.safe.com/articles/59997/startup-python-scripts-in-fme.html


If you want to have a 'helper' file for each user, you could go down the route of using a scripted python parameter to read a csv file and create a dictionary as a global parameter

Then further scripted parameters to retrieve all the relevant parameters

 


I mean, at the end of the day FME workspaces are just text files. You could try with the txtfile reader/writer to replace the places needed.

 

 

But I would guess this could end up being more work than simply opening the workspaces and setting them specifically

I've already worked on this approach and am quite sure that I could do it that way. But if I simulate this manually with just one parameter and do a file compare in notepad++ alot more lines than expected are highlighted. So I'm absolute not sure If I can guarantee file integrity! Maybe someone form Safe could comment on this.


I've already worked on this approach and am quite sure that I could do it that way. But if I simulate this manually with just one parameter and do a file compare in notepad++ alot more lines than expected are highlighted. So I'm absolute not sure If I can guarantee file integrity! Maybe someone form Safe could comment on this.

I think this is why FME doesn't really work with the Git/versioning workflow. They are working on it though


You can use the link to my Custom transformer inside your Custom transformer. Then your RickRoller can benefit opening it on multiple browsers. Well, time for a beer and weekend now. Have a nice weekend!

https://hub.safe.com/publishers/virtualcitymatt/transformers/3dclipper-notproductionready Mwahahaha!


Reply