Anda di halaman 1dari 7

Leveraging XML Bursting feature of BI Publisher to send emails and FTP Output Files to Servers

Author: Amit Jain

Declaration
I hereby declare that this document is based on my personal experiences. To the best of my knowledge, this document does not contain any material that infringes the copyrights of any other individual or organization.

Target Readers
XML Bursting Application Object Library BI Publisher

Keywords
XML Bursting BI Publisher Email Output of Concurrent program

Introduction

Page 1 of 7

XML Bursting is a very powerful mechanism of bursting the output of a concurrent program at the record level or at a desired group level. Once we burst the output of the concurrent program producing a XML File, we can split the output to generate the Email messages at any group level and send as an Email Message to any dynamically selected email address / email group. The same utility can also be leveraged to FTP the split output files to any specific FTP location.
Advantages

No Additional Coding, just need to create XML bursting File. Otherwise we would have to write java program to parse the XML Files and then use XMLP delivery manager API to send emails. Process of Creating XML data Definition and Template remains AS IS .

Case demonstrated

In the article below, I have demonstrated the XML Bursting feature using a very hypothetical and a simple scenario wherein we run a report to pull the data for the last 10 Purchase Orders generated in the system. The RDF report will pull the details of the Buyer Name, PO Number, Vendor Name and the Buyer Email Address and produce a XML Output. By using this XML Data File as an input, we shall be performing the following actions: A) I am demonstrating how can we send the Email notification for each PO record to its respective Buyer B) Subsequently we will also see how can we create the Output Files for every PO record and FTP to a specified location on the server.

Solution A We will see the control file Base mechanism for XML Bursting in the example below. XML Bursting will be using the following key components which are tightly coupled to one another as explained in the figure below:

1) Concurrent Program 2) RDF Report 3) XML Bursting Control File 4) RTF Template File 5) Data Definition and Template

Page 2 of 7

RDF Report In the example below we are using the RDF file to generate the XML Data File. A snippet of the XML Data file is as shown below for a better understanding

Figure 1

The XML File will be generated using the RDF Report as attached

Page 3 of 7

The XML Bursting File code for Sending the email is as illustrated below

Figure 2

Understanding the Bursting code: 1) <xapi:request select="/MODULE1/LIST_G_AGENT_ID/G_AGENT_ID"> The piece of the code highlighted above signifies the level at which bursting is to be done. Here, in the example we are bursting the XML Data file at the PO Header level. Please refer to XML structure in Figure 1 for better understanding.

2) <xapi:message id="123" to="${EMAIL_ADDRESS}" attachment="true" The piece of code picks up the email address dynamically from the <EMAIL_ADDRESS> tag of the XML Data File (at PO Header record level). Please refer to XML structure in Figure 1 for better understanding 3) <xapi:template type="rtf" location="/opt/oracle/apps/ODEVX/R12/inst/apps/ODEVX_edevdb7/appltmp/T est_Burst.rtf"> The path of the RTF Template can be pulled from the form as shown below

Page 4 of 7

Figure 3

Now we will see the concurrent program registration. The Format of the Concurrent program has to be set as XML as indicated in the snapshot below:

Figure 4

Defining the Bursting File in the Data definition as indicated below:

Page 5 of 7

The last step is to prepare the RTF template file and attach it. Please note that this template will enclose the messages that will be sent in the email to the buyers.

Test_Burst.rtf

Attach the RTF File to the Template definition of the concurrent program now. Now, after we will run the concurrent program (TEST_BURST), we will see that the emails are sent to the Buyers for each and every PO listed in the XML Data file.
Solution B Now we will see how can the Bursting feature be leveraged to FTP the files generated for every PO to a specific location on the server. The only change for this needs to be done in the bursting file.

Page 6 of 7

This file additionally contains the FTP Details of the server where we want to write the files.
I am attaching the XML Bursting files for Solution A and B for the ready reference.

TEST_BURST.xml

TEST_BURST_FTP.x ml

References: http://apps2fusion.com/at/cp/250-bursting-in-xml-bi-publisher

Page 7 of 7

Anda mungkin juga menyukai