Skip to main content

Morning all,

I’m trying to create a workspace that works both on FME Flow & Form. I’m using the FME_JOB_ID to determine what the workflow is running on.

If its FME Form I’m setting the filepath to a shared drive. For Flow I’m trying to set it to the FME_SHAREDRESOURCE_TEMP folder to produce a data download.

If I hard code the parameter in the writer to $(FME_SHAREDRESOURCE_TEMP)@Value(_FILEPATH) its fine, but I can’t do this as the file will not then post to a shared drive.

If I try and set the FME_SHAREDRESOURCE_TEMP in the workspace to push that to my parameter and add it to the created filepath FME no longer produces the downloaded zip file.

I’m setting the FME_SHAREDRESOURCE_TEMP to the url defined on Flow - which in this case is something like

https://-myserverlocation-/fmeserver/resources/browse?path=FME_SHAREDRESOURCE_TEMP&name=Temp

Is this correct, or should I be using a shorter, relative path?

 

EDIT: Sorry just figured out I don’t need to set this at all! FME Flow just does it automatically.

Yep, FME does it all automatically :)

As an example, this is how I tend to do something similar:
 

  1. Test for the existence of an FME Flow parameter
  2. If it exists, we’re on Flow, so set the output attribute to the value of the temp resource folder
  3. If it doesn’t exist, we’re on Form, so either manually specify the temp path (AttributeCreator) or use the TempPathnameCreator. Note the latter location will be deleted one FME finishes running

Sometimes overriding the Flow parameter value is a cleaner approach. I do find its a bit hidden and people will often miss that its set there when running on Form (of course you can mitigate this by publishing it or through documentation).

In other words, a few ways you can achieve a similar outcome


Reply