You can use the import folder mechanism to submit a XML file which contains the overall order information and multiple line-items. Each line-item in the order represents a separate job for PRISMAdirect. Sometimes, the web shops can deliver such XML files with multiple line-items.
The XML in this chapter describes an order consisting of multiple jobs. This example is used to explain how such an XML can be handled by PRISMAdirect.
The example contains a working XSL style sheet. Note that this chapter is meant as an explanation of this multi-job order concept. It is not an explanation of how to write XSL style sheets.
Click https://supportfiles.cpp.canon/trm/PRISMAdirect_1.7.1_MJO_extension.zip to download the example describing the usage of the multi-job order feature.
You can see a XML structure example containing multiple line-items:
<Order> <OrderNumber>126</OrderNumber> <OrderStatus>Processing</OrderStatus> <OrderDate>2020-03-06 16:21</OrderDate> <Order....></........> <........></........> <OrderLineItems> <OrderLineItem> <Line_Id>1</Line_Id> <Name>Big Sales Flyer</Name> <Qty>...</........> <........></........> </OrderLineItem> <OrderLineItem> <Line_Id>2</Line_Id> <Name>XML for Dummies</Name> <Qty>...</........> <........></........> </OrderLineItem> <OrderLineItem> <Line_Id>N</Line_Id> <Name>...</Name> <Qty>...</........> <........></........> </OrderLineItem> </OrderLineItems> </Order>
You can convert the whole XML into one JDF with separate sections for order information and sections of information about each job (line-item).
An unique line item id or number must be present within all line items.
The extension made within PRISMAdirect is that you can tag the Order and Job parts. The XSLT will have the following simplified structure with a loop to walk over the line items array:
<xsl:stylesheet version="2.0"> <Order> <JDF> Order JDF ticket </JDF> </Order> <xsl:for-each select="OrderLineItems/OrderLineItem"> <Job> <JDF> Job JDF Ticket </JDF> </Job> </xsl:for-each> </xsl:stylesheet>
After the transformation one internal JDF file is created with all order and job tags included.
This is the simplified structure of the JDF file:
<Order> <JDF> <Comment Name="oce:JobList">1,2</Comment> <ResourcePool> <NodeInfo ID="rNodeInfo1" Class="Parameter" Status="Available"/> <Contact Class="Parameter" ContactTypes="Customer" ID="rContactID" Status="Available" UserID="john.doe"> <Person FamilyName="Doe" FirstName="John"/> <ComChannel ChannelType="Phone" Locator="1234567890"/> <ComChannel ChannelType="Email" Locator="john.doe@somewhere.com"/> </Contact> <Contact .... </Contact> <CustomerInfo ... <ContactRef rRef="rContactID"/> </CustomerInfo> ... </JDF> </Order> <Job> <JDF ID="1"> <ResourcePool> <NodeInfo ID="rNodeInfo1" Class="Parameter" Status="Available"> <GeneralID IDUsage="ProductName" IDValue="Big Sales Flyer"/> </NodeInfo> <RunList ID="rRunList1" Status="Available" Class="Parameter"> <LayoutElementRef rRef="rLayoutElementID"/> </RunList> <Media ID="rMedia1" Class="Consumable" Status="Available" DescriptiveName="A4 White 300grs"/> <LayoutElement ID="rLayoutElementID" Status="Available" Class="Parameter"> <FileSpec UserFileName="Big Sales Flyer.pdf"/> </LayoutElement> <LayoutPreparationParams .../> <DigitalPrintingParams .../> ... </JDF> </Job> <Job> <JDF ID="2"> <ResourcePool> <NodeInfo ID="rNodeInfo1" Class="Parameter" Status="Available"> <GeneralID IDUsage="ProductName" IDValue="Calendar"/> </NodeInfo> <RunList ID="rRunList1" Status="Available" Class="Parameter"> <LayoutElementRef rRef="rLayoutElementID"/> </RunList> <Media ID="rMedia1" Class="Consumable" Status="Available" DescriptiveName="A4 White 120grs"/> <LayoutElement ID="rLayoutElementID" Status="Available" Class="Parameter"> <FileSpec UserFileName="Calendar.pdf"/> </LayoutElement> <LayoutPreparationParams .../> <DigitalPrintingParams .../> ... </JDF> </Job>
That complete translated file is then converted by the import service into separate order and job parts. These separate parts are imported by PRISMAdirect and will result in a multi-job order.
When an XML is placed in the import folder, the first step is to apply the XSLTXSLT and then proceed with the import. So the settings for this example are similar to when a multi-job order is placed in separate JDF parts:
"JDF tickets for order with multiple jobs" must be set as the import order type.