As with all agents, FTP agents are configured in agentsConfig.xml - its default settings are specified in the <ActionAgent> section and generally do not need to be changed.
FTP agents use the ServiceAgent class and the ftp.xml configuration file, which defines the FTP host address and other FTP settings. Modify this file as needed to suit the environment where it is used.
File format
The <DMSRoot>/apps/<application ID>.ftp.xml file is located in the agent directory in the Admin Server installation environment.
A sample file is displayed below:
<Services> <Service> <ServiceType>FTP</ServiceType> <ServiceStatusUDA>AgentServiceStatus</ServiceStatusUDA> <ServiceResultUDA>AgentServiceResult</ServiceResultUDA> <ServiceSpecificInfo> <FTPHost><HOSTNAME or IP Address></FTPHost> <FTPPort></FTPPort> <FTPUser>anonymous</FTPUser> <FTPPassword></FTPPassword> <FTPType>ASCII</FTPType> <FTPAppend>FALSE</FTPAppend> <FTPDirectory>%%REMOTE_FTP_DIRECTORY%% </FTPDirectory> <FTPFileNames>%%REMOTE_FTP_FILES%%</FTPFileNames> <Documents>%%OUTGOING_FILES%%</Documents> </ServiceSpecificInfo> </Service> </Services>
Note that some tags are used by all agents that use the ServiceAgent class, while others are specific to the FTP agent.
The table below describes the tags:
Item | Description |
---|---|
<ServiceType> | Literal "FTP". If this tag is not specified or the specification is invalid, a process instance error occurs. |
<ServiceStatusUDA> | Name of the UDA that saves the FTP agent activity status. Possible values are: "Done" and "Failed". The FTP agent is not affected if this tag is deleted, but users will no longer be able to check its status. |
<ServiceResultUDA> | Name of the UDA that saves error messages, and is used when the FTP agent sends an exception. The FTP agent is not affected if this tag is deleted but, if the FTP agent fails, users will no longer be able to check for issued errors. |
<FTPHost> | Server name or IP address of the local computer that receives transferred files. The default value is 127.0.0.1 (local computer). If no value or an invalid value is specified, then files are sent to this IP address, provided that the FTP server is usable. |
<FTPPort> | Port used by the FTP server. The default value is 21. If no value is specified, then the default is used. |
<FTPUser> | FTP user transferring files. If an invalid value is specified, then file transfer fails and a process instance error occurs. This tag is specific for FTP agents. |
<FTPPassword> | Password of the FTP user transferring files. |
<FTPType> | Type of file to be transferred. Possible values are: "ASCII" and "BINARY" (default). The FTP agent sends an exception if an invalid value is specified. |
<FTPAppend> | Specifies whether to append the content of the transferred file to a remote file. Possible values are: "TRUE" and "FALSE" (default). The FTP agent sends an exception if an invalid value is specified. |
<FTPDirectory> | UDA that specifies the file transfer target directory (the UDA must contain the relative path in the FTP server). If an invalid directory is specified, a process instance error occurs. |
<FTPFileNames> | UDA that specifies the name of the remote file. For example, if a file called LocalFile.txt is attached to a process instance and the value of the specified REMOTE_FTP_FILES UDA is "RemoteFile.txt", then LocalFile.txt is sent to the FTP directory and its filename is changed to RemoteFile.txt. Separate multiple filenames by semicolons (;). If the specified UDA does not contain a filename, then the original filename is used. |
<Documents> | UDA that specifies the files to be transferred to the FTP directory. Separate OUTGOING_FILES multiple filenames by semicolons (;) If the specified UDA does not contain a filename, then all files attached to the process instance are transferred. |
Note
Files that have a semicolon (;) included in the filename cannot be transferred to the FTP directory, since it is treated as a delimiter between filenames.