Skip to main content
Archived

Environment tester/setter

siennaatsafe
deanhowell
markdmclean
ecthelion
  • siennaatsafe
    siennaatsafe
  • deanhowell
    deanhowell
  • markdmclean
    markdmclean
  • ecthelion
    ecthelion

markdmclean
Contributor

We run 32 and 64 bit versions of FME Desktop along with Dev and Prod environments for FME Server. Some of the more complex workspaces we create involve a fair bit of manipulation of inputs, outputs and resources between these instances.

I am currently in the process of writing a startup python script to identify which environment (desktop 32, desktop 64, Server Dev, Server Prod) a workspace is running on - this works. From there I can read a config.csv which has parameter names and a separate column for each environment - this also works.

The next step would be to set appropriate user parameters, to circumvent the need for manual changes in the different environments, but this seems to be a sticking point as user parameters need to be predefined.

Could provision be made for the dynamic creation and setting of user parameters at startup?

This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

markdmclean
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • August 2, 2019

I have a workaround:

  1. A config file workspacename_config.csv is configured with appropriate environment settings - this lives in the same path as the fmw (desktop) or in $(FME_SHAREDRESOURCE_DATA)/Configs on server
  2. Within the workspacename.fmw a startup python script determines whether the workspace is being run on Server (Dev or Prod) or Desktop (32bit or 64bit).
  3. It then reads the appropriate column from workspacename_config.csv and populates a global list (pm[ ])
  4. An AttributeCreator creates an empty list (para{})
  5. A PythonCaller then populates para{} from pm[ ]
  6. para{} is then available for use by the rest of the workspace - leading on from the output port of the PythonCaller

david_r
Evangelist
  • August 2, 2019

I do something very similar, except with INI or JSON files rather than CSV. But the principle is the same.


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