Monday, September 10, 2012

XMLPublisher Bursting in Oracle Applications

Ø  BI Publisher's bursting engine accepts a data stream and splits it based on multiple criteria, generates output based on a template, then delivers the individual documents through the delivery channel of choice

Usages in XML Bursting
1)   Invoice generation and delivery based on customer-specific layouts and delivery
2) Generation of payslips to all employees based on one extract and delivered via email
3) Purchase order generation and delivery based on supplier.

Control File  Creation.
<?xml version="1.0" encoding="UTF-8"?>
<xapi:requestset xmlns:xapi="" type="bursting">
            <xapi:email id="email1" server="" port="587" from="">
                 <xapi:message id="email1"  to="" attachment="true" subject="Invoice Number ${Invoice_num}
                 dated ${Invoice_Date}">
                 This is an auto generated email. Please do not reply to this email.
       <xapi:document output="XXC_Invoice_${Invoice_num}.pdf" output-type="pdf" delivery="email1">
            <xapi:template type="rtf" location="/app/pcldev/apps/apps_st/appl/xxpan/12.0.0/reports/US/XXPAN_Invoice.rtf" filter="">

Explanation of elements in control file
xapi:request select=
This tag in the control file indicates from which tag/node in the concurrent program output XML should separated for bursting
This node contains all email related attributes
This tag contains the email attributes like,
·         server or the email server IP or name
·         port or the email server port
·         from or the email address from which the server should send the email
·         reply-to or the email address to which the replies should be sent
This tag contains the attributes about the email like,
·         To or the email address where the email should be sent
·         Subject or the email subject
·         attachment , i.e. if the email should contain an attachment
·         content-type or type of email
·         The mail body will be enclosed within the tags
This node contains the attachment document and XML template related tags and attributesThe attributes in this tag are related to the email attachment
·         Key or unique identifier of each attachment
·         Output or attachment file name
·         Output-type or attachment file type
This node contains the template information like,
·         Type or the file type of the template
·         Location or the directory of the template file along with the file name

Ø  Use the attribute select under the request element to specify the element in the
XML data that you wish to burst on.

Ø  Use the attribute id under the lowest level of the delivery structure (for example,
for the delivery element email, the id attribute belongs to the message element. 
This assigns an ID to the delivery method to be referenced later in the XML file.
<xapi:email id="email1" server="" port="587" from="">
<xapi:message id="email1" to="" attachment="true" subject="Invoice Number ${Invoice_num} dated ${Invoice_Date}">This is an auto generated email. Please do not reply to this email.</xapi:message>

We can send and fax and print the output by using following tags.
<xapi:fax server="ipp://mycupsserver:631/printers/fax2">
  <xapi:number id="FAX1">916505069560</xapi:number>
  <xapi:print id="printer1"
   copies="2" />

Ø  Use the delivery attribute under the document element. This assigns the
Delivery method for the generated document as defined in the id attribute for the
Delivery element.
<xapi:document output="XXC_Invoice_${Invoice_num}.pdf" output-type="pdf" delivery="email1">
<xapi:template type="rtf" location="/app/pcldev/apps/apps_st/appl/xxpan/12.0.0/reports/US/XXPAN_Invoice.rtf" filter="" />

Go to xml publisher àAdministration
In general tab à Temporary directory mention the rtf located path.

We need to write the code in After Report Trigger
FUNCTION AfterReport
   req_id   NUMBER;
   req_id :=

   IF req_id = 0
      srw.MESSAGE (100, 'Failed to submit the bursting program');
   END IF;


After the report is generated, it executes the program named, XML Publisher Report Bursting Program. This program is responsible for bursting the XML with the help of the bursting control file attached to the concurrent program whose output will be burst. Ensure that this program is attached to the request group of this responsibility.


1 comment:

Adnan said...

Can some body please let me know how to over come this issue.

I need to authenticate mail server, which I heard it from our DBA saying in needs to be embed in XML Bursting control file. How is that possible?
Rgds, Adnan

Post a Comment

Best Blogger TipsGet Flower Effect