Preparing to receive XML

How you receive and process XML files depends on the information in the files and what you want to do with the information.

Before you do these tasks, read the usage scenario and examples for processing orders in an XML file. Those topics give examples for the steps in this topic.

To prepare to receive XML:
  1. Evaluate the XML files that provide input to the process. Make sure that you understand what information the files contain and how the information is organized.

    If possible, ask the XML provider for the XML Schema Definition (XSD).

  2. Decide how to process the XML files in Ricoh ProcessDirector. These step templates manipulate XML:

    • A step based on the CreateJobsFromXML step template creates jobs from elements in an XML file that match an XPath expression. The step submits the jobs to a workflow.
    • A step based on the ApplyXSLTransform step template transforms XML into a file that specifies the values of Ricoh ProcessDirector job or document properties. The step also transforms XML into another XML format.

    You can use steps based on other step templates, such as RunExternalProgram, to manipulate XML files.

  3. To extract values for Ricoh ProcessDirector job and document properties, identify the XML elements and attributes that supply values for the properties.

    • The PDF Document Support feature or AFP Support feature is required to use document properties.
  4. Decide how many CreateJobsFromXML steps are required to process the XML.

    When you create the workflows that process XML files, you decide which workflow receives the new jobs output by each CreateJobsFromXML step. You also decide whether the new jobs are child jobs.

    For example:

    • Your XML file contains multiple orders, and each order contains multiple items. A hot folder input device receives the XML files and processes them with the first workflow.
      A CreateJobsFromXML step in the first workflow creates a job for each order and submits the jobs to a second workflow. That workflow extracts information about the order.

      A CreateJobsFromXML step in the second workflow creates a job for each item in the order and submits them as child jobs to a third workflow. The third workflow processes the item jobs.

    • Your XML file contains a list of book titles and the PDF files required to print each book. A hot folder input device receives requests to print one or more copies of a book on the list and assigns the job to a workflow.
      Using the book title in the request, a CreateJobsFromXML step in the workflow creates an XML job with the PDF files required to print the book. The step submits the job to a second workflow.

      A CreateJobsFromXML step in the second workflow creates an XML job for each PDF file (one for the cover and another for the text). The step submits the jobs as child jobs to a third workflow. The third workflow prints the cover and text jobs.

    • Your XML file contains a list of document properties to add to the document properties file for a print job.
      An ApplyXSLTransform step transforms the XML into a comma-separated values file that the workflow uses as a property conditions file. The workflow does not have a CreateJobsFromXML step.

      A SetDocPropsFromConditions step reads the property conditions file and sets the document properties based on the values supplied in the XML file.

  5. For each CreateJobsFromXML step, define the XPath expression required to create jobs from elements in the XML input file.
    Usually, the workflow that receives jobs from a CreateJobsFromXML step has an ApplyXSLTransform step to transform elements in the XML into Ricoh ProcessDirector job or document properties.
  6. For each ApplyXSLTransform step, use a third-party XSLT tool (such as Altova MapForce) to create an XSLT style sheet.
    • To transform XML elements into Ricoh ProcessDirector job properties in an overrides file, see the sample XSLT style sheet for processing orders in an XML file.
      Make the output file for the ApplyXSLTransform step ${getFileName(overrides,text,write)}.
    • After you install a document processing feature, see the information center topic for adding a step to transform XML elements into Ricoh ProcessDirector document properties.
  7. Decide how to receive XML files for processing.
    You can submit XML files to a hot folder input device or place an XML file at a location where the Ricoh ProcessDirector server retrieves it.

    For example:

    • If your XML file contains multiple orders, and each order contains multiple items, submit the XML files to a hot folder input device.
    • If your XML file contains a list of book titles and the PDF files required to print each book, place the file at a convenient location. Update the file whenever the book titles and print files change.
      When a CreateJobsFromXML step runs, it uses an XPath expression to create an XML job from information in the list.
  8. If you place an XML file at a location from which the Ricoh ProcessDirector server retrieves it, decide how to submit jobs to the workflow.

    One way is to submit an overrides file to a hot folder. The overrides file triggers the hot folder to create a job and submit it to the workflow.

    To use an overrides file as a trigger, set these properties when you define the hot folder:

    • Set the Completion method property to Trigger.
    • Specify the same pattern value for both the Trigger patterns and Overrides patterns properties.
You now have the information, XPath expressions, and XSLT style sheets required to define workflows to process XML.
 
Copyright © 2006, 2018