About this task
The following two simple examples demonstrate how a file is delivered using the overwrite and append methods.
- Overwrite delivery method.
- Append delivery method.
Overwrite Delivery Method
- Delivery Object: FTPobj
- Method: Overwrite any existing files
- Delivery filename: FinalDestinationFileName.txt
The content of the file to be delivered is as follows.
101 <DestinationFilename name=???FinalDestinationFileName.txt???/>
|
Data
|
Procedure
-
This file is saved as OutputDocument1.
-
OutputDocument1 is copied to the \Project\DocumentDelivery\FTPobj directory.
-
The directory scanner:
-
Finds OutputDocument1.
-
Adds the name of this file to a preliminary list.
-
Goes back to scanning.
-
FTPobj:
-
Monitors the preliminary list
- (When a file appears) creates a file, OutputDocument1, in the \Project\DocumentDelivery\FTPobj\Work directory.
OutputDocument1 is the original file with the header stripped out.
The content of the file is Data
-
Checks the remote location to see if the file FinalDestinationFileName.txt exists in the configured remote directory.
-
Delivers the existing OutputDocument1 document
From the \ProjectDocumentDelivery\FTPobj\Work directory
To the remote file DDTEMP_FinalDestinationFileName.txt.
-
If FinalDestinationFileName.txt is found on the remote system, that file is deleted.
-
DDTEMP_FinalDestinationFileName.txt is renamed to FinalDestinationFileName.txt. ??
-
The delivery is complete.
Append Delivery Method
Delivery Object
|
FTPobj
|
Method
|
Append existing files
|
Delivery filename
|
FinalDestinationFileName.txt
|
The content of the file is as follows.
101 <DestinationFilename name=???FinalDestinationFileName.txt???/>
|
Data
|
-
This file is saved as OutputDocument2.
-
OutputDocument2 is copied to the \Project\DocumentDelivery\FTPobj directory.
-
The directory scanner:
-
Finds OutputDocument2.
-
Adds the name of this file to a preliminary list.
-
Goes back to scanning.
-
FTPobj:
-
Monitors the preliminary list.
- (When a file appears) creates a file, OutputDocument2, in the \Project\DocumentDelivery\FTPobj\Work directory.
OutputDocument2 is the original file with the header stripped out.
The content of the file is More Data.
-
Checks the remote location to see if the file FinalDestinationFileName.txt exists in the configured remote directory.
-
Finds the file that was just delivered using the Overwrite method.
-
Retrieves the remote FinalDestinationFileName.txt from the remote system.
- Copies the remote file to a file DDTEMP_FinalDestinationFileName.txt in the \Project\DocumentDelivery\FTPobj\Work directory.
- (In the \Project\DocumentDelivery\FTPobj\Work directory) copies the contents of OutputDocument2 to the end of the DDTEMP_FinalDestinationFileName.txt file.
The content of the file is Data More Data.
-
Delivers the DDTEMP_FinalDestinationFileName.txt file
From the \ProjectDocumentDelivery\FTPobj\Work directory
To the remote file DDTEMP_FinalDestinationFileName.txt.
-
The current FinalDestinationFileName.txt file on the remote machine is deleted.
-
DDTEMP_FinalDestinationFileName.txt is renamed to FinalDestinationFileName.txt.
-
he delivery is complete.