new Dataset for UngroupJob

Post Reply
User avatar
foxpalace
Member
Posts: 33
Joined: Fri Jan 14, 2011 12:25 pm
Location: Germany

new Dataset for UngroupJob

Post by foxpalace »

Hello,

i have a problem with ungroupjob - i get a folder within pdf-files in a extra folder. so i use ungroupjob to preflight the pdf-files. If the Preflight reports a error, i would like to use a extra html-outputfile with log-information. Now it is clear, that the job can't assemble correct, because i have one (or more) file more as by ungroupjob.

I thought with job.setPrivateData i could create an other Dataset, but thats wrong. With this i can modify my Dataset but i can't create a new one. How can i create a new Dataset, so that i can fill it with job.setPrivateData and my job will assembled with my new file(s)?



For some few infos i would be grateful. Thank you!
reprokaiser
Newbie
Posts: 16
Joined: Mon Apr 04, 2011 3:56 pm

new Dataset for UngroupJob

Post by reprokaiser »

As to my knowledge, your only option is to wait for a set period of time, then assemble the folder.



Since you don't know the resulting file number at the time of ungrouping, you would have to compute it after the preflight. It' not impossible, just you have to feed the resulting value (the count of files) into each files' PrivateData - and this is the big problem. If you fail to enter the SAME value into each file, the group will assemble prematurely, or will assemble only at the orphan timeout.



A workaround would be to route out the preflight reports while ungrouped (then the group will assemble without problems), and feed the reports to the final place of the preflightd PDFs using Set Hierarchy and Archive Hierarchy.



At the time of preflight, you can get the parent folder name from the PrivateData (and it's common for the files to assemble using the same folder name), then you can add this folder name to the hierarchy path of the preflight reports. This way they can be routed into the PDF's folder at the end of the flow.



Hope this helps.



Peter
Evan
Member
Posts: 30
Joined: Mon Feb 28, 2011 6:44 pm

new Dataset for UngroupJob

Post by Evan »

Hi Foxpalace,



I just sent on the new topie or Reprokaiser my script to create a new Dataset. The topic is "How to create a Dataset using a script?"



--

Evan
rzacherl
Member
Posts: 38
Joined: Mon Mar 21, 2011 3:29 pm

new Dataset for UngroupJob

Post by rzacherl »

Hi foxpalace,



the information needed by Job assembler in working mode "Ungrouped job" is not stored in a dataset but in the job file's private metadata section.



According to the Switch online help the property "Number of files" of Job assembler supports the use of the pseudo variable N to control the number of files expected. Normally N stands for the original number of files which were found when ungrouping the job. By using an expression like "N+1" or "N+2" or "2*N" you can tell the flow element that it has to wait for 1 or 2 more files or even twice as much files as within the original job folder.

Here's an excerpt from the online help:



Property "Number of files"



Description:



Displayed when Scheme is Ungrouped job or Custom. The total number of files expected to complete the output job:





Automatic: the same number of files as was present in the original folder before it was ungrouped



Number: a constant integer



Single-line text: a constant integer or a short JavaScript expression in function of the variable "N" (example: "N+2" or "2*N"); this function has NO access to the scripting API



Script expression: a script expression (with full access to the scripting API) that has an integer result; the expression is re-evaluated for each newly arrived job in the context of that job





Regards,



Robert
Post Reply