Skip to main content

Good morning!

I have a workspace that creates a KML and a zip with SHAPE Files. I'm going to upload it to FME Server so the user can download those file easily.

Before doing anything I have checked the API documentation. The respone from a job looks like this:

result {
id (integer): Unique identifier for this job,
numFeaturesOutput (integer, optional),
priority (integer, optional),
requesterHost (string, optional),
requesterResultPort (integer, optional),
resultDatasetDownloadUrl (string, optional),
status (string, optional) = l'SUBMITTED', 'QUEUED', 'ABORTED', 'SUCCESS', 'FME_FAILURE', 'JOB_FAILURE' or 'PULLED']: Job success, failure, or other status,
statusMessage (string, optional),
timeFinished (string, optional),
timeRequested (string, optional),
timeStarted (string, optional)
}

The "resultDatasetDownloadUrl" is not an array, so that makes me think the Server will create just one URL. How does FME Server choose between my KML or ZIP file with SHAPES?

Is there a way to force FME Server to create two URL? Or should I add the KML to the ZIP file to have just one element to download?

The user is not going to access FME Server. I'm coding a .NET app for that.

I'm using FME Server 2017.

Thanks for any help provided.

I believe you can only associate one single writer with that functionality, if you need several writers per workspace I'd probably do it differently, e.g.

  • Define a custom shared resource, e.g. "OUTPUT" (Documentation)
  • In your workspace, write all the data to $(OUTPUT)/$(FME_JOB_ID).zip
  • In your application, you can then use the API to download each file, e.g. /fmerest/v3/resources/connections/OUTPUT/filesys/<job id>.zip

You should also define a cleanup task that deletes all the files in $(OUTPUT) after a certain time.


I believe you can only associate one single writer with that functionality, if you need several writers per workspace I'd probably do it differently, e.g.

  • Define a custom shared resource, e.g. "OUTPUT" (Documentation)
  • In your workspace, write all the data to $(OUTPUT)/$(FME_JOB_ID).zip
  • In your application, you can then use the API to download each file, e.g. /fmerest/v3/resources/connections/OUTPUT/filesys/<job id>.zip

You should also define a cleanup task that deletes all the files in $(OUTPUT) after a certain time.

OK. You propose to ignore the URL that FME would create if I check the "Data Dowlonad Service" and use the URL of a repository created in the Server once the job is finished.

 

 

That would work. Thanks!

 

 


OK. You propose to ignore the URL that FME would create if I check the "Data Dowlonad Service" and use the URL of a repository created in the Server once the job is finished.

 

 

That would work. Thanks!

 

 

In fact, you could simply use a regular job submission service rather than the datadownload.
OK. You propose to ignore the URL that FME would create if I check the "Data Dowlonad Service" and use the URL of a repository created in the Server once the job is finished.

 

 

That would work. Thanks!

 

 

Submit a job: /fmerest/v3/transformations/commands/submit<repository>/<workspace>

 

Poll for status: /fmerest/v3/transformations/jobs/id/<job id>

 


In fact, you could simply use a regular job submission service rather than the datadownload.
I will do that. Thanks :)

 

 


Hi @oscard,

I just want to clarify that it is possible to register multiple writers with the Data Download Service. I'm not sure that's exactly what you want but I thought I should mention it. It will still include everything in one zip file.

 

If you wanted to though, you could use published parameters to control your workspace as to weather SHP, KML or both formats are included in the downloaded zip.

 


Hi @oscard,

I just want to clarify that it is possible to register multiple writers with the Data Download Service. I'm not sure that's exactly what you want but I thought I should mention it. It will still include everything in one zip file.

 

If you wanted to though, you could use published parameters to control your workspace as to weather SHP, KML or both formats are included in the downloaded zip.

 

Thanks! I wasn't aware of the "Include Writers in Download" step.

 

 


Hi @oscard,

I just want to clarify that it is possible to register multiple writers with the Data Download Service. I'm not sure that's exactly what you want but I thought I should mention it. It will still include everything in one zip file.

 

If you wanted to though, you could use published parameters to control your workspace as to weather SHP, KML or both formats are included in the downloaded zip.

 

My "Edit" buttons are grey out. Could that mean that my FME Server user doesn't have enough permissions?

 

 


Reply