B2B Integration 10.4 | Administering and Monitoring B2B Transactions | Integration Server Administrator's Guide | Configuring Ports | About File Polling Ports | Adding a File Polling Port
 
Adding a File Polling Port
Use the following procedure to add a file polling port to Integration Server.
* To add a file polling port
1. Open Integration Server Administrator if it is not already open.
2. In the Security menu of the Navigation panel, click Ports.
3. Click Add Port.
4. In the Add Port area of the screen, select webMethods /FilePolling.
5. Click Submit. Integration Server Administrator displays a screen requesting information about the port.
6. Under Package, enter the following information:
For this parameter...
Specify...
Package Name
The package associated with this port.
When you enable the package, the server enables the port. When you disable the package, the server disables the port. If you are performing special file handling, specify the package that contains the services that perform that processing. If you want to process flat files from this port, select WmFlatFile, which contains built-in services you can use to process flat files.
Note: If you replicate this package, whether to a server on the same machine or a server on a separate machine, a file polling port with the same settings is created on the target server. If a file polling port already exists on the target server, its settings remain intact. If the original and target servers reside on the same machine, they will share the same monitoring directory. If the target server resides on another machine, by default, another monitoring directory will be created on the target server's machine.
Alias
An alias for the port that is unique for this Integration Server. An alias must be between 1 and 255 characters in length and include one or more of the following: letters (a -z, A-Z), numbers (0-9), underscore (_), period (.), and hyphen (-).
Description
A description of the port.
7. Under Polling Information, enter the following information:
For this parameter...
Specify...
Monitoring Directory
Directory on Integration Server that you want to monitor for files.
Working Directory (optional)
Directory on Integration Server to which the server should move files for processing after they have been identified in the Monitoring Directory. Files must meet age and file name requirements before being moved to the Working Directory. The default sub-directory, MonitoringDirectory \..\Work, is automatically created if no directory is specified.\
Completion Directory (optional)
Directory on Integration Server to which you want files moved when processing is completed in the Monitoring Directory or Working Directory. The default sub-directory, MonitoringDirectory \..\Done, is automatically created if no directory is specified.
Note: Integration Server will not move a processed file from the Working Directory to the Completion Directory if the processed file has the same name as a file that already exists in the Completed Directory. To ensure that file names are unique, you can instruct Integration Server to append a time stamp to a file before moving it to the Completion Directory. To do this, update the properties.cnf file to include appendTimeStampToFileName=true.
The properties.cnf file is located here: Integration Server_directory \instances\instanceName\packages\WmFlatFile\config
If the properties.cnf file does not exist, create it.
Error Directory (optional)
Directory on Integration Server to which you want files moved when processing fails. The default sub-directory, MonitoringDirectory \..\Error, is automatically created if no directory is specified.
File Name Filter (optional)
The file name filter for files in the Monitoring Directory. Integration Server only processes files that meet the filter requirements. If you do not specify this field, all files will be polled. You can specify pattern matching in this field.
File Age (optional)
The minimum age (in seconds) at which a file in the Monitoring Directory can be processed. Integration Server determines file age based on when the file was last modified on the monitoring directory. You can adjust this age as needed to make sure the server does not process a file before the entire file has been copied to the Monitoring Directory. The default is 0.
Content Type
Content type to use for the file. The server uses the content handler associated with the content type specified in this field. If no value is specified, Integration Server performs MIME mapping based on the file extension.
Note: When the content type is XML, the flat file parser uses the default encoding. To override the default encoding, update the properties.cnf file to include filepollingport=encodingType where encodingType is the encoding that you want the flat file parser to use for parsing XML files.
The properties.cnf file is located here: Integration Server_directory \instances\instanceName\packages\WmFlatFile\config
If the properties.cnf file does not exist, create it.
Allow Recursive Polling
Whether Integration Server is to poll all sub-directories in the Monitoring Directory. Select Yes or No.
Enable Clustering
Whether Integration Server should allow clustering in the Monitoring Directory. Select Yes or No.
Lock File Extension (optional)
Defines the polling for a particular extension. The default is lock.
Number of files to process per interval (optional)
Specifies the maximum number of files that the file polling listener can process per interval. When you specify a positive integer, the file polling listener processes only that number of files from the monitoring directory. Any files that remain in the monitoring directory will be processed during subsequent intervals. If no value is specified, the listener processes all of the files in the monitoring directory. The default is -1.
8. Under Security, in the Run services as user parameter, specify the user name you want to use to run the services assigned to the file polling directory. Click search icon to lookup and select a user. The user can be an internal or external user.
9. Under Message Processing, supply the following information:
For this parameter...
Specify...
Enable
Whether to enable (Yes) or disable (No) this file polling port.
Processing Service
Name of the service you want Integration Server to execute for polled files. The server executes this service when the file has been copied to the Working directory. This service should be the only service available from this port.
Important: If you change the processing service for a file polling port, you must also change the list of services available from this port to contain just the new service. See below for more information.
File Polling Interval
How often (in seconds) you want Integration Server to poll the Monitoring Directory for files.
Log Only When Directory Availability Changes
If you select No (the default), the listener will log a message every time the monitoring directory is unavailable.
If you select Yes, the listener will log a message in either of the following cases:
*The directory was available during the last polling attempt but not available during the current attempt
*The directory was not available during the last polling attempt but is available during the current attempt
Directories are an NFS Mounted File System
For use on a UNIX system where the monitoring directory, working directory, completion directory, and/or error directory are network drives mounted on the local file system.
If you select No (the default), the listener will call the Java File.renameTo() method to move the files from the monitoring directory to the working directory, and from the working directory to the completion and/or error directory.
If you select Yes, the listener will first call the Java File.renameTo() method to move the files from the monitoring directory. If this method fails, the listener will then copy the files from the monitoring directory to the working directory and delete the files from the monitoring directory. This operation will fail if either the copy action or the delete action fails. The same behavior applies when moving files from the working directory to the completion and/or error directory.
Cleanup Service (Optional)
The name of the service that you want to use to clean up the directories specified under Polling Information.
Cleanup At Startup
Whether to clean up files that are located in the Completion Directory and Error Directory when the file polling port is started.
Cleanup File Age (Optional)
The number of days to wait before deleting processed files from your directories. The default is 7 days.
Cleanup Interval (Optional)
How often (in hours) you want Integration Server to check the processed files for cleanup. The default is 24 hours
Maximum Number of Invocation Threads
The number of threads you want Integration Server to use for a port. You can specify a value between 1 and 10, inclusive.
10. Click Save Changes.
11. Make sure the port's access mode is properly set and that the file processing service is the only service accessible from the port.
a. In the Ports screen, click Edit in the Access Mode field for the port you just created.
b. Click Set Access Mode to Deny by Default.
c. Click Add Folders and Services to Allow List.
d. Type the name of the processing service for this port in the text box under Enter one folder or service per line.
e. Remove any other services from the allow list.
f. Click Save Additions.
Note: If you change the processing service for a file polling port, remember to change the Allow List for the port as well. Follow the procedure described above to alter the allowed service list.

Copyright © 2016- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release