FME Server 2016.1
For an on-demand data download service application with FME Server, I'm looking for a way to configure a download zip file name using a published parameter (requestor can set the value) and the Job ID etc.
A possible way I found so far is:
- Publish the destination dataset parameter of the main workspace as a published user parameter.
- Create another workspace (say 'submitter') containing an FMEServerJobSubmitter which call the main workspace by passing the required destination zip file path.
- Run the 'submitter' as a Job Submitter Service.
The destination zip file path can be created using the <results-dirpath>, FME_JOB_ID parameter, and a published user parameter of the 'submitter'. The <results-dirpath> is defined in the "fmeEngineConfig.txt" as the "FME_WORKING_DIR" directive.
It works as expected, but the <results-dirpath> has to be written in the 'submitter' as a full path, and it's a little annoying :(
My questions are:
- Is there a way to retrieve the value of the "FME_WORKING_DIR" directive at run-time, like a system parameter? I thought that the "FME_SERVER_DEST_DIR" could be used to retrieve <results-dirpath>, but it will not be defined when the workspace run as a Job Submitter Service.
- Is there a smarter way to configure a download zip file name at run time, rather than the name generated by FME Server automatically? It would be ideal if it could be realized with a single workspace that will be run as a Data Download Service.
Regards.
P.S. The goal is to allow users to define any prefix or suffix of download zip file name, so that they can distinguish multiple download files easily. e.g. an expected format is:
<user-defined prefix>_<timestamp>_<job ID>.zip
Any thoughts?