Hopefully easy question: what is the easiest way for me to check if a workbench is running on FME Form or on FME Flow?
On Form, when testing, I want to read the source data from my C-drive. But when on Flow, I want to read the official data uploaded on the server.
You could use an EnvironmentVariableFetcher to fetch the COMPUTERNAME
Or use the FME parameter $(FME_ENGINE).
And because this solution distinguishes the software instead of the machine, it’s got my preference.
Thank you both!
Different approaches possible for this stuff. I know some use config files. We use a choice parameter for environment (Dev/Test/Prod) combined with scripted parameters and the parameter FME_ENGINE to do this. What this does is:
- If workspace is run on fme server test, it uses the test parameter.
- If workspace is run on fme server prod, it uses the prod parameter.
- If workspace is run locally, it will use the environment choice to choose the parameter. (local, test or prod).
This way, you will never have to change anything in the workspace when publishing to test or prod, it will automatically choose the right parameter. Also, when developing, it is possible to easy switch between dev and test. And in the case of an issue, it is also easy to debug what is happening in prod.
Sample workspace attached.
No not yet, I’m not sure when this was introduced but I believe our server version is not new enough for it. Also our current approach works really well for us.