Document Processor Engine (Oracle Applications Help) (2024)

Document Processor Engine

The Document Processor Engine provides batch processing functionality to access a single API or multiple APIs by passing a single XML instance document to specify template names, data sources, languages, output type, output names, and destinations.

This solution enables batch printing with XML Publisher, in which a single XML document can be used to define a set of invoices for customers, including the preferred output format and delivery channel for those customers. The XML format is very flexible allowing multiple documents to be created or a single master document.

This section:

  • Describes the hierarchy and elements of the Document Processor XML file

  • Provides sample XML files to demonstrate specific processing options

  • Provides example code to invoke the processors

Hierarchy and Elements of the Document Processor XML File

The Document Processor XML file has the following element hierarchy:

Requestset request delivery filesystem print fax number email message document background text pagenumber template data

This hierarchy is displayed in the following illustration:

Document Processor Engine (Oracle Applications Help) (1)

The following table describes each of the elements:

Element Attributes Description
requestset xmlns
version
Root element must contain [xmlns:xapi="http://xmlns.oracle.com/oxp/xapi/"] block
The version is not required, but defaults to "1.0".
request N/A Element that contains the data and template processing definitions.
delivery N/A Defines where the generated output is sent.
document output-type Specify one output that can have several template elements. The output-type attribute is optional. Valid values are:
pdf (Default)
rtf
html
excel
text
filesystem output Specify this element to save the output to the file system. Define the directory path in the output attribute.
print
  • printer

  • server-alias

The print element can occur multiple times under delivery to print one document to several printers. Specify the printer attribute as a URI, such as:"ipp://myprintserver:631/printers/printername"
fax
  • server

  • server-alias

Specify a URI in the server attribute, for example: "ipp://myfaxserver1:631/printers/myfaxmachine"
number The number element can occur multiple times to list multiple fax numbers. Each element occurrence must contain only one number.
email
  • server

  • port

  • from

  • reply-to

  • server-alias

Specify the outgoing mail server (SMTP) in the server attribute.
Specify the mail server port in the port attribute.
message
  • to

  • cc

  • bcc

  • attachment

  • subject

The message element can be placed several times under the email element. You can specify character data in the message element.
You can specify multiple e-mail addresses in the to, cc and bcc attributes separated by a comma.
The attachment value is either true or false (default). If attachment is true, then a generated document will be attached when the e-mail is sent.
The subject attribute is optional.
background where If the background text is required on a specific page, then set the where value to the page numbers required. The page index starts at 1. The default value is 0, which places the background on all pages.
text
  • title

  • default

Specify the watermark text in the title value.
A default value of "yes" automatically draws the watermark with forward slash type. The default value is yes.
pagenumber
  • initial-page-index

  • initial-value

  • x-pos

  • y-pos

The initial-page-index default value is 0.
The initial-value default value is 1.
"Helvetica" is used for the page number font.
The x-pos provides lower left x position.
The y-pos provides lower left y position.
template
  • locale

  • location

  • type

Contains template information.
Valid values for the type attribute are
pdf
rtf
xsl-fo
etext
The default value is "pdf".
data location Define the location attribute to specify the location of the data, or attach the actual XML data with subelements. The default value of location is "inline". It the location points to either an XML file or a URL, then the data should contain an XML declaration with the proper encoding.
If the location attribute is not specified, the data element should contain the subelements for the actual data. This must not include an XML declaration.

XML File Samples

Following are sample XML files that show:

  • Simple XML shape

  • Defining two data sets

  • Defining multiple templates and data

  • Retrieving templates over HTTP

  • Retrieving data over HTTP

  • Generating more than one output

  • Defining page numbers

Simple XML sample

The following sample is a simple example that shows the definition of one template (template1.pdf) and one data source (data1) to produce one output file (outfile.pdf) delivered to the file system:

Example

<?xml version="1.0" encoding="UTF-8" ?> <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi"> <xapi:request> <xapi:delivery> <xapi:filesystem output="d:\tmp\outfile.pdf" /> </xapi:delivery> <xapi:document output-type="pdf"> <xapi:template type="pdf" location="d:\mywork\template1.pdf"> <xapi:data> <field1>data1</field1> </xapi:data> </xapi:template> </xapi:document> </xapi:request> </xapi:requestset>

