jan_suhr wrote: ↑Mon Nov 16, 2020 9:59 am
You renamed the payload file and also changed the extension. The filename before the extension must be alike but different extensions. The filetype you want to embed as an opaque datatype i specified in the properties.
You you need two files as this: myfilename.pdf and myfilename.json
okay thanks. Now i got the pdf with the json attached to it but it seems like i cannot enter the opaque metadata.
Is there a way to "File.read()" a File thats not in the actual Job-Folder of the Script? How can I refer to such a file? For Example the JSON file is in Folder 11 how can I read it by refering to it like File.read('Ordner 11/filename.json')!?
Opaque datasets is just a container that keeps the dataset file as an attachment to the job file. You can just see that it is there together with the job file. To be able to get to it you must use the Export Metadata to get to it. It will then go out through the Log Connection.
So you mean the Flow Element "Export Metadata"? So I cant use job.getVariableAsString( '[Metadata.Rational:Path="Opaque"] ')?
In My Flow I get a JSON from a WebHook within the JSON is the name of the PDF-File I want to print via "Flux Server API" and various information for the job.
So I need the PDF to upload it to the API and I need the json to send it to the API. When I put the whole json in privateData it doesnt work, I am not able to parse or read it as json anymore.
As it is at the moment Switch can't read JSON as metadata, metadata must be XML. You could write a script that reads the JSON and get the variable saved as Private data to your PDF.