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 and when files match the pattern that the file listener is listening for arrive, the listener moves the files into the work_<name of listener> 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> subdirectory 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
Retries 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.
Listener restart after Email service rule changes
Any change to the Service Email rule on the Service tab, Request tab, or Response tab requires that you restart the listener from Admin Studio for the changes to take effect.
The following topics describe how to use a file listener to import and process files from another system.