Integration Server 10.5 | Integration Server Administrator's Guide | Configuring Ports | About File Polling Ports
 
About File Polling Ports
 
Adding a File Polling Port
A file polling port periodically polls a monitoring directory for the arrival of files. Integration Server then runs a special file processing service against the file. A file polling port and processing works in the following way:
1. A file polling port on Integration Server periodically polls a monitoring directory for the arrival of files. Each file polling port polls only one monitoring directory.
2. When it detects a new file, Integration Server moves the file to a working directory. Integration Server renames the file to include a random internal counter which ensures file name uniqueness. The resulting filename in the working directory adheres to the following naming convention: FilePolling.<counter>.<file_Name>
Note:
All files in the working, completion, and error directory follow the above naming convention.
3. Integration Server executes the file processing service specified for the port. The service might parse, convert, and validate the file then write it to the file system. This service, which you write, is the only service that can be invoked through this port.
4. One of the following happens depending on whether or not the service processes the file successfully:
*If processing of file completes successfully, Integration Server moves the file to the completion directory.
*If processing of the file ends with an error, Integration Server moves the file to an error directory.
5. Integration Server cleans up the completion and error directories at a regular interval. You can configure the how old a file must be before it can be removed from the completion or error directories and how frequently Integration Server cleans up the completion and error directories.
Note:
If Integration Server shuts down or becomes unavailable before completing processing of a file in the working directory, the file remains in the working directory after restart. Integration Server will not restart or resume processing of a file left in the working directory. The administrator needs to decide whether or not to move the file from the working directory to the monitoring directory or to delete the file.
In a cluster of Integration Servers or non-clustered group of Integration Servers, file polling works much the same way as it does on an individual Integration Server. The only difference is that more than one Integration Server polls the monitoring directory. Once an Integration Server in a group retrieves a file from the monitoring directory, the file is not available to other Integration Servers in the group.
To configure file polling, you must do the following:
*Set up the Monitoring Directory on Integration Server. Other directories used for file polling are automatically created by Integration Server.
*Write a file processing service and make it available to Integration Server. See webMethods Service Development Help and the Flat File Schema Developer’s Guide for examples of such services.
*Set up the file polling port on Integration Server.