assemble Job / every n jobs / name of jobs

Post Reply
tz8
Member
Posts: 84
Joined: Mon Aug 13, 2012 12:56 pm

assemble Job / every n jobs / name of jobs

Post by tz8 »

Hi everyone!



Quick question: if i create a new job via 'assemble every n jobs' how can i get the names of the incoming jobs?



job.getName() only gives the name of the first job to assemble...



any hints?



Cheers,



Thorsten
dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

assemble Job / every n jobs / name of jobs

Post by dkelly »

Hello, I've had to write custom scripts to replace the Assemble Jobs configurator because of the same issue. The script uses both jobArrived() and timerFired(), enumerates all of the jobs in the input folder and groups them according to any business logic desired. I've found this method to be dramatically faster and more reliable than Assemble Job.





var incomingJobs = s.getJobs();

var numberOfJobs = incomingJobs.getCount();

for (var i=0; i<numberOfJobs; i++) {

var aJob = incomingJobs.getItem(i);

var jobPath = aJob.getPath();

var jobName = aJob.getName();

}





Dwight Kelly

Apago, Inc.

dkelly@apago.com
tz8
Member
Posts: 84
Joined: Mon Aug 13, 2012 12:56 pm

assemble Job / every n jobs / name of jobs

Post by tz8 »

thx for the info, i in fact already started working on the script anticipating that answer...



is it just me or does the 'assemble job' element need some love from Enfocus? ;)
freddyp
Advanced member
Posts: 1022
Joined: Thu Feb 09, 2012 3:53 pm

assemble Job / every n jobs / name of jobs

Post by freddyp »

Can you share the use case/story why you need to know those names? I will gladly add to it to the feature request list.
tz8
Member
Posts: 84
Joined: Mon Aug 13, 2012 12:56 pm

assemble Job / every n jobs / name of jobs

Post by tz8 »

following case:



i'm getting pdf documents and ready them for imposition, all with the same amount of pages but with a different print count. So i'm reducing the print count to an even number so i can 2up the remaining document. I still need to impose one single file. So i'm copying the incoming job with a new printcount of 1 into a assembling folder, waiting for another of these unlucky documents cut off it's brothers and sisters.



so the original files would be:



calendar_4711_7x.pdf

calendar_4712_6x.pdf

calendar_4713_9x.pdf



the imposed document names for the example above should be something like this:



calendar_4711_4711_6x.pdf

calendar_4712_4712_3x.pdf

calendar_4711_4713_1x.pdf



you see, i'd need the number from the filename (or the metadata) to create the resulting filename. The script expression part for the new filename in the 'assemble jobs' element is nearly useless in it's current state. And scripting to take an incoming job and combine it with another job from the same incoming connection is - to be frank - a pita.



So please have a look at the elements current state ;)
mwinker
Member
Posts: 37
Joined: Wed Dec 22, 2010 2:36 am

assemble Job / every n jobs / name of jobs

Post by mwinker »

tz8 wrote: is it just me or does the 'assemble job' element need some love from Enfocus? ;)


Yes, it is a pretty confusing tool to set up. I use the "custom scheme" for assembly with the jobname proper minus the indexing characters for the job identifier. The part I really don't understand is the "complete condition" part of that element and just what you'd put in that field. I have the assemble delayed a couple of minutes till hopefully all the files arrive before assembly.
Post Reply