MarcomProcessJobTicket

This workflow and the MarcomProcessOrders workflow demonstrate how to exchange data with the MarcomCentral website. The demonstration includes a SOAP web service input device and a SOAP web service notification, and uses an order property mapping object to create orders and jobs and set properties for them.

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

The SetJobPropsFromTextFile step receives the jobs and passes them to the next step. When the job leaves the SetJobPropsFromTextFile step, the rule on the [1] Warehouse connector checks the value of the 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 Printable branch.

In the Warehouse branch of the workflow, the ManualStepWithAutoStart step waits for the warehouse staff to indicate that the job is ready to ship.

In the Printable branch of the workflow, printable jobs are first processed by the steps in the MarcomDownloadPrintFile step chain:

  • 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 integer 1 job property is less than 10. The first time that the job arrives at the second ContinueToNextStep step, the value of the Custom integer 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 AssignJobValues step increments the value of the Custom integer 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 nine times.

      • If the value is 10, the job has been sent to the CallSOAPService step 10 times. After five 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.

When the job exits the step chain, the OptimizePDF, CountPages, CreatePageRanges, and PrintJobs steps process and print the job on the Sample printer.

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, Prepare, and Assemble

MaromDownloadPrintFile step chain

Print and Complete