Jump to content

Repeat a Composition


Recommended Posts



I would like to know if you can repeat an entire composition a number of times using the same data file within one initial composition run?


We have a project to produce 2100 buck-slips with a variable serial number on it for approx. 100 stores. A rather simple project in that there is only 1 item that is variable. The problem being the customer provided us with a data file that has all 100 stores on one spreadsheet - 2100 rows (1 for each serial number) and 100 columns (1 for each store).


Rather than trying to break out the files into 100 separate files (which would take time) and run the file on FusionPro Server in a large batch process I would like to know if there is someway to cause FusionPro (either desktop or server) to repeat the entire composition again with the same data file a specified number of times and then just set an incrementing rule to have FusionPro only look at one column of data for each composition.


i.e. Start the composition on column 1, then when that is finished and the output file is imposed and completed if a counter value is not greater than 100 compose the file again and increment the fieldName counter to look at column two, and so on through columns 3, 4, 5, ... until column 100.


I've tried putting multiple rules for "FusionPro.Composition.inputFileName" in an OnJobStart rule and in an OnJobEnd rule with no effect - the OnJobEnd was just completely ignored while the OnJobStart rule only did the last listed file composition and ignored any prior composition calls in it.


I know that I can break the files out into separate data file, I was just hoping there was a way to have FusionPro do multiple compositions.




Link to comment
Share on other sites

If you're using FusionPro Server, then you can have whatever application is using it simply invoke it multiple times. Since your application is already presumably creating the input and CFG files for FP Server, you can just write whatever value you want as a field value in the input file, or as custom entry in the CFG file, and read it into a JavaScript rule with either the Field function or the FusionPro.Composition.JobOptions object.


I imagine the rule would look something like this:

return Field("Column" + FusionPro.Composition.JobOptions["HKM_ColumnNumber"])

And you would have some kind of logic in your application which sets a counter from 1 to 100 and adds this value as "HKM_ColumnNumber=***" in the CFG file for each invocation of FP Server.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...