The external script basically performs the following steps:
1.It prepares a .procPipe pipeline definition file which specifies the files to be processed.
2.It calls PMOD in pipeline processing mode, providing the .procPipe file as an argument. PMOD acquires a license which has to include all required tools, performs pipeline processing, saves the results, releases the license and exits.
3.The script performs a cleanup removing unneeded files.
The script definition can be based on the RunPmod script located in the Pmod4.1/Start folder from the installation directory. Create a copy of the RunPmod script, name it RunExamplePipeline and edit it as follows:
The RunExamplePipeline script file may look like illustrated below:
rem external preprocessing: include input files in example.procPipe
.\java\jre\bin\java -Xmx8G -jar pmod.jar PIPELINE D:/Pmod4.1/data/pipe/def/example.procPipe
rem external cleanup: remove input files
The external preprocessing is referring to a program created by the user that populates input file entries in the pipeline definition (.procPipe) file.
The external cleanup is referring to a program created by the user that removes processed input files from the in folder.
The following tags have to be updated in the .procPipe file:
An example is illustrated below:
Note: A pipeline template (template.procPipe) can easily be created from an interactively defined pipeline which performs the intended processing. Open the file, remove the PIPE_FILENAME_<num> and the NUMBER_OF_PIPE_FILES lines. The external routine can then simply append the PIPE_FILENAME_<num> and NUMBER_OF_PIPE_FILES lines according to the data for creating the actual .procPipe file for the batch.
Execution Return Codes
There are a few return codes which can be defined to diagnose the execution:
If no license is available, the behavior depends on the processing mode:
•PIPELINE: the standard license dialog is shown and PMOD waits for user interaction;
•PIPELINE_NOGUI: PMOD exits returning code 69.