We have xml job orders coming into Switch. Switch uses the information in the xml to retrieve the cover and text files from a directory to send to the machine and also creates a job ticket for the digital press operator. Many orders during the day are for the same book, we need Switch to hold jobs until 3pm, be able to group together the orders which require the same book titles, add the quantities together.
It would be great if there is a way to blend all the xml's together with the required quantities adding together, but would be happy with a pdf file with the quantity appended to the file name.
eg.(for the sake of simplicity I will just talk about the text)
Order 89365: ET29_TEXT.pdf (xml has a quantity of 3)
Order 89367: ET29_TEXT.pdf (xml has a quantity of 2)
Order 89374: ET29_TEXT.pdf (xml has a quantity of 10)
Order 89457: ET29_TEXT.pdf (xml has a quantity of 2)
What the press operator would like to see:
ET29_TEXT_TotalQty-17.pdf
We have configurator and metadata modules
Regards
Pat Buckley
Merging multiple orders for same book
-
- Newbie
- Posts: 8
- Joined: Tue Aug 20, 2013 11:52 am
Merging multiple orders for same book
I assume the XML is already attached as a dataset. If not, use the "XML pickup" element to do that. Adding the quantity to the file name can be easily done with the "Rename job" element, "Action" - "Add suffix" - "Single-line text with variables" - "Metadata-Text-Build location path" and find the quantity in the XML structure. The XPath is built automatically. "Insert variable", "OK". Done.
Getting total quantities from multiple XML files will require a script.
Freddy
Getting total quantities from multiple XML files will require a script.
Freddy
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
Merging multiple orders for same book
I've used Switch to create all sorts of XML manipulation and batching logic; however, it almost always requires Scripting module to implement.
XSL/XSLT supports XML merging and can compute the sum but the difficult part would be processing more than one job at once. Switch's built-in XSLT element only works on job files not folders.
XSL/XSLT supports XML merging and can compute the sum but the difficult part would be processing more than one job at once. Switch's built-in XSLT element only works on job files not folders.