Authoring for the Resources System

Using the FME Server web interface it's simple to select data from the resources folder at run-time. However, in some cases the author will want to read data from a resources folder without the end-user having to select it.

To do this requires the use of an FME parameter to define the data as coming from the resources folders.


FME Parameters for Server

In FME Workbench the Navigator window has a section called user parameters. You might have noticed that one part of this is a list of FME Server-specific parameters:

The uses of these are many and varied; for example FME_SECURITY_USER returns the name of the user running the workspace, and could be used to either write to a custom log or perhaps filter data in different ways in the workspace based on the specific user. FME_TOPIC would return the name of the notification topic (if any) that invoked the workspace.

However, when authoring for resources data, the most useful parameter is FME_SHAREDRESOURCE_DATA


WARNING
A common factor to all these parameters is that they only have an effect when the workspace is run on FME Server. If the workspace is run on FME Desktop, it won't return a value. Therefore to test a workspace containing such a parameter requires you to provide a dummy value.

FME_SHAREDRESOURCE_DATA

What the FME_SHAREDRESOURCE_DATA parameter does is return the path of the shared resource data. When authoring a workspace to read data directly from the resource folder, you can therefore enter this into the source dataset field as the path to the data:

Leaving the Navigator window looking like this:

When the workspace is run the parameter is replaced by the actual path and the data is read as expected.


Accessing Resource Paths Directly

Once a dataset has been uploaded to FME Server as a resource, the path for that shared resource can also be obtained by examining its properties in the FME Server Resources pages:

This path can then be copied and pasted into a workspace in order to reference that dataset directly without manually entering it. Of course, this does require that the data has already been uploaded to FME Server, and isn't going to be uploaded with the workspace when it is published!


Miss Vector says...
So I can make my workspace read specific data from the resources folders - but how do I stop the end-user from being able to change that?

1. Remove their security permissions for the Job Submitter service
2. Remove their security permissions for the Resources folders
3. Make the source dataset parameter optional for that Reader
4. Delete the published parameter for that source dataset from the workspace

results matching ""

    No results matching ""