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.

  1. From the Records editor in Dev Studio, click File Listener.
  2. Click the file listener that you want to configure.
  3. Click the Process tab.
  4. In the Polling interval (seconds) field, enter the number of seconds that the listener waits before it checks for newly arrived files.
  5. Select Ignore duplicate file names to prevent processing of a file that has the same name as a previously processed file.
    When a file with a duplicate name is found, the system:
    1. Bypasses normal processing of the file
    2. Copies the duplicate input file to the work directory
    3. Saves the file with .dup as the file extension
  6. Choose one of the following options:
    • When a system consists of a single server node or the file listener is set to run on only a single node, clear Lock listener's temporary file.
    • 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.
  7. Select Process empty files when you want to process files without content.
    Selecting this option disables the default filtering behavior in which an empty file is not considered as a record for processing.
  8. Optional: Configure processing result reporting:
    1. In the Source page name field, specify the name of a page to hold the report.
      This page has class Log-Service-File. If the page is blank, the default page name is LogServiceFile. The pyOriginalDirectory and pyOriginalFileName properties identify the input file.
    2. In the Source property field, enter the property (on the page identified in the Source page name field) to report on. Enter the keyword $XML to write an XML representation of the entire page into the report file.
    3. In the Target file extension field, using only alphanumeric characters, enter a file type extension for the report, such as .txt or .rpt.
    4. 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.
    5. 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.

  9. Optional: Configure an activity to run after a file has been processed:
    1. In the Activity class field, select an activity to run after processing of a file is completed.
    2. In the Activity name field, select an activity to run after procesing of a file is completed.
  10. In the File operation field, select whether to keep or delete files after they are successfully processed.
    Kept files are moved to the Completed folder.
    Note: Consider total disk space requirements if the input files are large and you select Keep.