Code 3 Sample Workflow - Support

Code 3 Sample Workflow

From Support

Jump to: navigation, search

One of the primary reasons we sell software bundles is because the software has been designed to work together. Very rarely is a piece of software completely standalone; more often than not, it is simply one piece of a larger process.

The purpose of this article is to illustrate how one company has chosen to combine our products in a way that forms a complete business process. The processes described below are not comprehensive; they do not use anywhere close to all our products, or use all the features of the products they do use. However, we hope that by seeing what has been done by others, you will be inspired to adapt our software to your own processes.

Code 3 had some strict limits on it's process. We started with their Statements process, taking spool files from their JDE software, finding all spool files with embedded emails and generating a pdf form with letterhead, logo and legal information. All spool files without emails were to move through the process without a letterhead or logo, as the forms would be printed onto pre-printed forms. These could then be mailed to the customers.

Code 3 Statements Flowchart (click to enlarge)
Enlarge
Code 3 Statements Flowchart (click to enlarge)

We'll move through this step by step.

Contents

The First Split

The spool files first arrive in STASPLIT1. We used AS/400 Report Splitter to look within the content of the spool file for an email address. Knowing the exact position of the email address, we use *DECOLLATE and hit F11 to add a small amount of SQL to only grab entries with a valid email address.

@email <> ""

The above code assumes a preceding WHERE, in the same way as using AS/400 Report Splitter. Now splitter will only produce files with content in the email address section of the statements.

Still in option 20, an F13 allows us to add the following information to the user defined data of the new spool files.

RPTUSER: @USERID

Because the splitter does not change the original spoolfiles, but creates new spoolfiles for the decollated data, the user ID gets changed. In order to retain the original user ID, we store it in the user defined data of the newly created spool files. We will be using this when we email the reports.

The original, untouched spool files are moved to STASPLIT2 as set in the AS/400 Report Splitter After Processing Options.

The new files are created in STAEMAIL.

Applying the Form for Emailed Statements

WinSpool/400 Electronic Forms Print Server processes the spool files from STAEMAIL and after applying a form, it converts the files to .pdf format and respools the converted files to the ESTATEMENT outqueue. The forms are equipped with a VB script that appends a disclaimer/legal data page once at the end of the document.

INSERT SAMPLE VB CODE?

Emailing the Statements

Now that the reports are back on the System i (albeit in binary .pdf format), Email Report Server/400 is now able to pick them up and email them to the appropriate recipients.

We define an email address for every employee generating spool files in the Address Book (option 30 on the RJSERS menu). Include in the address book entry their System i user ID. This way, we can now match the user ID that created a report (as specified in the user defined data above) to an email address in the Address Book.

When we run the ERSMON command, we specify *USERDEF as the From Address. This will look into the user defined data, see the entry we have in there (which was the original System i user who created the spool file), and use the email in the Address Book as the from address in the sent email.

? Are recipients being added to user defined data at splitter level?

The Second Split

Meanwhile, all the original spool files have moved to STASPLIT2. Here we do a *DECOLLATE in the same way, with the exception that the SQL now confirms that there is no email address present.

@email <> ""

The original, untouched spool files are moved to VKSHEPHERD as set in the AS/400 Report Splitter After Processing Options, and are then archived or deleted.

The new files are created in STANOEMAIL.

Applying the Form for Statements

WinSpool/400 Electronic Forms Print Server processes the spool files from STANOEMAIL and after applying a form, it converts the files to .pdf format and sends the file to a set printer. These files do not use the same form as above; the last page is omitted, as are the logos and other portions of the form as they will be printed onto pre-printed forms. These are then available to be mailed to the customers.


? Any notable similarities/differences between statements & acknowledgments that warrant two article's worth, or should I stick with the one? Any mistakes or glaring omissions? If not, I'll link it into the rest of the site.


Code 3 Acknowledgments Flowchart (click to enlarge)
Enlarge
Code 3 Acknowledgments Flowchart (click to enlarge)

Download Visio copies of the above flowcharts.

Personal tools