Hi,
Wondering if anyone has any pointers on how to get job info variables into an output preset using the REST API?
Should this sort of thing work, as I’m struggling with it (loads of status 400 returns)?
You should be using runtime parameters, not JobInfos (which are a Workflow-specific structure).
You cannot pass runtime parameters directly to an output preset (yet!), but you can pass them to the Job Creation operation. You have to make sure that the Job Preset stores in its metadata the values it received in the parameters. You can then use those metadata fields in your output preset.
Hi Phil,
Thanks for the info - will give the Job Preset route a go. The only reason I’ve been using JobInfos is that I’ve no idea how to set parameters in the API.
How would the structure look - something like this?
‘ProcessInformations’: {
‘OriginalFilename’: managed_job_id,
‘Parameters’: {
‘MyFirstParameter’: str(rpd_job_path)
}
}
Many thanks,
Tim
Hi Phil,
Defined the paramaters as per guide, but unfortunately all I get is this: The automation property \"pres_dpf_path\" need to be defined as a variable in the Workflow process. (SRV000110) (SRV000017) (SRV000012) (SRV000001)","parameter":""
when I pass
‘ProcessInformations’: {
‘OriginalFilename’: filename,
‘parameters’: {
‘rpd_job_id’: str(rpd_job_id),
‘pres_dpf_path’: str(pres_dpf_path),
}
}
as the json payload along with an error in the associated postprocessor where I’m using the parameter like this: var workingPath = automation.parameters.pres_dpf_path;
both parameters are defined in the python API script and work fine using JobInfos.
I’m missing something again aren’t I?
Magic, thanks Phil.
So, the parameters are not nested within ‘ProcessInformations’! Yep, that got the datamapper back for me. Today’s task is to figure out the Job / Output interaction.
Thanks again,
T
Oh dear. Seems I’m stuck again.
I don’t want / need to split the job at this point and have tried countless variations in the Job Output Mask section.
Surely there has to be a workaround that I’m unaware of?
Cheers,
I am afraid that – regarding the error message “Job level metadata is not supported in the job output mask” – there is unfortunately no workaround available for using a Job metadata field in the Job Output Mask option as only Job Segment, Document Set and Document metadata fields are supported in the Job Output Mask.