Publication Service - Processing Tab

The Processing tab contains the Processing and Operation for Processing Script panels. Check the listed fields in each panel.

Processing

The Processing panel contains the following fields:
Field Description
Working Directory Publication Service uses this directory to process files that match the criteria. Based on the option selected in the Post Processing field, the file is either copied or moved into this directory.

If you select Leave as is from the Post Processing list, the file is copied. If you select Delete or Move to, the file is deleted or moved.

Note: For adapter configurations, if the files processed by Publication Service are independent of each other, Publication Service can share the input, working, completion, and error directories. Otherwise, these directories must be unique.
Completion Directory This field is available only when you select Move to from the Post Processing list. After the file in the working directory is processed, the file is moved to this directory.
Error Directory When you use Simple File Transfer mode, this field is mandatory. When you use Record Transfer mode, this field is not mandatory. However, if specified, an XML file containing the name of the input file and the error details is created in this directory.

For details about the usage and contents of this directory, see Error Handling.

Progress Directory The directory where the progress file is written to. It applies to both Record and Simple File transfer modes. If no directory is specified in this field, the progress file is created in the directory where the adapter is started.
Post Processing An action to be applied to the file that is currently in the working directory after Publication Service has finished processing the file. The following list describes the available postprocessing actions:
  • Move to

    Moves a file from the working directory to the completion directory.

  • Delete

    Deletes a file from the working directory.

  • Leave as is

    Deletes a file from the working directory (since files in the working directory are copies). The corresponding file in the input directory is left as it is.

Add TimeStamp to File Name With this option, you can append the date and time of a file that is moved to the completion directory. The format of the date and time is YYYYMMDDHHMMSSmm.

Operation for Processing Script

The Operation for Processing Script panel contains the following fields:

Field Description
Pre Processing Script File The name of the script that is executed before the input file can be processed by the adapter. You can process the input file before it is processed by the adapter. Click Browse to locate and load the script file.
Pre Processing Arguments The arguments passed to the preprocessing script file. Arguments are strings and are optional.

The command line syntax of the arguments that is passed to the script is: Script_filename Pre Processing Arguments

For example,

script.tcl inputFile0364.txt argument1 argument2 ...

where

script.tcl is the script filename

inputFile0364.txt is the name of the reprocessed file

argument1 is the first argument, and is followed by other arguments.

The preprocessing script file reads the input file, renames the file, makes required modifications, and writes to the original filename.

If five files are in the input directory, the adapter runs the script five times, once for each file. The adapter processes the files in ascending order based on their names. The adapter sorts the files according to their names alphanumerically in ascending order. It is case sensitive, and the upper case is followed by the lower case.

For example, if the following files exist in the input directory:
1.csv
11.csv
111a.csv
22.csv
11a.csv
11b.csv
22b.csv
The adapter processes the files in the following order:
1.csv
11.csv
111a.csv
11a.csv
11b.csv
22.csv
22b.csv

During preprocessing, when the preprocessing script finds the file unsuitable for processing, the adapter does not process the file. The adapter logs feedback from the preprocessing script.

Post Processing Script File The name of the script that is executed after the input file is processed by the adapter. Click Browse to locate and load the script.
Post Processing Arguments The arguments you want to pass to the postprocessing script. Arguments are strings and are optional. The sequence of arguments passed to the postprocessing script is determined as follows:
  • If the transfer mode is Record Transfer, the argument sequence contains the name of the file, the arguments specified in the postprocessing arguments, and the status. The status succeeds if the publisher processes the file successfully. The status fails if the publisher has problems (for example, parsing) processing the file.
  • If the transfer mode is Simple File Transfer, the argument sequence contains the name of the file and is followed by the arguments specified in the postprocessing arguments.