Skip to main content
Solved

Workspace to determine if running on FME Server


dbaldacchino1
Supporter
Forum|alt.badge.img+11

I need to set attributes based on whether the workspace is running on FME Server or Workbench. I could do a published parameter to manually toggle a value etc. but I would like it to be more automatic. The idea is that when building and testing on Workbench, I get specific behavior related to that environment; if run on FME Server, this behavior adapts as well. Is there a way to determine from within a workspace where it is being run from? Thanks in advance.

Best answer by nielsgerrits

I do this using python scripted parameters, based on fme_engine. See this topic:

https://knowledge.safe.com/questions/83878/scripted-parameter.html

If fme_engine is empty string then desktop, if contains test then server test, else is server prod.

Works like a dream, develop, push to test, push to prod, not changing anything.

View original
Did this help you find an answer to your question?

3 replies

dbaldacchino1
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • April 10, 2020

Maybe I answered my own question...I could look at FME_JOB_ID to infer that...will test.


nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • April 10, 2020

I do this using python scripted parameters, based on fme_engine. See this topic:

https://knowledge.safe.com/questions/83878/scripted-parameter.html

If fme_engine is empty string then desktop, if contains test then server test, else is server prod.

Works like a dream, develop, push to test, push to prod, not changing anything.


dbaldacchino1
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • April 10, 2020
nielsgerrits wrote:

I do this using python scripted parameters, based on fme_engine. See this topic:

https://knowledge.safe.com/questions/83878/scripted-parameter.html

If fme_engine is empty string then desktop, if contains test then server test, else is server prod.

Works like a dream, develop, push to test, push to prod, not changing anything.

Thanks, doable as well and preferred if you have a dev FME Server. I tested the job id parameter and that appears to work well for what I'm after. Pretty easy to set values based on whether it's empty or not as follows:


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings