Answers for "Use files created by FME server Jobsubmitter in the same flow for data download" https://knowledge.safe.com/questions/63642/bundle-pdf.html The latest answers for the question "Use files created by FME server Jobsubmitter in the same flow for data download" Answer by takashi https://knowledge.safe.com/answers/71457/view.html

Hi @JeroenR, I think you can do that with this procedure.

  1. In the first workspace (Data Download Service), create a temporary folder path with the TempPathNameCreator.
  2. Run the second workspace (Job Submitter Service) via a FMEServerJobSubmitter (Wait for Jobs to Complete: Yes). Here, pass the temporary folder path to a published parameter of the second workspaces as a destination folder into which all the resulting files will be saved.
  3. Connect a FeatureReader (Format: Directory and File Pathnames - PATH) to the Succeeded [Edited] port of the FMEServerJobSubmitter to read every file path within the temporary folder.
  4. Finally add a File Copy writer in order to MOVE all the files within the temporary folder to a destination zip dataset.

Wed, 30 May 2018 15:20:16 GMT takashi
Answer by jeroen https://knowledge.safe.com/answers/71450/view.html < p >我试着但却有写信人limitation of xMB for most users(Most e-mail providers do not allow large filesizes). In theory the total file-size of the pdfs could be in the GB's so this road looks like a dead end.

(emailer was attached to the statistics so only one feature was kept.) The workspacerunner contains the feature writer that saved the files to a folder named with the PrintAssignmentID, the ZipArchiver creates and adds these files to the zip stored on the temp.

I can not get it working after reworking it. It creates the zip but afterwards i cannot read, fetch or drag it into the workflow so i can use the datadownload to mail this zip.

Is there a way to use feature reader and read the pdf file as data instead and then use the datadownload service?

Really frustrating to see those files there but somehow cant get it to work like i want it. :P

Emailing the link to the zip directly, so that they could download it like a normal link could potentially lead to a data-breach. The folders do not get a randomised URL like the datadownloader does. So i can not use this tactic (although it looked like it worked.).

Wed, 30 May 2018 13:41:51 GMT jeroen
Answer by jeroen https://knowledge.safe.com/answers/68558/view.html

Took me a bit of time to make some time to rework everything

Current status:

The main flow loads a workspacerunner (flow a). Flow a makes the pdf's per page and stores them on the drive.

ZipArchiver (adds all the pdf files that are in my succeeded table coming out of the workspacerunner into a zip) -> featureholder (wait till everything is ready)-> statistic calculator(some summery data and also to have 1 outputobject) -> emailer (sends mail with zip).

This works, but the problem is that this does not work correctly with the data download.

Is it possible to read the PDF files that are created with the workspacerunner and stored on the disk into the workspace and use them as output and afterwards it will be stored and zipped by the data download service?

I tried the feature reader but it cannot read pdf's back in, so workspacerunner -> featurereader does not work.

Could featurereader with file and pathnames work? Any other ideas?

TLDR:

I have created x amount of pdf's on the hdd of my FME server with a workspace that is runned by the workspacerunner and would like to get them into the workspace so i can use the data download function (that zips them) and download the zip/mail the link to myself.

Thu, 19 Apr 2018 10:16:27 GMT jeroen
Answer by redgeographics https://knowledge.safe.com/answers/63654/view.html

The Data Download service actually bundles output in a zip file and can email it to the user, but you won't be able to call that using the FMEServerJobSubmitter.

If you're not able to rework your workspace to use the Data Download service you can write the PDF's to a temporary location using the FeatureWriter. Then a ZipArchiver (custom transformer, available on the hub) to create the zipfile and an Emailer transformer to email it to the recipient.

Thu, 08 Feb 2018 13:39:05 GMT redgeographics