Environment tester/setter

Related products: FME Form

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?

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

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