Assemble Job after Job Dismantler

Post Reply
RunDontStop
Member
Posts: 51
Joined: Mon Apr 05, 2021 8:03 pm

Assemble Job after Job Dismantler

Post by RunDontStop »

I hope I can explain this. What I want is to ungroup a job folder, but preserve folders and files below the first level.
The reason I need this. I built a flow to preflight PDFs. The job was a folder with PDFs in it, and then more subfolders. When I ungrouped the job, it preflighted the PDFs, but it did all of them, even the ones in lower sub directories. I didn't want that – I just want to process the PDFs on the top most level, then reassemble the whole job after the top level PDFs have been preflighted.
It looks like Job Dismantler almost works, that keeps my subfolders intact. The problem is when I try to reassemble everything in it's original hierarchy state. I don't have any kind of Ungroup Key with Job Dismantler, as there is with Ungroup Job. So no good way to put everything back in its original order.
So I guess my question is - is there a way to get Switch to process only files on the top level of a job folder, and leave folders and files below the top level untouched? And get the job folder regrouped after the processing is complete? Thank you.
laurentd
Member
Posts: 137
Joined: Wed Mar 13, 2019 2:06 pm

Re: Assemble Job after Job Dismantler

Post by laurentd »

Ungroup Job saves private data so that it is possible to assemble the job again later.
<key>.FilePath is the relative path of this file within the parent job folder.
More info here: https://www.enfocus.com/manuals/UserGui ... p_job.html

It is interesting to notice that the <key>.FilePath private data is not added to the files on the top level the job folder, because it is not necessary. So, ungroup the job, sort the files based on the condition in the screenshot (will return true for the top level documents), preflight the top level pdfs, and assemble the job again after the preflight.
conditionTopLevel.png
conditionTopLevel.png (20.03 KiB) Viewed 2949 times
If we had a <key>.FilePath metadata on the top level documents, we could count the amount of / separators by using the StringSplitter app: https://www.enfocus.com/en/appstore/pro ... ngsplitter

Another approach is to inject only the top level pdfs in your preflight flow. You can do this with another app, Inject Wildcard
https://www.enfocus.com/en/appstore/pro ... t-wildcard
Laurent De Wilde, Solution Architect @ Enfocus
RunDontStop
Member
Posts: 51
Joined: Mon Apr 05, 2021 8:03 pm

Re: Assemble Job after Job Dismantler

Post by RunDontStop »

Thank you this was very helpful.
Post Reply