XML Print Solution

4
TIA XML Print Solution TECHNICAL OVERVIEW Copyright © 2004, Oriac Information Systems Ltd. All rights reserved. Page 1 of 4 Oriac TIA XML Print Solution Integrating TIA with Adobe Output Server using XML Introduction The complete solution consists of three separate systems: TIA Print System, Adobe Output Server and the XML Generation System. Please refer to the diagram called 'TIA XML Print Solution - Process Model' on the last page when reading the overview. TIA Print System All the features of the standard TIA Print System are supported by this solution and no changes to TIA core are necessary. A print request from TIA is initiated by inserting a new row in the Print_Request table. This request can be initiated from any subsystem in TIA that needs to generate documents i.e. Product Documents, Renewals, Reminders, Claims or Standard Letters. The print request row contains key data such as policy number, customer number, document name etc. This key data will later be used by the XML Generation System to extract the required document data from TIA. The print request contains certain data already formatted, such as the recipient's address, salutation and signature information. This formatted data is generated automatically just before the print request is created by calling a TIA user function called UF20_Name_Letter used to create the address and salutation in a printable format. The Print_Argument table used to store the 'paragraph wording' of any document that utilises dynamic wording (typically standard letters). A print request can be either for 'online' or 'batch', which will be selected by the TIA user. These modes of print requests are differentiated by a flag set to either 'B' for batch or 'X' for online. The user can manually choose which printer to output to for online print requests. XML Generation System (XGS) All of the processes described here are performed in the Oracle database, that is to say they have been created as database procedures or functions, written in PL/SQL. The 'XGS Daemon' processes any online print requests as soon as they are created. This daemon program calls XGS_Main.Start_Online every time a new print request is inserted into the Print_Request table (or an existing one is updated). This is achieved by use of a database trigger on the Print_Request table that sends a message to the XGS Daemon (which is otherwise 'sleeping'), telling it to wake-up and do some work.

description

Printing solution using XML

Transcript of XML Print Solution

Page 1: XML Print Solution

TIA XML Print Solution TECHNICAL OVERVIEW

Copyright © 2004, Oriac Information Systems Ltd. All rights reserved. Page 1 of 4

OriacTIA XML Print SolutionIntegrating TIA with Adobe Output Server using XML

IntroductionThe complete solution consists of three separate systems: TIA Print System, AdobeOutput Server and the XML Generation System.

Please refer to the diagram called 'TIA XML Print Solution - Process Model' on thelast page when reading the overview.

TIA Print SystemAll the features of the standard TIA Print System are supported by this solution and nochanges to TIA core are necessary.

A print request from TIA is initiated by inserting a new row in the Print_Request table.This request can be initiated from any subsystem in TIA that needs to generatedocuments i.e. Product Documents, Renewals, Reminders, Claims or Standard Letters.

The print request row contains key data such as policy number, customer number,document name etc. This key data will later be used by the XML Generation Systemto extract the required document data from TIA. The print request contains certaindata already formatted, such as the recipient's address, salutation and signatureinformation. This formatted data is generated automatically just before the printrequest is created by calling a TIA user function called UF20_Name_Letter used tocreate the address and salutation in a printable format.

The Print_Argument table used to store the 'paragraph wording' of any document thatutilises dynamic wording (typically standard letters).

A print request can be either for 'online' or 'batch', which will be selected by the TIAuser. These modes of print requests are differentiated by a flag set to either 'B' forbatch or 'X' for online. The user can manually choose which printer to output to foronline print requests.

XML Generation System (XGS)All of the processes described here are performed in the Oracle database, that is to saythey have been created as database procedures or functions, written in PL/SQL.

The 'XGS Daemon' processes any online print requests as soon as they are created.This daemon program calls XGS_Main.Start_Online every time a new print request isinserted into the Print_Request table (or an existing one is updated). This is achievedby use of a database trigger on the Print_Request table that sends a message to theXGS Daemon (which is otherwise 'sleeping'), telling it to wake-up and do some work.

Page 2: XML Print Solution

TIA XML Print Solution TECHNICAL OVERVIEW

Copyright © 2004, Oriac Information Systems Ltd. All rights reserved. Page 2 of 4

All batch print requests will be processed when XGS_Main.Start_Batch is run. Thiscan be called from a batch job administered in the TIA Batch System, or run manuallyfrom a test screen within TIA called XGSBat.

The XML Generation System is modular, giving the advantage that the libraryprocesses can be called from both the Online process and the Batch process.

The extract program to be called initially is determined by the document id in the printrequest. Every document to be processed by the XML Generation System has to havea row created in a TIA table called Print_Program. This table contains parameters anddata, which influence how the document will be processed, including:

Ø Setting the archive flag (to tell Adobe Output Server to save a pdf file to theArchive directory).

Ø Default values for email subject and message (used when the TIA user hasselected the printer used to flag an email request).

