Running the PrintAndMailJob sample workflow

The PrintAndMailJob sample workflow submits a PDF or AFP file for processing by Ricoh ProcessDirector and the Postal Enablement feature. The workflow simulates sending the job to postal processing software to update addresses as needed and to replace a PostNet barcode with a Datamatrix barcode that identifies the job number and document number that can be used to track the progress of the document through other steps in the workflow.

You can review the sample workflow and run a sample job to understand how the feature works.

The sample files provided for use with this workflow are summarized in the table below.

Filename File Location Specified in property Used by Step Description

PostalPDFReplaceAddr.ctl

/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) Build PDF control file 1

BuildPDFFromDocuments

Builds a PDF file with the PostNet barcode replaced by a Datamatrix barcode that identifies the job number and document number. Updates addresses as indicated by the postal software.

PostalPDF.ctl

/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) Identify PDF control file

IdentifyPDFDocuments

Identifies the page groups in the sample PDF print file and defines the data to be extracted in document properties.

postal_doc_print_only.csv

/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) Property conditions file

SetDocPropsFromConditions

Sets the Postal code property based on the Address processing return code from the postal software so that documents that have replacement addresses available can be identified when the print file is generated.

Postal.pdf

/aiw/aiw1/testfiles (AIX and Linux) or C:\aiw\aiw1\testfiles (Windows) Job name  

The sample PDF print file.

Postal.afp

/aiw/aiw1/testfiles (AIX and Linux) or C:\aiw\aiw1\testfiles (Windows) Job name  

The sample AFP print file.

jobid.print_and_mail.csv

/aiw/aiw1/testfiles (AIX and Linux) or C:\aiw\aiw1\testfiles (Windows) Retrieval pattern

RunHotFolderAppplication

A sample external results file from MailPreparer based on processing of the sample print file. Can be used to move the sample job through the RunHotFolderApplication step to simulate the response from postal software.

PostalAFPReplaceAddr.cfg

/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) Enhance AFP control file

BuildAFPFromDocuments

Builds an AFP file with the PostNet barcode replaced by a Datamatrix barcode that identifies the job number and document number. Updates addresses as indicated by the postal software.

PostalAFP.ctl

/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) Visual Workbench control file

IdentifyDocuments

Identifies the page groups in the sample AFP print file and links the index tags in the AFP file with the corresponding document properties.

You can review the properties for each object before you start the procedure to see how they interact.

To run the sample workflow:

  1. Log in as an authorized user.
  2. Copy the PostalFolder input device to create a new hot folder input device.
    1. Click the Administrator tab.
    2. In the left pane, click Devices → Input Devices.
    3. Select the PostalFolder input device and click Actions → Copy.
    4. In the Input device name property, type a name for the hot folder.
    5. In the Child workflow property, select PrintAndMailJob.
    6. In the Folder Location property, update the folder location to a unique filepath.
    7. In the Staging Location property, update the staging location to a unique filepath.
    8. Click OK.
  3. In the Printers portlet, select the Sample printer and click Actions Enable.
  4. In the Input Devices portlet on the Main page, select the newly created hot folder and clickActions → Enable and Connect.
  5. Copy the sample file into the hot folder you created in Step . Navigate to /aiw/aiw1/testfiles (AIX and Linux) or C:\aiw\aiw1\testfiles (Windows), and copy Postal.pdf into the directory that you specified in the Folder location property of the input device.

    The system starts processing the job through the PrintAndMailJob workflow. When the job reaches the RunHotFolderApplication step, it waits for results to come from the postal software. The job state changes to Waiting.

  6. Navigate to/aiw/aiw1/testfiles (AIX and Linux) or C:\aiw\aiw1\testfiles (Windows).
  7. Copy jobid.print_and_mail.csv into /aiw/aiw1/postal/receive (AIX and Linux) or C:\aiw\aiw1\postal\receive (Windows).
  8. Navigate to /aiw/aiw1/postal/receive (AIX and Linux) or C:\aiw\aiw1\postal\receive (Windows) and rename jobid.print_and_mail.csv, replacing jobid with the value of the Job Number property for the sample job. For example, if the Job number for the sample job is 10000067, rename the file to 10000067.print_and_mail.csv.
    The RunHotFolderApplication step picks up the file and the job continues to process through the remaining steps in the workflow.
  9. When the job finishes processing, the State column of the Jobs table changes to Complete.
  10. The job is retained for three days and is deleted.
    Note: The sample workflow uses a sample printer that does not print any data. However, the job file can be viewed as it moves through the workflow, so the barcode updates can be observed. For example, you can view the job while it is waiting in the RunHotFolderApplication step to see the PostNet barcode, then view it in the RetainCompletedJob step to see the Datamatrix barcode.