Running the Order Management sample workflows

The OrderJobSample and OrderSample workflows show how to process orders created from XML input files.

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:

  1. Click the Main tab.
  2. In the Printers portlet, right-click the Sample printer and select Enable.
  3. 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.

  4. 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.

      Note:
    • This step only runs on the primary server. Do not tune it to run on a local secondary server.

    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.

  5. 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.

      Note:
    • You must refresh the Main page to see a change to the jobs state in the Orders table.
  6. 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.