Defining two data sets

The following example shows how to define two data sources to merge with one template to produce one output file delivered to the file system:

Example

<?xml version="1.0" encoding="UTF-8"?><xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi"> <xapi:request> <xapi:delivery> <xapi:filesystem output="d:\tmp\outfile.pdf"/> </xapi:delivery> <xapi:document output-type="pdf"> <xapi:template type="pdf" location="d:\mywork\template1.pdf"> <xapi:data> <field1>The first set of data</field1> </xapi:data> <xapi:data> <field1>The second set of data</field1> </xapi:data> </xapi:template> </xapi:document> </xapi:request></xapi:requestset>

Defining multiple templates and data

The following example builds on the previous examples by applying two data sources to one template and two data sources to a second template, and then merging the two into a single output file. Note that when merging documents, the output-type must be "pdf".

Example

<?xml version="1.0" encoding="UTF-8"?><xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi"> <xapi:request> <xapi:delivery> <xapi:filesystem output="d:\tmp\outfile3.pdf"/> </xapi:delivery> <xapi:document output-type="pdf"> <xapi:template type="pdf" location="d:\mywork\template1.pdf"> <xapi:data> <field1>The first set of data</field1> </xapi:data> <xapi:data> <field1>The second set of data</field1> </xapi:data> </xapi:template> <xapi:template type="pdf" location="d:\mywork\template2.pdf"> <xapi:data> <field1>The third set of data</field1> </xapi:data> <xapi:data> <field1>The fourth set of data</field1> </xapi:data> </xapi:template> </xapi:document> </xapi:request></xapi:requestset>

Retrieving templates over HTTP

This sample is identical to the previous example, except in this case the two templates are retrieved over HTTP:

<?xml version="1.0" encoding="UTF-8"?><xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi"> <xapi:request> <xapi:delivery> <xapi:filesystem output="d:\temp\out4.pdf"/> </xapi:delivery> <xapi:document output-type="pdf"> <xapi:template type="pdf" location="http://your.server:9999/templates/template1.pdf"> <xapi:data> <field1>The first page data</field1> </xapi:data> <xapi:data> <field1>The second page data</field1> </xapi:data> </xapi:template> <xapi:template type="pdf" location="http://your.server:9999/templates/template2.pdf"> <xapi:data> <field1>The third page data</field1> </xapi:data> <xapi:data> <field1>The fourth page data</field1> </xapi:data> </xapi:template> </xapi:document> </xapi:request></xapi:requestset>

Retrieving data over HTTP

This sample builds on the previous example and shows one template with two data sources, all retrieved via HTTP; and a second template retrieved via HTTP with its two data sources embedded in the XML:

Example

<?xml version="1.0" encoding="UTF-8"?><xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi"> <xapi:request> <xapi:delivery> <xapi:filesystem output="d:\temp\out5.pdf"/> </xapi:delivery> <xapi:document output-type="pdf"> <xapi:template type="pdf" location="http://your.server:9999/templates/template1.pdf"> <xapi:data location="http://your.server:9999/data/data_1.xml"/> <xapi:data location="http://your.server:9999/data/data_2.xml"/> </xapi:template> <xapi:template type="pdf" location="http://your.server:9999/templates/template2.pdf"> <xapi:data> <field1>The third page data</field1> </xapi:data> <xapi:data> <field1>The fourth page data</field1> </xapi:data> </xapi:template> </xapi:document> </xapi:request></xapi:requestset>

Generating more than one output

The following sample shows the generation of two outputs: out_1.pdf and out_2.pdf. Note that a request element is defined for each output.

Example

