Getting my desktop ready
There are four primary tools that a developer should prepare before starting to build form printing programs and templates.
1. The Samba Share
Blue Prairie Forms installs an account in your ERP/MRP server. Here, there is a directory, usually called bpi_forms, that contains a number of subdirectories holding a variety of useful resources including the location where Open Office template files will be saved. It is useful to mount the samba share on your PC as a drive letter. This allows you to quickly and easily navigate the directory to view, edit and modify the files that BP Forms will use. Your installation technician should have left you with credentials for the samba share. If you don't have these credentials, please contact your installation technician.
2. A Copy of OpenOffice on your desktop
BP Forms uses open office template files (called .odt files) to produce final documents. Editing these template files is a large part of the effort involved in creating final documents. You'll need to develop and refine document templates as your development progresses. The most convenient way to build and edit template files is by using a copy of Open Office that is installed on your PC. Together with the Samba share, this makes it easy to simply navigate to the templates directory on the Samba share then right-click and open the .odt template file using OpenOffice.
|Note: The OpenOffice project forked a number of years ago and the fork is now called Libre Office. While Libre Offices is preferred by many users, unfortunately, there are technical issues with later version of Libre Office that can cause issues when editing templates. If you are reading this advisory, we recommend that you use Open Office rather than Libre Office on your Local PC. When Libre Office resolves its technical issues, we will remove this advisory and you will then be free to choose between Open Office and Libre Office for template editing|
3. The BP Forms API Subroutines
BP Forms provides a collection of BASIC subroutines that you will use within your print programs to produce BP Forms output. These subroutines should be visible from any account where you intend to run them. For more information about how to expose the subroutines to your chosen account, see Exposing the BPI Forms API in other accounts.
4 Your Print Program
Your print program will be altered to call BP Forms subroutines (API) to produce output. We have a number of recommended practices that will make it easier and safer to move to BP Forms printing. This topic is discussed in MultiValue Integration Guidelines
What's in the Samba Share
The samba share exposes a directory, usually called bpi_forms on your ERP/MRP system. If you mount that share as a drive letter on your PC, you'll see most of the working directories and files used by BP Forms. The image below shows the share followed by a description of the purpose for the directories.
This directory is where BP Forms will place documents after they have been processed.
This is a directory where we will place fonts such as barcode fonts that you may wish to install on your PC and on the print server. This is how BP Forms is able to produce barcodes within your documents.
This is a directory where certain configuration files are stored.
This is a directory where logs will be stored. Each time you start a BP FORMS phantom thread, it will initialize a new log file and send its diagnostic information to the log file. It is helpful to be able to navigate to this directory and view the latest log files. The level of detail placed within these log files is determined by the level of verbosity that you define for your phantom thread(s).
This is a directory where you can store print drivers that you may wish to install on print servers and/or PCs. It gives a handy, central location for storing the print drivers you intend to use.
While your print programs are free to write documents to any valid location and your phantom threads are free to poll from any directory, a common practice is to use the queue directory that we provide. You may create sub-directories under the queue directory. A common practice is define a sub-directory for each phantom queue and then to create symbolic links, usually named after your target printer (e.g., Q11) that points to one of the sub-directories. By using directories and links, it is possible to easily distribute print jobs from various printers to different threads. Using this technique, it is also possible to create queues for slow/low priority documents or to place security on certain sub-directories (such as a payroll printer for example).
Example Queue Directory with Symbolic links
bash-4.2$ ls -la
drwxrwxr-x 6 bpiforms jbase 4096 Dec 5 20:10 .
drwxrwxr-x 10 bpiforms jbase 186 Jun 15 16:42 ..
drwxrwxr-x 2 bpiforms jbase 151 Dec 6 08:53 bpiform1
drwxrwxr-x 2 bpiforms jbase 6 Jun 15 16:42 bpiform2
drwxrwxr-x 2 bpiforms jbase 6 Jun 15 16:42 bpiform3
drwxrwxr-x 2 bpiforms jbase 6 Jun 15 16:42 bpiform4
lrwxrwxrwx 1 bpiforms jbase 8 Dec 3 14:31 LP -> bpiform1
lrwxrwxrwx 1 bpiforms jbase 8 Dec 5 20:10 LP0 -> bpiform1
lrwxrwxrwx 1 bpiforms jbase 8 Dec 2 19:35 LP1 -> bpiform1
lrwxrwxrwx 1 bpiforms jbase 8 Dec 2 19:35 LP10 -> bpiform1
lrwxrwxrwx 1 bpiforms jbase 8 Dec 2 19:35 LP11 -> bpiform1
lrwxrwxrwx 1 bpiforms jbase 8 Dec 2 19:35 LP12 -> bpiform1
lrwxrwxrwx 1 bpiforms jbase 8 Dec 2 19:35 LP13 -> bpiform1
In the example above, we have 4 directories (bpiform1, bpiform2, bpiform3, bpiform4). Then, we have symbolic links named after our printer names (e.g., LP1, LP2, LP3...). This allows your print program to be written to drop its finished document on a path such as /dbms/BPIFORM1/bpi_forms/Q1 whereby it is written to the bpiform1 directory which is the directory polled by the phantom thread bpiform1. If, later, you decided you wished to have documents on LP1 printing by the thread bpiform2, you simply need to change the symbolic link to point LP1 to bpiform2.
this is where your document templates should be stored. This gives a central location where templates can be shared with print servers so that a single template location can be used by multiple print servers.