Now and then I have a need to postprocess data written by a FME Server Data Download Service. In good old days (FME Server 2015) it was possible to do this in the Python Shutdown Script. Nowadays the results are obviously auto-zipped by the writers when running the Workspace on FME Server as a Data Download Service. I have not yet found any way to postprocess the results, as they are already zipped and the result filename is unknown (in the Workspace) when the writer has finished its job. My simple example substitutes some text in the file written by the FeatureWriter. This is necessary because of some limitation in the Writer itself. Everything works perfectly well in FME Desktop. In FME Server, published as a Data Download Service, the AttributeFileReader does not find the file returned by the _dataset attribute in the Summary port. Obviously because it is already zipped and removed by the Writer. Any ideas?
I don't think this is possible, the Data Download service returns results to the user straight away.
One possible approach that comes to mind is not doing it as a Data Download but rather as a Job Submitter (if you want to email the final result) or Data Streaming (if you want to stream a url back to the user). So write the files to a temporary (accessible) location and either use an Emailer to send a link or attachment, or a HTML writer to create a small webpage with a link.
I don't think this is possible, the Data Download service returns results to the user straight away.
One possible approach that comes to mind is not doing it as a Data Download but rather as a Job Submitter (if you want to email the final result) or Data Streaming (if you want to stream a url back to the user). So write the files to a temporary (accessible) location and either use an Emailer to send a link or attachment, or a HTML writer to create a small webpage with a link.
Thank you for the suggestion! Unfortunately that approach is very hard, as the ordering system is entirely based on results from a large number of FME Server Data Download Services. I think it should be possible to do postprocessing, even with data produced by a Data Download Service, one way or another. But how?