Configuring file listener processing
Configure the processing that the file listener performs when it is running, including how often to check for new files, whether to generate a report, what to do after processing a file, and whether to keep a file after it is processed.
From the Records editor in Dev Studio, click File Listener.
Click the file listener that you want to configure.
Click the Process tab.
In the General section, in the Polling interval (seconds) field, enter the number of seconds that the listener waits before it checks for newly arrived files.
To prevent processing of a file that has the same name as a previously processed file select Ignore duplicate file names.
When a file with a duplicate name is found, the system:
- Bypasses normal processing of the file
- Copies the duplicate input file to the
- Saves the file with .dup as the file extension
Choose one of the following options:
- If your system consists of a single server node or the file listener is set to run on only a single node, clear the Lock listener's temporary file check box.
- To avoid name collisions when multiple copies of the listener are running, select Lock listener's temporary file, which locks the temporary files that the file listener creates. Selecting this option can affect performance.
To process files without content, select Process empty files.
Selecting this option disables the default filtering behavior in which an empty file is not considered as a record for processing.
In the Reporting section, configure processing result reporting:
Select Generate report file? if you want the listener to create a report file in the source directory by using the contents of the specified source property.
Select Persist Log-Service-File instances? to save instances of the Log-Service-File class (which records the processing of a listener) in the Pega Platform database for reporting or debugging.
When this setting is not selected, instances of this class are present in server JVM memory only and are discarded when the server is stopped.
For optimal performance in high-volume production situations, clear this check box after you debug a Service File configuration.
The Reporting section includes the following fields that are populated with default values:
- The Source page name field specifies the name of
a page to hold the report. This page has class
Log-Service-File. The default page name is
LogServiceFile. The pyOriginalDirectory and pyOriginalFileName properties identify the input file.
- The Source property field specifies the property
(on the page identified in the Source page name
field) to report on. The default value is
$XML. If you change the value of this field, the value must be a name of a property of the class Log-Service-File.
- The Target file extension field specifies the file type extension for the report. The default value is .rpt.
In the Idle processing section, configure an activity to run after a file has been processed:
In the Activity class field, select the activity class to run after processing of a file is complete.
In the Activity name field, select the name of the activity to run after processing of a file is complete.
In the Cleanup section, in the File operation field, select whether to keep or delete files after they are successfully processed.
Kept files are moved to the
Completedfolder.Consider total disk space requirements if the input files are large and you select Keep.