PDF version of this page

Overview of FormTrap Long Term Archive

FormTrap has two archives. The first, always present, is the archive FormTrap keeps for in-flight recovery and occasional user re-prints or re-sends of formatted documents. This is NOT what this page is about.

The FormTrap Long Term Archive (LTA), also a FireBird database, normally resides on a different drive. LTA stores indices in the DB, referencing "blob" files for the stored information. This keeps the DB size managable.

LTA is a "store and retreive" system with old copies retained indefinitely. Using a Purchase Order as an example, new versions of one PO Number may be stored by including a "revision number" where the latest is shown first, with older revisions running backward from the latest.

FormTrap normally lodges documents automatically as PDFs, but will allow other formats. Other user programs may use the same facility to lodge anything.

There are four functions that operate on the LTA, these are:

Top

Setup

Program ftarch-setup.exe sets up and maintains the single FireBird DB that holds FTArchive.






This is the main screen, about to add a new archive.

You can have one or several archives. Multiple archives are useful for different types of data or for organizations running multiple entities, using the one copy of FormTrap.



In this screen you can see the archive name, CUST_ACCTS and the standard column headings ID and CREATED. Here we are about to add the first of the user column headings.

The program automatically replaces all spaces and other characters NOT in the valid SQL set with underscore.


You may allocate Archive Names, where we recommend a functional split with these as typical archives - Customer Accounting, Supplier Accounting, Service / Warranty History, Staff etc. Naming conventions and character size limits apply - see further down.

Within an archive, you may allocate columns which are the search arguments for archive entries, with ID and CREATED columns allocated automatically:

Id Unique Hexidecimal sequential number allocated by the system to each entry
Created Date / Time created

User-allocated columns normally include other party (Name and Number separately), Document Number or Identification (statement at end 2012-01 for example), Date (and possibly Time) of document delivery or formatting, delivery-associated information (Fax Number, Email Address) and may include other information to assist in finding document (amount for example, e.g. $1234.56). Columns may be indexed (presented as a sequential list - Date is indexed as an example) or not indexed (amount would not be indexed). Indexed entries take more space and take longer to insert, both are minor impediments unless huge volumes of archive data is planned.

Naming conventions apply. Archive Names and Column Headings must be keyed to SQL standards with a starting letter and exclude * ? , . / ; : and others. Spaces are replaced with underscores and the entire name is stored in upper case.

Size limit applies. Search arguments (IDX_archive_column) have an upper limit of 31 characters, hence the combined size of Archive and Column names is 25 characters. You will need to carefully pre-plan Archive and Column names.

Top

Write to Archive

This batch program is used to add a single document to the Archive DB. The command line parameters and their arguments are shown below and are shown in stderr (Standard Error) from the -? parameter:

Program parameters:
Generic options:
-?   [ --help ] produce this help message
-f   [ --folder ] arg path to the database folder (must be specified)
-s   [ --server ] arg server address - (optional, defaults to "localhost")
-d   [ --database ] arg database name - full path to .fdb file or database alias (optional, defaults to "ftarchive" alias)
-a   [ --archive ] arg archive name (must be specified)
-t   [ --type ] arg archived document type (optional, defaults to ".pdf")
-i   [ --input ] arg archived document file (optional, defaults to stdin)
-l   [ --logfile ] arg log file (optional, defaults to stderr)
-p   [ --pedantic ] generate error if any of columns cannot be updated (optional, by default allows failure on updating additional columns)
Columns:
-c   [ --column ] arg additional columns in form column_name=value (optional).

Pedantic ensures no column fails to update, including date and numeric failures for columns so described.

Multiple -c commands are required, one for each additional column of data.

Normal rules for arguments apply, so please enclose any arguments that include spaces in double-quotes.

LTA Write returns status 0 for success, all other values (failures) are described in stderr for that attempted execution of the program.

Top

FormTrap Write to Archive

FormTrap Server provides access to applications, meaning you can automatically archive from FormTrap, as part of normal processing. There are three steps to configuring your FormTrap system to automatically archive as part of normal processing:

Use Setup, Applications to define an occurance of LTA Write.

The argument line is:

"-fc:\fthome\v7\archives" "-aCUST_ACCTS" "-t.pdf" "-cDOCDATE=[Doc Date]"
                                                                      "-cDO_NAME=[Doc Name]"
                                                                      "-cDOC_NUMBER=[Invoice No]"
                                                                      "-cCUST_NO=[Cust No]"
                                                                      "-cCUST_NAME=[Cust Name]"
                                                                      "-cDOC_AMT=[Invoice Total]"

Include all Column Name variables as Delivery Tags. In Setup, Applications this is the variable in square brackets. In the final above -c command as an example, Delivery Tag name Invoice Total must be defined.

Set up Application tab to call the correct Archive Application:

Top

Finding Records

Top

Formatting User Queries

Top