Hi @JeroenR, I think you can do that with this procedure.
(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.).
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.
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.