MarcomProcessJobTicket

This workflow and the MarcomProcessOrders workflow demonstrate how to exchange data with the MarcomCentral web site using SOAP web services. The demonstration includes a SOAP web service input device and a SOAP web service notification.

The MarcomProcessJobTicket workflow receives child jobs from the CreateJobsFromXML step in the MarcomProcessOrders workflow.

The SetJobPropsFromTextFile step sends the child jobs to the DetectInputDataStream step, which sets the data stream to XML.

The ApplyXSLTransform step uses the jobticketToOverrides.xslt XSLT style sheet to convert 10 XML elements into 10 RICOH ProcessDirector job properties in an overrides file.

The table lists the job properties in the order that they are specified in the XSLT style sheet and appear in the overrides file.

XML element Database name of job property User interface name of job property
OrderDetails/OrderDetail/OrderID Job.Marcom.OrderId MarcomCentral order ID
OrderDetails/OrderDetail/SKUDescription Job.Info.Attr1 Custom 1
OrderDetails/OrderDetail/SKU/ID Job.Info.Attr4 Custom 4
OrderDetails/OrderDetail/ProductType Job.Marcom.ProductType MarcomCentral product type
FinalOutputFileURL/URL Job.Info.Attr3 Custom 3
floor(OrderDetails/OrderDetail/Quantity) Job.Copies Job copies requested
floor($var2_current/OrderDetails/OrderDetail/ID) Job.Marcom.JobTicketId MarcomCentral job ticket ID
OrderDetails/OrderDetail/ProductName Job.Name Job name
OrderDetails/OrderDetail/ProductDescription Job.Description Job description
OrderDetails/OrderDetail/Shipping/Method Job.Info.Attr2 Custom 2

The rule on the [1] No SKU Details connector checks whether the job has a stock-keeping unit (SKU).

  • If the value of the Custom 4 (SKU ID) property is not SKU13933967 or SKU15302443, the workflow sends the job directly to the ContinueToNextStep step.
      Note:
    • These 2 SKU IDs match the sample SKU files provided with the sample workflows. When you set up RICOH ProcessDirector to communicate with MarcomCentral, you decide how you want to store information about the items in an order.
  • If the value is SKU13933967 or SKU15302443, the workflow sends the job to the ApplyXSLTransform2 step to process the SKU information.

    The ApplyXSLTransform2 step uses the skuToOverrides.xslt XSLT style sheet to convert 3 XML elements into 3 RICOH ProcessDirector job properties.

    The table lists the job properties in the order that they are specified in the XSLT style sheet and appear in the overrides file.

    XML element Database name of job property User interface name of job property
    Media Job.Media Media
    Duplex Job.Duplex Duplex
    Package Job.Info.Attr5 Custom 5

    The step puts the values in an overrides file, and overwrites the overrides file in the spool directory for the job with the new overrides file.

When the job arrives at the ContinueToNextStep step, the rule on the [1] Warehouse connector checks the value of MarcomCentral product type property. Versioned, Variable, and JobDirect are product types for printable items.

  • If the item does not have a printable product type, the workflow sends the job through the Warehouse branch.
  • If the item has a printable product type, the workflow sends the job through the Print Shop branch.

The printable child jobs go through these steps and connectors in the Print Shop branch of the workflow:

  • When the job arrives at the second ContinueToNextStep step, the rule on the [1] File ready connector checks whether the Custom 3 (URL of download file) property is set to a value.
    • If it is, the print file is ready to download. The workflow sends the job directly to the DownloadFile step.
    • If it is not, the rule on the [2] Check for file connector checks whether the value of the Custom count 1 job property is less than 10. The first time that the job arrives at the second ContinueToNextStep step, the value of the Custom count 1 property is 0.
      • If the value is 0 through 9, the workflow sends the job to the Wait step, which waits for 30 seconds. The workflow then sends the job to the CallSOAPService step.

        The CallSOAPService step simulates a call to a MarcomCentral web service, and it retrieves a job ticket for a printable item.

        The ApplyXSLTransform2 step uses the downloadOverrides.xslt XSLT style sheet to convert the XML element for the URL of the download file into the Custom 3 job property. The step puts the value in an overrides file, and overwrites the overrides file in the spool directory for the job with the new overrides file.

        The RunExternalProgram step runs a Java utility that increments the value of the Custom count 1 property by 1. The workflow then sends the job back to the second ContinueToNextStep step, which sends the job through the Wait step to the CallSOAPService step. The CallSOAPService step repeats the call to the MarcomCentral web service that retrieves a job ticket for a printable item. If the Custom 3 property still does not have a value for the URL, the workflow sends the job through the CallSOAPService step up to 9 times.

      • If the value is 10, the job has been sent to the CallSOAPService step 10 times. After 5 minutes, the Custom 3 property still does not have a value for the file to download. The job does not meet the rule on the [2] Check for file connector. The workflow sends the job through the [3] Timeout connector to the FailWithMesssage step and writes a failure message to the job log. The message states: File was not available to download in the time allowed.

          Note:
        • Because the message is a job property, it appears on the Information tab of the job property notebook for all jobs that go through the workflow. The message appears in the job log only when the workflow sends the job through the [3] Timeout connector to the FailWithMesssage step.

  • The DownloadFile step downloads the PDF file for the printable child job.
  • The OptimizePDF, CountPages, CreatePageRanges, and PrintJobs steps process and print the job on the Sample printer.

The non-printable child jobs go through this step in the Warehouse branch of the workflow:

  • The ManualStepWithAutoStart step waits for the warehouse staff to indicate that the job is ready to ship.

The WaitForRelatedJobs step holds the parent job and each of the child jobs until all the child jobs arrive at the step.

When all the child jobs for the order arrive at the WaitForRelatedJobs step, the workflow sends the parent and child jobs to the RetainCompletedJobs step.

Phases and steps

The illustrations below show the sample workflow as a series of phases.

Receive and Prepare

Print and Complete