Running the sample workflows for qualified/non-qualified mail
The GroupDocsForPostalProcess workflow collects document data for the postal software, updates the document data based on the output from the postal software, and produces child jobs for each type of mail identified by the postal software. The sample uses results produced by TEC Mailing's MailPreparer software to send documents to two other workflows based on what additional postal processing can be performed to optimize the postal savings.
If the child jobs do not qualify for additional postal processing, they are sent to the PrintForPostalProcess workflow where the PostNet barcode on the original job is removed and a 2D barcode is added for mail piece tracking. Documents classified as Other are sorted by number of sheets and documents classified as Non-qualified are sorted in zip code order but not using postal software.
If the child jobs from GroupDocsForPostalProcess qualify for additional postal processing, the jobs are sent to the ProcessQualifiedDocuments workflow. In the ProcessQualifiedDocuments workflow, the job is processed again by postal software to sort the documents according to postal rules. An Intelligent Mail barcode and a 2D datamatrix barcode is also added to these Qualified documents.
The sample objects used in this workflow include:- Hot folder input device: PostalFolder
- Workflow: GroupDocsForPostalProcess
- Workflow: PrintForPostalProcess
- Workflow: ProcessQualifiedDocuments
The sample files provided for use with these workflows are summarized in the table below.
Filename | File Location | Specified in property | Used by Workflow | Used by Step | Description |
---|---|---|---|---|---|
PostalPDFBuildQualify.ctl |
/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) |
Build PDF control file 1 |
PrintForPostalProcess |
BuildPDFFromDocuments |
Builds a PDF file with the PostNet barcode replaced with a Datamatrix barcode that identifies the job number and document number and adds an Intelligent Mail barcode. |
PostalPDFBuildOther.ctl |
/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) |
Build PDF control file 1 |
PrintForPostalProcess |
BuildPDFFromDocumentsOther |
Builds a PDF file with the PostNet barcode replaced with a Datamatrix barcode that identifies the job number and document number. |
PostalPDFBuildNonQualify.ctl |
/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) |
Build PDF control file 1 |
PrintForPostalProcess |
BuildPDFFromDocumentsNonQualified |
Builds a PDF file with the PostNet barcode replaced with a Datamatrix barcode that identifies the job number and document number. |
PostalPDF.ctl |
/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) |
Identify PDF control file |
GroupDocsForPostalProcess |
IdentifyPDFDocuments |
Identifies the page groups in the sample PDF print file and defines the data to be extracted in document properties. |
postal_doc_qualified.csv |
/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) |
Property conditions file |
ProcessQualifiedDocuments |
SetDocPropsFromConditions |
Sets the workflow for the documents in the job to PrintForPostalProcess. Sets sequence numbers for documents according to the presort sequence returned by the postal sortation software. |
postal_doc_print_afp.csv |
/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) |
Property conditions file |
PrintForPostalProcess |
SetDocPropsFromConditionsAFP |
Sets the child job names to reflect the Processing category. Sets the EnhanceAFP control file name for the child job in each Processing category. |
postal_doc_print.csv |
/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) |
Property conditions file |
PrintForPostalProcess |
SetDocPropsFromConditions |
Sets the child job names to reflect the Processing category. |
postal_doc.csv |
/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) |
Property conditions file |
GroupDocsForPostalProcess |
SetDocPropsFromConditions |
Maps MailPreparer return codes for each document to Processing category values ( Non-qualified, Qualified, and Other). Sets the workflow name for the child jobs that are created based on the GroupDocuments step. |
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.qualified_doc.csv |
/aiw/aiw1/testfiles (AIX and Linux) or C:\aiw\aiw1\testfiles (Windows) |
Retrieval pattern |
ProcessQualifiedDocuments |
RunHotFolderAppplication |
A sample external results file from MailPreparer based on processing the child job created for only documents that MailPreparer determined were qualified for postal sortation. Can be used to move the sample job through the RunHotFolderApplication step to simulate the response from postal software. |
jobid.group_doc.csv |
/aiw/aiw1/testfiles (AIX and Linux) or C:\aiw\aiw1\testfiles (Windows) |
Retrieval pattern | GroupDocsForPostalProcess | 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. |
PostalAFPBuildQualify.cfg |
/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) |
Enhance AFP control |
PrintForPostalProcess |
BuildAFPFromDocuments |
Builds an AFP file with the PostNet barcode replaced with a Datamatrix barcode that identifies theJob number and Document number and adds an Intelligent Mail barcode. |
PostalAFPBuildOther.cfg |
/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) |
Enhance AFP control |
PrintForPostalProcess |
BuildAFPFromDocumentsOther |
Builds an AFP file with the PostNet barcode replaced with a Datamatrix barcode that identifies the Job number and Document number. |
PostalAFPBuildNonQualify.cfg |
/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) |
Enhance AFP control |
PrintForPostalProcess |
BuildAFPFromDocumentsNonQualify |
Builds an AFP file with the PostNet barcode replaced with a Datamatrix barcode that identifies the Job number and Document number. |
PostalAFP.ctl |
/aiw/aiw1/control_files/postal (AIX and Linux) or C:\aiw\aiw1\control_files\postal (Windows) |
Visual Workbench control file |
GroupDocsForPostalProcess |
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. |
To run the sample workflow:
- Log in as an authorized user.
- Click the Main tab.
- In the Printers portlet, select the Sample printer and click Actions →Enable.
- In the Input Devices portlet, select the PostalFolder hot folder input device and click Actions → Enable and Connect. The first time you run this procedure, RICOH ProcessDirector immediately submits the Postal.pdf job to the GroupDocsForPostalProcess workflow.
The system starts processing the job through the GroupDocsForPostalProcess workflow. When the job reaches the RunHotFolderApplication step, it waits for results to come from the postal software. The job state changes to Waiting.
- To simulate results being returned by the postal software, navigate to
/aiw/aiw1/testfiles
(AIX and Linux) orC:\aiw\aiw1\testfiles
(Windows) and copyjobid.group_doc.csv
into/aiw/aiw1/postal/receive
(AIX and Linux) orC:\aiw\aiw1\postal\receive
(Windows). - Navigate to
/aiw/aiw1/postal/receive
(AIX and Linux) orC:\aiw\aiw1\postal\receive
(Windows) and renamejobid.group_doc.csv
, replacingjobid
with the Job Number of the sample job you submitted. For example, if the Job number for the sample job is 10000067, rename the file to10000067.group_doc.csv
. - The job moves on to the SetDocPropsFromConditions step where the sample property conditions file sets the Processing category for each document ( Qualified, Non-qualified or Other). The value of the Processing category property determines the next workflow for the document. The CreateJobsFromDocuments step creates the child jobs based on those document properties.
- Documents with a Processing category of Non-Qualified are grouped into a child job that is sent to the PrintForPostalProcess workflow. In that workflow, the PostNet barcode is replaced with a 2D barcode that can be used to track the progress of the document through other steps in the workflow. In addition, the documents are sorted in ascending order of zip code.
- Documents with a Processing category of Other are grouped into a child job that is sent to the PrintForPostalProcess workflow. In that workflow, the PostNet barcode on each document is replaced with a 2D barcode that can be used to track the progress of the document through other steps in the workflow. In addition, the documents are sorted in ascending order of the number of sheets.
- Documents with a Processing category of Qualified are grouped into a child job that is sent to the ProcessQualifiedDocuments workflow. That workflow sends the child job through the postal software again to sort the documents. When the job reaches the RunHotFolderApplication step, it waits for results to come from the postal software. The job state changes to Waiting.
- To simulate the results being returned by the postal software for the ProcessQualifiedDocuments workflow, navigate to
/aiw/aiw1/testfiles
(AIX and Linux) orC:\aiw\aiw1\testfiles
(Windows) and copyjobid.qualified_doc.csv
into/aiw/aiw1/postal/receive
(AIX and Linux) orC:\aiw\aiw1\postal\receive
(Windows). - Navigate to
/aiw/aiw1/postal/receive
(AIX and Linux) orC:\aiw\aiw1\postal\receive
(Windows) and rename the filejobid.qualified_doc.csv
, replacingjobid
with the Job Number of the child job. For example, if the Job number for the child job is 10000067.3, rename the file to10000067.3.qualified_doc.csv
. - The Qualified child job resumes processing. Because the workflow specifies that each postal container can hold 50 documents, the job is broken into multiple child jobs (grandchild jobs) with a maximum of 50 documents per job. Those child jobs are sent to the PrintForPostalProcess workflow. That workflow adds Intelligent Mail barcodes to the documents.
- When each child job from the original job finishes, it is retained for three days
and is then deleted. The parent job does not leave the system until all of the children
(and grandchildren) have completed.
- 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.
If you want to run the example again, you must copy the sample file to the hot folder. The sample file, Postal.pdf, is in
/aiw/aiw1/testfiles
(AIX or Linux) orC:\aiw\aiw1\testfiles
(Windows).If you want to run the sample AFP file, you must copy the sample file to the hot folder. The sample file, Postal.afp, is in
/aiw/aiw1/testfiles
(AIX or Linux) orC:\aiw\aiw1\testfiles
(Windows).
- 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.