Incorrect documents are attached to emails

If incorrect documents are attached to emails in the EmailDocuments step, there are a few items you can check to determine the cause of the problem. There is no validation for matching email addresses with attachments.

Document properties are mapped to pages in the job when the IdentifyPDFDocuments or BuildPDFFromDocuments steps process the job. If the order of pages in the job changes after those steps, the document properties remain mapped to the original page numbers in the job.

For instance, if the job has been processed by the PreparePDFOutputForFinishing or ReversePDFPageOrder step after the IdentifyPDFDocuments or BuildPDFFromDocuments steps and before the EmailDocuments step, the page numbers do not match the document boundaries so the attachments do not contain the correct pages for each email address.

You can correct the problem in one of the following ways:

  • Change the workflow to omit any steps that rearrange the documents before the EmailDocuments step and then process the job again.
  • Add the SnapshotJobFile step to the workflow before any step that reorders the job and then specify the snapshot file in the Source file for attachment property in the EmailDocuments step. The workflow might include these steps in this order:
    • IdentifyPDFDocuments
    • SnapshotJobFile (save that version of the PDF with a name like jobID.original.pdf)
    • PreparePDFOutputForFinishing (or ReversePDFPageOrder)
    • EmailDocuments (and set the Source file for attachment property to ${getFileName(original,pdf,read)}

You cannot correct the problem by including a second IdentifyPDFDocuments or BuildPDFFromDocuments step.
 
Copyright © 2012, 2018