Delete non-pdf files from assembled job?

Post Reply
RytisT
Member
Posts: 135
Joined: Fri Aug 17, 2018 3:18 pm

Delete non-pdf files from assembled job?

Post by RytisT »

Hi. Is there a way to delete non-pdf files from assembled job? As far as I know, ungrouping job, deleting files and assembling again is not an option since it won't assemble when there's files missing? Any ideas? Thanks.
Padawan
Advanced member
Posts: 358
Joined: Mon Jun 12, 2017 8:48 pm
Location: Belgium
Contact:

Re: Delete non-pdf files from assembled job?

Post by Padawan »

I would use exactly the steps as you described, however the Assemble Job has to be configured in a way that it will do the assembly with the missing PDF files.

There are some ways you can handle this. In all these ways we will tap into the info that the Ungroup Job adds as private data to the ungrouped jobs. You can find an overview of these private data fields in the documentation:

http://www.enfocus.com/manuals/UserGuid ... p_job.html

Specifically, this part:
Private data
Ungroup job stores the following information in the internal job ticket for each injected job file, for use by assemble job:

<key>.JobID
The unique name prefix of the incoming parent job

<key>.JobName
The name of the incoming parent job (without prefix)

<key>.NumFiles
The total number of files injected in the flow for this parent job

<key>.FileName
The name of this file as injected in the flow

<key>.FilePath
The relative path of this file within the parent job folder
Do you know up front how many PDF files there will be in the job folder?
If so, then you can setup the Assemble Job like this: (In this example we assume that the amount of PDF files is in the [Job.PrivateData:Key="AmountOfPdfFiles"] variable.

Scheme: "Ungrouped Job"
Private Data key: "Ungroup" (please change this accordingly if you changed the private data key setting in the Ungroup Job.
Number Of Files:
[Switch.Calculation:Expression="[Job.PrivateData:Key="Ungroup.NumFiles"] - [Job.PrivateData:Key="AmountOfPdfFiles"]"]

So it will use the information stored by the Ungroup Job to know which files belong together. However, it will overwrite the amount of files to be expected with the original amount of files minus the amount of PDF files.

There is also an alternative method if you don't know how many PDF files are in there:

Scheme: "Custom"
Job Identifier: [Job.PrivateData:Key="Ungroup.JobID"]
Number of files: 999
After N minutes: 1

This method will know which files belong together based on the private data added by the Ungroup Job. It doesn't know how many files to expect, therefore we set a really high number which we will never reach. We set "After N minutes" to 1 to tell the Assemble Job that it can assemble the files with the same Job Identifier together 1 minute after the first job with that Id arrived.
RytisT
Member
Posts: 135
Joined: Fri Aug 17, 2018 3:18 pm

Re: Delete non-pdf files from assembled job?

Post by RytisT »

Thanks. I have no clue how many files will there be in a job, so I guess I'll have to rely on the second option, which is not ideal, but will do the job. Thanks!

EDIT: Problem I'm having with the second solution, is that even though it's set on "automatic" on folder name, yet it names the fold after Job indentifier/JobID. Any way I can keep the same folder name as it came in?
User avatar
Terkelsen
Advanced member
Posts: 297
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Re: Delete non-pdf files from assembled job?

Post by Terkelsen »

Add the folder name to Private Data as FolderName=[Job.Name] and use that as the variable to name the folder in the Assemble Job.
Padawan
Advanced member
Posts: 358
Joined: Mon Jun 12, 2017 8:48 pm
Location: Belgium
Contact:

Re: Delete non-pdf files from assembled job?

Post by Padawan »

Or use the private data added by the ungroup job which contains the job name:
Ungroup.JobName
Post Reply