Running the Order Management sample workflows
This simulation uses these objects and files:
- Workflows:
- OrderJobSample
- OrderSample
- Order property mapping: OrderXMLSample
- Input device: OrderHotFolder
The input device has a pre-loaded sample order file. It submits the sample file to the OrderSample workflow for processing.
To run the Order Management sample workflows:
- Click the Main tab.
- In the Printers portlet, right-click the Sample printer and select Enable.
- In the Input Devices portlet, right-click the OrderHotFolder input device and select Enable and Connect.
A job named order.xml appears in the Jobs portlet.
- The
order.xml
job goes through the OrderSample workflow to create one order and two jobs.The job contains the sample XML file used for identifying and mapping the orders and jobs based on a property mapping object.The CreateOrdersFromFile step uses the OrderXMLSample property mapping object to identify orders and jobs, then map the values of the XML elements in the XML order file to order and job properties.
The table lists the properties that are set:
XML element (XPath expression) Object type Property /Orders/Order/ID
Order Order name (Order.name) /Orders/Order/OrderNumber
Order External order reference (Order.Reference) /Orders/Order/Customer
Order Customer name (Order.Customer) /Orders/Order/Notes
Order Description (Order.Description) /Orders/Order/quantity
Order Copies (Order.Copies) /Orders/Order/DueDate
Order Due date (Order.DueDate /Orders/Order/OrderDetails/OrderDetail/ID
Job Job name (Job.Name) /Orders/Order/OrderDetails/OrderDetail/OrderType
Job Custom 1 (Job.Info.Attr1) /Orders/Order/OrderDetails/OrderDetail/ProductName
Job Custom 2 (Job.Info.Attr2) /Orders/Order/OrderDetails/OrderDetail/PrintFile
Job Custom 3 (Job.Info.Attr3) /Orders/Order/OrderDetails/OrderDetail/PrintFile/@type
Job Media (Job.Media) The step identifies one order with two jobs in it. It creates two jobs and submits the jobs to the OrderJobSample workflow. The Orders table displays one order containing two jobs.
The jobs start processing in the OrderJobSample workflow. When the jobs leave the SetJobPropsFromTextFile step:
- If the item has a printable product type, the workflow sends the job through the Print Shop branch.
- If the item does not have a printable product type, the workflow sends the job through the Warehouse branch.
Non-printable jobs go through the ManualStepWithAutoStart step in the Warehouse branch of the workflow. The jobs wait in that step until the jobs are ready to ship.
The WaitForRelatedJobs step holds each job contained in the order until all jobs from the order arrive at the step.
- In the jobs table, right-click the job in Manual phase and select Manual Complete.
The job moves to the WaitForRelatedJobs step.
When both jobs reach the WaitForRelatedJobs step, the workflow sends all three jobs (the original order job, the non-printable job, and the printable job) to the RetainCompletedJobs step. The state of each job changes to Retained. The state of the order changes to Complete.
- In the Jobs table, right-click the printable job and select View.The viewer displays the PDF file that was printed as part of the order.