Ø The physical extract program (e.g. XML_PL01) to be called when processing aprint request for this document.

The initial extract program that is executed makes calls to a library of processes usedfor extracting data from TIA and generating an XML data stream. These processes arespread between two database packages:

Ø XGS_Util, which consists of routines used to create the XML constructs and theAdobe_Config_Header record (used to manipulate the Adobe Output Server).Also contains other routines primarily developed to be used by the XMLGeneration System, but could potentially be used by other TIA processes.

Ø XGS_Data, which contains a modular set of data extract processes customisedfor a specific TIA installation.

Any errors encountered by the XML Generation System are reported in a table calledXGS_Errors. If the trace facility is switched on (TIA site preference), messages arewritten to a table called XGS_Trace to help trace faults.

The final step of processing the print request is to finalise the XML data stream andupdate the print request as 'processed' (by appending 'P' to status flag e.g. 'XP' foronline request).

For installations where TIA is running on a Unix platform the XML data stream iswritten as a file to the Unix file system. A Unix daemon program running in thebackground called 'aos_pq_feed.sh', writes this file to a virtual printer called'aos_pq_feed'. This virtual printer is a print queue that spools the file to another virtualprinter on the Adobe Output Server machine called aos_pq (also known as the AdobePrint Processor). The use of virtual printers in this way serves to bridge the networkbetween the Unix file system and the Adobe Output Server, which is running on aWintel machine.

For installations where TIA (the database server) is running on a Wintel platform, theXML data stream is written directly to the aos_pq virtual printer on the Adobe OutputServer.

Page 3: XML Print Solution

TIA XML Print Solution TECHNICAL OVERVIEW

Copyright © 2004, Oriac Information Systems Ltd. All rights reserved. Page 3 of 4

Adobe Output Server (AOS)The virtual printer 'aos_pq' spools the files it receives to a specific location beingpolled by AOS. Actually, it does slightly more than simply spool the file. It alsorenames the file (e.g. jf46.dar) to guarantee uniqueness to AOS and more importantlyit adds the name of the 'print job' to the first line of XML. The print job tells AOS thesteps that AOS needs to take to process the XML data file. At this stage the print jobis always DEFAULTJOB, which triggers further processing by AOS to determine theactual print job. It does this by transforming the XML data file using an XSLT filewhich is a key component of this solution.

The templates and graphic files are stored on the AOS machine within a logicaldirectory. The structure consists of the following key elements: Country, Product andLanguage. For example, 'd:\program files\adobe\tia_project\be\pl\f\templates', couldbe where AOS will look for templates for a Belgium product for ProfessionalLiability.

The elements for deriving the file path are values in the XML file, more specifically inthe Adobe_Config_Header record. This record forms part of the XML file and isgenerated by the XML_Util package. It contains all the parameters that AOS needs toprocess the data file such as output destination, printer driver, archive indicator etc.

The following extract shows how the Adobe_Config_Header looks in an XML filethat was generated for an online print request in:

<adobe_config_header> <output_channel>ondemand</output_channel> <printer>HPLASERJET/Q</printer> <printer_driver>HPLJ4</printer_driver> <archive_flag>yes</archive_flag> <archive_file_name>565755</archive_file_name> <country>BE</country> <product>PL</product> <language>F</language> <attachment_name>PL05_565755</attachment_name> </adobe_config_header>

This listing does not give a complete picture of the Adobe_Config_Header record,because certain fields will not be relevant for an 'ondemand' print request, such asemail information.

AOS writes to a log file, which contains logging information and error messages. Ifan error occurs, the data file along with an error file is written to an error directory. Ifbackup is enabled then all processed data files will be copied to the backup directory.

Depending on the 'output channel' the rendered document will either be output to aprinter on the network, sent as an email attachment or sent as a facsimile.

Page 4: XML Print Solution

TIA XML Print Solution TECHNICAL OVERVIEW

Copyright © 2004, Oriac Information Systems Ltd. All rights reserved. Page 4 of 4

ProductDocuments

ReminderLetters

StandardLetters

RenewalLetters

TIA PrintSystem

XMLGeneration

System

UF20_Name_Letter

Print_Request

On Demand

Batch XMLData

Stream

Adobe OutputServer

(Wintel box)

Unixaos_pq_feed.sh

aos_pq(Adobe printprocessor)

XML DataFile

Wintel

AdobeOutputServer

Print Queue

Network printer

Email recipient

Fax recipient

Mail Server

Fax Server

Rendereddocument

archived pdffile

TIA XML Print Solution - Process Model

aos_pq_feed(unix virtualprint queue)

XGS Daemon

XGSBat

XGS_UtilXGS_Data XML_xxnn

XGS_Main

Start_Online

Start_Batch

DocumentTemplate Logos

TIADatabase

Print_Argument

TIA

Unix

Network