Configuring the Protocol Check Pipeline

Enabling Protocol check with XNAT

Validate pipeline is a Schematron based pipeline which uses a Schematron rule file, this file specifies the conditions which are to be checked. The pipeline generates an assessor which is specified in protocolValidation.xsd schema. Apart from using XPATH expressions while setting up the rules in the schematron document, one can create custom extension functions in JAVA and invoke these functions. This is similar to custom functions in Pipeline Engine.

Setting up the protocol check pipeline

Site Administrator

Site Administrators should add the pipeline <PIPELINE_HOME>/catalog/validation_tools/Validate.xml with the custom webpage PipelineScreen_protocolcheck.vm

The template file PipelineScreen_protocolcheck.vm is the UI when the user tries to validate using Actions -> Build -> ProtocolCheck.

Project Owners

Each project owner should add the Validate pipeline into their project. If the option Is this pipeline to be launched automatically while archiving? is checked, validate pipeline would be automatically launched on archival. The following steps should be carried out:

  1. Add Validate pipeline into the project using Project Page -> Pipelines -> Add more pipelines -> Select Validate
  2. Create a Schematron rule file for the datatype. A sample rule file for the xnat:mrSessionData is included in <PIPELINE_HOME>/catalog/validation_tools/resources/mrsession_rules.sch
  3. The rule file should be added to the project as a resource. There could be rule files for each of the datatypes in the project eg. MRSessions, PET Sessions etc. The rule files are associated using:

    • Step 1

      XNATRestClient -host HOST -u USERNAME -p PASSWORD -m PUT -remote "/data/archive/projects/YOUR_PROJECT/resources/validation_xnat_mrSessionData"
    • Step 2

      XNATRestClient -host HOST -u USERNAME -p PASSWORD -m PUT -remote "/data/archive/projects/YOUR_PROJECT/resources/validation_xnat_mrSessionData/files?content=DEFAULT" -local PATH_TO_RULE_FILE


  • It is necessary to use the label validation_<DATATYPE> in Step 1 above.
  • The content tag used in Step 2 should be the same as the one used while adding Validate pipeline.

Launching pipeline

Once the Validation pipeline is setup for the project, it can be invoked in the following ways:

  • Automatically on archival - this is possible when the pipeline is setup to be invoked on archival automatically.
  • Launching using Actions -> Build -> ProtocolCheck
  • POSTing to REST URI -> data/archive/projects/YOUR_PROJECT/pipelines/AUTO_ARCHIVE_PROTOCOLCHECK/experiments/SESSION_ID_HERE