Skip to main content
Question

Set FilePath for FME_SHAREDRESOURCES_TEMP

  • December 17, 2024
  • 2 replies
  • 68 views

nedwaterman
Contributor
Forum|alt.badge.img+9

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.

2 replies

hkingsbury
Celebrity
Forum|alt.badge.img+53
  • Celebrity
  • December 17, 2024

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


tb09114
Supporter
Forum|alt.badge.img+22
  • Supporter
  • March 31, 2025

Just reading this posting because I have some issues writing to FME_SHAREDRESOURCE_TEMP, where I am getting 

Undefined macro `FME_SHAREDRESOURCE_TEMP' dereferenced in file `C:\Windows\TEMP\fmeengines\localhost_Engine1\FME_1743423682605_780'

but concerning the usage of either Form or Flow, does that not simply require to define the parameter within the workbench?



 


Reply


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