Delivery Operation

Review the operation for the:

Output document header evaluation (performed before delivery).

Delivery process.

Delivery conclusion.

  1. Output document header evaluation

A delivery object has a

  1. Watcher thread that is dedicated to watching its directory using completion ports.

When a new file is added to the directory, this thread

  1. Adds the name of the file to the preliminary output document list.

  2. Goes back to monitoring the directory.

  1. Control thread that checks each file in the preliminary list (if there are files) to make sure that it has the required header.

If the file:

Does have a valid header

Document Delivery:

  1. Copies the file without the header into the work directory.

  2. Makes a new entry for the output document list, which contains the name of the:

File.

Destination file.

  1. Places the entry at the end of the list, to ensure that the output documents are processed in sequence.

Does not have the required header

Document Delivery:

  1. Generates an audit message.

  2. Moves the file to the flush directory.

  1. Delivery process

Network or FTP

HTTP

Network or FTP delivery

Network or FTP delivery attempts to deliver the first file in the output document list. The method that is used is defined in the delivery object configuration.

Options are:

Overwrite

Fail On Existing

Append

Overwrite

Document Delivery delivers the file unconditionally.

Destination file does exist

Document Delivery

  1. Delivers the output file to the remote location with the following name.

DDTEMP_<destination file name>

Where

DDTEMP_ denotes a temporary file.

<destination file name> is the name the file will be when it reaches its destination.

  1. Deletes the existing file, if a file exists.

  2. Changes the output file name with the DDTEMP_ prefix to the original destination filename.

Destination file does not exist

  1. Delivers the output file to the remote location with the following name.

DDTEMP_<destination file name>

Where

DDTEMP_ denotes a temporary file.

<destination file name> is the name the file will be when it reaches its destination.

  1. Changes the output file name with the DDTEMP_ prefix to the original destination filename.

Fail On Existing

Checks the remote location to see if the destination file already exists.

Destination file does exist

Document Delivery fails the delivery.

Destination file does not exist

Document Delivery:

  1. Delivers the output file to the remote location with the following name.

DDTEMP_<destination file name>

Where

DDTEMP_ denotes a temporary file.

  1. Changes the output file name with the DDTEMP_ prefix to the original destination filename.

Append

Important: Append only applies to Mapped Network and FTP delivery.

The following happens if the destination file:

Destination file does exist

Document Delivery:

  1. Copies the remote file to the working directory with the following name.

DDTEMP_<destination file name>

Where

DDTEMP_ denotes a temporary file.

  1. Appends the append file with the body of the output document.

  2. Delivers the append file to the remote location with the following name.

 DDTEMP_<destination file name>

Where

DDTEMP_ denotes a temporary file.

  1. Deletes the existing file, if a file exists.

  2. Changes the destination file name with the DDTEMP_ prefix to the original destination filename.

Destination file does not exist

Document Delivery:

  1. Delivers the append file to the remote location with the name of the destination file pre-pended with DDTEMP_.

  2. Changes the destination file name with the DDTEMP_ prefix to the original destination filename.

HTTP delivery

HTTP attempts to deliver the first file in the output document. The method that is used is defined in the delivery object configuration.

Options are:

Overwrite

Fail On Existing

Overwrite

Document Delivery delivers the file unconditionally.

Destination file does exist

Document Delivery overwrites the destination file.

Destination file does not exist

Delivers the file.

Fail On Existing

Document Delivery checks the remote location to see if the destination file already exists.

Destination file does exist

  1. Fails the delivery

  2. Re-attempts the delivery, as configured.

Destination file does not exist

Delivers the file.

  1. Delivery conclusion

The following occurs based on the status of the delivery.

If in during delivery:

Any of the delivery steps are interrupted by an error

Document Delivery stores the status of the delivery so a step does not have to be repeated.

Delivery fails

  1. Document Delivery logs an audit message.

  2. If a retry count has been configured:

Document Delivery:

  1. Attempts the retry after the retry interval has elapsed.

  2. Keeps a count of the number of times this particular delivery has failed.

  3. If the number of failures is greater than the number of configured failures before alarm:

The CIMPLICITY alarm point triggers an alarm.

  1. Document Delivery continues to resend the document until all retries have been attempted.

If the retryCount parameter is set to INFINITE(-1)

Document Delivery will resend the document until it succeeds.

Delivery succeeds

Document Delivery:

  1. Logs an audit message.

  2. Resets all error parameters.

  3. Deletes the output document.

Number of retries has been exceeded

Document Delivery:

  1. Logs an audit message.

  2. Resets all error parameters.

  3. Moves the output document to the flush directory.

Note: There may be occasions when the project has been shut down before all deliveries have occurred. When the project starts up again, the directory notification will not see these files as new, so it will not do a notification.

To solve this issue, an Document Delivery does an initial directory scan to process any unsent output documents. This scan will put output documents on the output document list in the order that they were created; the oldest document is sent out first.

More information

About Document Delivery