Using file listeners
Use a file listener with a file service to import and process files from another system or that have been created by application users. For example, you can import data that is used to create a work object.
The file listener monitors the file directory. When files that arrive in the directory match the pattern that the file listener is listening for, the listener moves the files into the work_<name of listener>/completed directory and calls the file service. The file service uses a parse rule to open and read the file, evaluate each input record, divide the record into fields, and then write the fields to the clipboard and a service activity processes the data.
After processing the files, the file listener moves the files to either the work_<name of listener>/completed or work_<name of listener> directory depending on whether the files were processed correctly, and how you configured the file listener:
- If the initial processing is successful, the file moves to the work_<name of listener>/completed directory.
- If the initial processing fails, and Recovery is enabled, the
file listener repeats the processing the number of times specified in the Max
recovery attempts field. The file moves to the
Completeddirectory regardless of whether the retried processing is successful.
- If the initial processing fails and Recovery is disabled, the
file moves to the
The file listener also creates a work_<name of listener>/reports directory to hold report files that contain the processing results, if the file listener is configured to generate reports. For more information, see Configuring file listener processing.
File listener restart after Service File rule changes
Any change to the Service File rule requires that you restart the listener from Admin Studio for the changes to take effect. For more information, see Restarting a listener.
The following topics describe how to use a file listener to import and process files from another system.
- Where, when, and whether file listeners start
- Creating a file listener
- Configuring file listener processing
- File listener error handling and debugging
- Best practices for processing files using the file listener
- Troubleshooting file listeners
- Configuring a file service and file listener to process data in files
- Parse Delimited rules
- Parse structured rules
- Map Structured rules