<?xml version="1.0" encoding="UTF-8"?><xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi"> <xapi:request> <xapi:delivery> <xapi:filesystem output="d:\temp\out_1.pdf"/> </xapi:delivery> <xapi:document output-type="pdf"> <xapi:template type="pdf" location="d:\mywork\template1.pdf"> <xapi:data> <field1>The first set of data</field1> </xapi:data> <xapi:data> <field1>The second set of data</field1> </xapi:data> </xapi:template> </xapi:document> </xapi:request> <xapi:request> <xapi:delivery> <xapi:filesystem output="d:\temp\out_2.pdf"/> </xapi:delivery> <xapi:document output-type="pdf"> <xapi:template type="pdf" location="d:mywork\template2.pdf"> <xapi:data> <field1>The third set of data</field1> </xapi:data> <xapi:data> <field1>The fourth set of data</field1> </xapi:data> </xapi:template> </xapi:document> </xapi:request></xapi:requestset>

Defining page numbers

The following sample shows the use of the pagenumber element to define page numbers on a PDF output document. The first document that is generated will begin with an initial page number value of 1. The second output document will begin with an initial page number value of 3. The pagenumber element can reside anywhere within the document element tags.

Note that page numbering that is applied using the pagenumber element will not replace page numbers that are defined in the template.

<?xml version="1.0" encoding="UTF-8"?><xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi"> <xapi:request> <xapi:delivery> <xapi:filesystem output="d:\temp\out7-1.pdf"/> </xapi:delivery> <xapi:document output-type="pdf"> <xapi:pagenumber initial-value="1" initial-page-index="1" x-pos="300" y-pos="20" /> <xapi:template type="pdf" location="d:\mywork\template1.pdf"> <xapi:data> <field1>The first page data</field1> </xapi:data> <xapi:data> <field1>The second page data</field1> </xapi:data> </xapi:template> </xapi:document> </xapi:request> <xapi:request> <xapi:delivery> <xapi:filesystem output="d:\temp\out7-2.pdf"/> </xapi:delivery> <xapi:document output-type="pdf"> <xapi:template type="pdf" location="d:\mywork\template2.pdf"> <xapi:data> <field1>The third page data</field1> </xapi:data> <xapi:data> <field1>The fourth page data</field1> </xapi:data> </xapi:template> <xapi:pagenumber initial-value="3" initial-page-index="1" x-pos="300" y-pos="20" /> </xapi:document> </xapi:request></xapi:requestset>

Invoke Processors

The following code samples show how to invoke the document processor engine using an input file name and an input stream.

Invoke Processors with Input File Name

Input:

  • Data file name (String)

  • Directory for Temporary Files (String)

Example

