CommunicateCorrespondence function

The CommunicateCorrespondence function performs these actions in the following order:

  1. Moves the input correspondence to the Busy status and sets its start time.
  2. Executes the document composition and transforms all Word output to PDF.
  3. Applies the communication rules configured on the system to the correspondence, which results in a set of communications.
  4. Stores the communications in the run-time database.
  5. Moves the input correspondence to the Finished status and sets its finish time.

Parameters

The CommunicateCorrespondence function does not have any input parameters. It searches the run-time database for a correspondence record in the Waiting status. If multiple records are available, they are picked up one by one, but the order is not determined.

Result

If a correspondence is processed successfully, CommunicateCorrespondence returns true. If no correspondence is available, CommunicateCorrespondence returns false.

If an error is encountered, CommunicateCorrespondence moves the input correspondence to the Error status and sets the error time and error message.

It is safe to call CommunicateCorrespondence from different processes simultaneously, even if they process correspondences from the same run-time database.