Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Current »

Create a rule set that reads an XML file and uses the data in the file to process the job—for example, to add and refine an input file. The new job gets its rule set from a template job.

  1. Create a job named Template.
    This job is the template for new jobs that are created by the rule.
  2. In the template job, create a new rule set.
  3. Start the rule with a Remote Trigger event.
  4. Add the Read XML action, and set the following parameters:

    Parameter

    Setting

    Schema Name

    General > MySchema

    File

    String1

    Validate

    True

    This identifies the XML file passed from the other rule set.
  5. Add the Add Input Files action to the Read XML Success event, and set the following parameters:

    Parameter

    Setting

    UNC File Paths

    XML Data (MySchema) > InputFile

    Job

    XML Data (MySchema) > JobName

  6. Add the Refine Input Files action to the Add Input Files Added event, and set the following parameters:

    Parameter

    Setting

    Input Files

    Input Files

    Process Template path

    Previous Event (XML Parsed OK) > XML Data (MySchema) > ProcessTemplateRefine

  7. Add the Perform Loose Page Output action to the Refine Input File Success event, and set the following parameters:

    Parameter

    Setting

    Pages

    Input Files Refined Successfully > Pages

    Process Template path

    Previous Event (Input File Added) > Previous Event (XML Parsed OK) > XML Data (MySchema) > ProcessTemplateOutput

  8. Add the Email action to the Refine Input File Warn event, and set the following parameters:

    Parameter

    Setting

    To

    Previous Event (Input File Added) > Previous Event (XML Parsed OK) > XML Data (MySchema) > EmailProcessError

    Subject

    Refine failed

    This sends an email message to someone if the refine fails.
  9. Add the Email action to the Perform Loose Page Output Success event, and set the following parameters:

    Parameter

    Setting

    To

    Previous Event (Input File Refined OK) > Previous Event (Input File Added) > Previous Event (XML Parsed OK) > XML Data (MySchema) > EmailProcessError

    Subject

    Output succeeded

    This sends an email message to someone when the output succeeds.
  10. Add the Email action to the Perform Loose Page Output Warn event, and set the following parameters:

    Parameter

    Option

    To

    Previous Event (Input File Refined OK) > Previous Event (Input File Added) > Previous Event (XML Parsed OK) > XML Data (MySchema) > EmailProcessError

    Subject

    Output failed

    This sends an email message to someone if the output fails.
  11. Save the rule set with the name ProcessJob.
  12. Enable the rule set in the Template job.

Note: If you write XML that does not adhere to the schema, Prinergy will fail upon reading the XML file and the information will be shown in the Rule Set Execution History panel with a red cross. The information will also be displayed in the Diagnostics application on the Prinergy server.

  • No labels