import oracle.apps.xdo.batch.DocumentProcessor;... public static void main(String[] args) {... try { // dataFile --- File path of the Document Processor XML // tempDir --- Temporary Directory path DocumentProcessor docProcessor = new DocumentProcessor(dataFile, tempDir); docProcessor.process(); } catch(Exception e) {e.printStackTrace(); System.exit(1); } System.exit(0); }

Invoke Processors with InputStream

Input:

  • Data file (InputStream)

  • Directory for Temporary Files (String)

Example

import oracle.apps.xdo.batch.DocumentProcessor;import java.io.InputStream;... public static void main(String[] args) {... try { // dataFile --- File path of the Document Processor XML // tempDir --- Temporary Directory path FileInputStream fIs = new FileInputStream(dataFile); DocumentProcessor docProcessor = new DocumentProcessor(fIs, tempDir); docProcessor.process(); fIs.close(); } catch(Exception e) {e.printStackTrace(); System.exit(1); } System.exit(0); } 
Document Processor Engine (Oracle Applications Help) (2024)

FAQs

What is document sequence in Oracle Apps? ›

Automatic document sequencing assigns a unique number to each document automatically when the document is generated. That unique number is stored in the database. You can set an initial value for the numbering sequence. Thereafter, the numbering is sequential by date and time of creation.

Does Oracle have a document management system? ›

Oracle Documaker Standard Edition is a documents management system that dynamically creates, manages and delivers enterprise communications—when and how customers and stakeholders want them.

How to run receiving transaction processor in Oracle Apps? ›

To run the Receiving Transaction processor:
  1. Navigate to the Submit Requests window.
  2. Select Requests in the first field.
  3. Select Manage Receiving Transactions in the Name field.
  4. Click Submit to begin the process.

How does Oracle application work? ›

The Oracle code acts as a server, performing database tasks on behalf of an application (a client), such as fetching rows from data blocks. The program interface consists of several parts, provided by both Oracle Database software and operating system-specific software.

What is the purpose of sequence in Oracle? ›

A sequence is a schema object that can generate unique sequential values. These values are often used for primary and unique keys. You can refer to sequence values in SQL statements with these pseudocolumns: CURRVAL : Returns the current value of a sequence.

How to create sequence in Oracle Apps? ›

To create a sequence in another user's schema, you must have the CREATE ANY SEQUENCE system privilege. Specify the schema to contain the sequence. If you omit schema , then Oracle Database creates the sequence in your own schema. Specify the name of the sequence to be created.

Is Oracle a document database? ›

JSON-based Development in Oracle Database

Oracle Database stores, manages, and indexes JSON documents. Application developers can access these JSON documents via document-store APIs.

What file system does Oracle use? ›

Oracle Database File System (DBFS) leverages the benefits of the database to store files, and the strengths of the database in efficiently managing relational data to implement a standard file system interface for files stored in the database.

Which are three functions of a document management system? ›

A document management system has three primary functions: capturing documents from various sources, storing them centrally and retrieving and distributing them easily.

How does Oracle manage transactions? ›

The database issues an implicit COMMIT statement before and after every DDL statement. If the current transaction contains DML statements, then Oracle Database first commits the transaction and then runs and commits the DDL statement as a new, single-statement transaction.

What is transaction processing in Oracle? ›

Transaction processing ensures that related data is added to or deleted from the database simultaneously, thus preserving data integrity in your application. In transaction processing, data is not written to the database until a commit command is issued. When this happens, data is permanently written to the database.

How to check if workflow is active in Oracle Apps? ›

To Search for Workflows in the Status Monitor
  1. Workflow Started - Choose Today, This Week (last seven days), Last 2 Weeks (last fourteen days), Last 30 Days, Last 60 Days, or Any Time to specify the start date of the workflows you want to review. ...
  2. Workflow Type - Select the workflow type you want to review.

Is Oracle a database or application? ›

Oracle is NOT a database language, it is a Relational Data Base Management System (RDBMS) application written to efficiently process data in a tabular/relational format.

What does Oracle call their applications? ›

Oracle provides SaaS applications also known as Oracle Fusion Cloud Applications.

How does an application connect to an Oracle Database? ›

To establish a database connection, you need to provide some information, such as the database name, host, port, username, password, and driver. A driver is a software component that enables your app to communicate with a specific database system, such as MySQL, Oracle, or MongoDB.

What is a sequencing document? ›

Use document sequencing to generate new IDs automatically for common transactions and records, such as new customers, vendors, invoices, and more. For example, you can create a document sequence for invoices.

How to get sequence details in Oracle? ›

To browse a sequence:
  1. On the Workspace home page, click SQL Workshop and then Object Browser. Object Browser appears.
  2. From the Object list, select Sequences.
  3. From the Object Selection pane, select a sequence. ...
  4. Click the tabs at the top of the page to view different reports about the sequence.

How to define document category in Oracle Apps? ›

Setting Up Document Categories and Subcategories
  1. Select Common Setup > Document Category.
  2. On the Document Category page, click Add to add a new document category.
  3. Enter values on the Document Category Details page: ...
  4. Click Save.
  5. If you want to add a subcategory, click Add in the Document Subcategory section.

What is DB file sequential read in Oracle? ›

DB file sequential read (%)

This event shows a wait for a foreground process while doing a sequential read from the database. The I/O is generally issued as a single I/O request to the OS; the wait blocks until the I/O request completes.

Top Articles
Latest Posts
Article information

Author: Pres. Carey Rath

Last Updated:

Views: 5566

Rating: 4 / 5 (41 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Pres. Carey Rath

Birthday: 1997-03-06

Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

Phone: +18682428114917

Job: National Technology Representative

Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.