Advanced Validation workflow components

Advanced Validation workflow components

This is the list of advanced validation document workflow components:

 

1.Rule-based validation report to log.

2.Rule-based validation report to text attachment.

3.Rule-based validation report to XML attachment.

4.Rule-based XML validation.

5.Validate XML against XSD.

 

 

In short there are two validation options:

 

Rule-based XML validation

This component can validate an XML document using rules from a Schematron file.

The Schematron file must be uploaded to the library under "validation rules" with the file extension .sch.

The overall result of the validation will be written to the workflow variable "RuleValidationOutcome". If the document was valid, then the value of this variable will be "SUCCESS". When inserting the validation component in the workflow, a "Choice" component is automatically inserted after it. This choice will check the value of the outcome variable. If the validation was successful, then the "when" branch will be selected, if the XML is found to be invalid, then then the "otherwise" branch will be selected.

The detailed result of the validation will be written to the workflow variable "RuleValidationReport" as an XML document in "Schematron Validation Report Language" format.

The following components can be used to further process the report output (typically on the "otherwise" branch of the choice component, as part of the error handling):

 

 Rule-Based Validation Report to XML Attachment: The XML report is turned into an attachment, so that it may be included in an e-mail

 Rule-Based Validation Report to Text Attachment: The XML report is transformed into a simple plain text attachment, which can then be included in an e-mail.

 Rule-Based Validation Report to Log: The validation report is written to the system log with ERROR log level.

 

Performance note: The Schematron files that are used in a workflow will be compiled to XSL when InterFormNG is started (or when the workflow is created). In case of large Schematron files it may take some time before the workflow is fully loaded.

 

An example of rule based, schematron validation is found here.

 

 

 

Validate XML against XSD

This component can validate an XML file against an schema definition (XSD). This component takes XML as input.

The XSD to validate against is selected as an attribute. The XSD can placed in the "transform" folder in the library. An XSD file in the library is allowed to include other XSD files that are also in the library, using relative paths (just like in a normal file system).

The component throws an exception if the validation fails. This exception can be handled by an error workflow.

    • Related Articles

    • Advanced workflow components

      The list below contains the groups of the advanced workflow components: 1.Output 2.Utilities 3.Converter 4.Email tool 5.Debugging 6.Special 7.Set meta data 8.Other 9.Create document 10. Validation
    • Advanced Special workflow components

      The advanced special workflow components are: 1.Delayed email cancel key. Use this component to set a unique value for the cancel key for a delayed email. 2.Enrich XML from database. This can be used for adding data found in an external database into ...
    • Advanced Debugging workflow components

      The advanced debugging workflow components are: 1.Debug headers. This component outputs all meta data keys into the debug log. 2.Delay 30 seconds. This component delays the current workflow with 30 seconds.
    • Overview of the Advanced Workflow Components

      Overview of the Advanced utilities components The advanced utilities workflow components are: Append to zip archive. Appends the payload to a zip file. The zip file will be created, if the referenced zip file does not exist Attachment to payload. ...
    • Advanced Converter workflow components

      The advanced converter workflow components are these: 1.Change payload encoding. Changes the encoding of the payload in the current workflow. 2.Split XML. Splits up the XML in the payload and executes the sub workflow for each new XML. 3.XSL ...