Bursting...

During these years with Publisher, I worked with many clients directly/indirectly to resolve there reporting issues and one of the very common requirment is about generate mutilple outputs against the single process/report. Here I am sharing one such requirment...

The company’s billing system generates around 30 thousands invoices/bills for each billing cycle. Each billing cycle correspond to a single process and generate a huge set of data for all the invoices.

The process, further consume this huge data and generate the individual Invoices. i.e. one report and multiple output.

The individual Invoice layout depends upon the recipient’s country and local preference, So it could be multiple templates and multiple local. .

The process should take care of document delivery as well. Delivery type and the destination depend on individual client’s preference. Beside it, a copy of each invoice should be save to specific file location or transferred to content management system. To achieve this, the process should allow to hook custom APIs/Logic before and after individual documents generation.

Beside the individual output, there should be another single consolidated output against the same set of data. i.e. a summary report.

So what do you think, Can we satisfy this requirement against the single process?

Yes, The Bursting take care of such type of requirements where single dataset, multiple conditional layouts/templates, multiple layout, multiple delivery and the listener to hook the custom logic at each stage of process.

There are two type of bursting implementation within BI Publisher. The Control File based bursting, which is well integrated with EBS and JDE and available through Public APIs as well. The other one is Delivery SQL based bursting, which is part of Enterprise Release. We will discuss the first one on this post.

The Bursting Control file holds the Meta Data or the bursting rules in XML format.Lets have a look on following control file and see, how far it satisfies the above requirement.



<?xml version="1.0" encoding="UTF-8"?>
<xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi">
<xapi:globalData location="stream">
</xapi:globalData >
<xapi:request select="/DATA/LIST_DEPT/DEPT/LIST_EMPLOYEE/EMPLOYEE">
<xapi:delivery>
<xapi:email server="${EMAIL_SERVER}" port="${EMAIL_PORT}" from="${FROM_EMAIL_ADDRESS}"
reply-to ="${REPL_TO_ADDRESS}">
<xapi:message id="123" to="${TO_EMAIL_ADDRESS}" cc="${CC_EMAIL_ADDRESS}"
attachment="true" content-type="html/text"
subject="Employee Report for Empno ${EMPNO}"> Dear ${ENAME},
Please review the attached document.</xapi:message>
</xapi:email>
<xapi:print id="printer1" printer="${PRINT_URL}" copies="2"
orientation-requested="3" />
</xapi:delivery>
<xapi:document key="${EMPNO}" output="c:\burst\sample\${EMPNO}_${ENAME}.pdf"
output-type="pdf" delivery="123">
<xapi:template type="rtf" location="${EMP_TEMPLATE}">
</xapi:template>
</xapi:document>
</xapi:request>
</xapi:requestset>


A sample control file available here.

This will not exactly satisfy the above requirement but it gives an idea, how we can proceed to achieve the above requirement.

Here is the sample usage of Bursting Engine. We can call bursting engine either directly or through DocumentPrecoessor. Calling directly gives more control over some of the internal methods. API accept the Control file, Data File and Temporary directory path.

Using BurstingProcessorEngine directly..

try {
BurstingProcessorEngine dp = new BurstingProcessorEngine();
dp.deleteTempOutputFile(false);
dp.setTempDirectory("c:\\burst\\sample");//Set the temp file
dp.setXMLAPI("C:\\burst\\sample\\SampleControlFile.xml"); //Set Bursting Control file.
dp.setData("c:\\burst\\sample\\employee.xml"); //Data File
dp.registerListener(this); //Set the listener
Properties prop = new Properties(); //add properties and variables//
prop.put("user-variable:EMAIL_SERVER", "myemailserver.com");
prop.put("user-variable:EMAIL_PORT", "25");
prop.put("user-variable:FROM_EMAIL_ADDRESS", “admin@xyz.com");
prop.put("user-variable:CC_EMAIL_ADDRESS", "cc@xyz.com");
prop.put("user-variable:PRINTER_URL", "ipp://myprintserver:631/printers/printer1");
prop.put("user-variable:EMP_TEMPLATE", "c:\\burst\\sample\\employee.rtf");
dp.setConfig(prop);
dp.process();
dp.deletTemporaryOutputFiles();
} catch (Exception e) {
Logger.log(e);
}

Using DocumentProcessor:

try {
DocumentProcessor dp = new DocumentProcessor("C:\\burst\\sample\\SampleControlFile.xml","c:\\burst\\sample\\employee.xml", "c:\\burst\\sample");
dp.setTempDirectory("c:\\burst\\sample");//Set the temp file
dp.setXMLAPI("C:\\burst\\sample\\SampleControlFile.xml"); //Set Bursting Control file.
dp.setData("c:\\burst\\sample\\employee.xml"); //Data File
dp.registerListener(this); //Set the listener
Properties prop = new Properties(); //add properties and variables//
prop.put("user-variable:EMAIL_SERVER", "myemailserver.com");
prop.put("user-variable:EMAIL_PORT", "25");
prop.put("user-variable:FROM_EMAIL_ADDRESS", “admin@xyz.com");
prop.put("user-variable:CC_EMAIL_ADDRESS", "cc@xyz.com");
prop.put("user-variable:PRINTER_URL", "ipp://myprintserver:631/printers/printer1");
prop.put("user-variable:EMP_TEMPLATE", "c:\\burst\\sample\\employee.rtf");
dp.setConfig(prop);
dp.process();
} catch (Exception e) {
Logger.log(e);
}


A sample test case including sample java application, control file, data file, rtf template is available here. Please make sure you have following libraries in class path
Collection.jar, xdo.jar, Xmlparserv2.jar, mail.jar, Activaton.jar, aolj.jar, i18n, xdoparser.jar,Versioninfo.jar and use 10.1.3.4+ release.

Try it out and let me know your experience. We will see some more interesting example during coming post, so stay tune…

Comments:

Hi Ashish, Thanks for the information provided on bursting. I have tried the control file mechanism and I am able to send files through email delivery mechanis. What I want to find out is how we can dynamically customize the delivery mechanism using a control file., i.e. If one employee needs his payslip delivered through mail another through fax etc. So how do we do the changes in the control file to make it dynamic. (assuming the delivery mechanism is stored in some table on a Database). On the same lines, I have one more question. If I am streaming the XML onto the enterprise server, which has a report with an empty Data Model. So, I will be passing the data model from the web services. Is it posible to set the SQL uery prior to all this? I mean while creation of the report with an empty data model can we still set its Query for bursting? Thanks in Advance, Kind Regards, Arvind.

Posted by Arvind on April 07, 2009 at 11:30 PM PDT #

Is Conditional Formatting possible in Pivot table template? Hi Ashish, I m developing financial reports from Essbase cube using MDX in BI Publisher. BIP Version is 10.1.3.4. I m using Microsoft word 2003 with BI Publisher Desktop add in in it. The template I use is pivot table (i.e. Oracle BI Publisher-> Insert-> Pivot Table). Is conditional fomatting possible in pivot table template report. As when I insert-> Conditional formatting it pivot table template it throws error as like ''Conditional format is not inside a table and therfore not applied to a table row''. With Regards Pradeesh

Posted by Pradeesh on April 23, 2009 at 11:36 PM PDT #

This is in response to Pradeesh's question. Pradeesh, you can do conditional formatting in Pivot table too. Just that the Pivot table wizard does not have this feature in-built and when you use the conditional formatting from insert-->conditional formatting, it expects the selection to be inside word table boundary. So if you select any content outside the table, then you get the message - ''Conditional format is not inside a table and therfore not applied to a table row". So if the content is outside of table you can either use the regional formatting for any conditional display, or you can manually enter the BI Publisher code syntax or even XSL syntax for conditional formatting. Just make sure to keep your XSL code inside the data placeholder. If you are still stuck, just let us know what you are trying to format conditionally and we can help.

Posted by Pradeep on April 27, 2009 at 07:54 PM PDT #

Hi Ashish, You had told that "Besides the individual output, there should be another single consolidated output against the same set of data. i.e. a summary report." Could you pls. let me know how to achieve this? Thanks, Suresh.

Posted by Suresh on May 03, 2009 at 03:42 PM PDT #

Hi Ashish, I have gone through this blog. I am facing the following issues with standalone BIP. Whatever indicated under "${...}" in the control file needs to be defined in java properties otherwise it is throwing an error. So,how i will decide my file name on the basis of invoice number at runtime during bursting? In the xml file, INVOICE_NUMBER is an element and my file bursting should be with the name of invoice_number.pdf. In your example,${...} symbol is not getting replaced by the xml tag values unless it is defined under java properties. Is there any way to trap the XML tag value in the datafile from the control file? Thanks in Advance, Kind Regards, Snehotosh.

Posted by guest on August 25, 2009 at 06:39 PM PDT #

Hi Ashish, Once you register the BurstingListener how do you get to the contents of the DocumentProcessor, e.g. the XML file containing the current pruned XML? Do you have any example? Feel free to email me at ****************** Thanks, Gareth

Posted by Gareth Roberts on December 03, 2009 at 09:47 AM PST #

Hi Ashish, I was going through your post to find out a solution for our requirement in which we have to generate invoice and send it to customer through email. Your thread answers lot of my questions.I have another specific question about invoice generation and sending the same through email. In our requirement, we have to generate the invoice and save it to a particualr folder. Once the invoices are saved, we have to pick those invocies and send them by email. Can we seperate out these two operations. As per my understanding from documentation and developer's guide, when we burst the invocies through email as attachment, the invoices are generated first and then send as attachment. Instead of this, can we attach already saved invoices to email. Your suggestion is highly appreciated. Thanks Angshuman

Posted by Angshuman Mukherjee on June 12, 2010 at 04:20 PM PDT #

Hi Ashish, Our requirement is to place one copy in specific location . I think SampleBursting.java Cater our need My Doubt is how and where to compile the SampleBursting.java and how to use the SampleBursting.class i.e., how to hook this custom api to control file. Thanks. Shiva Kumar

Posted by Shiva Kumar on July 01, 2010 at 03:59 PM PDT #

Hi Shiva, SampleBursting.java is a simple java class and can be integrated, invoked from any application, if you have all required libraries in classpath. You need following libraries to to compile and run the SampleBursting.java class Activation.jar Aolj.jar Collections.jar/Collection.zip I18nAPI.jar (I18n*.jar) Xdo.jar Xmlparserv2.jar Mail.jar These libraries are available with BI Publisher enterprise Release and EBS (R11, R12) as well.

Posted by ashish.shrivastava on July 01, 2010 at 04:34 PM PDT #

I'm using a stand alone BIP and I have a bursting requirement, can you please tell me how and where to write the code for the control file? and where do I write the java code?

Posted by Raj on July 26, 2010 at 11:16 AM PDT #

Any solution for what Angshuman Mukherjee aksed, we have a similar requriement where i have to save the files (after bursting) to a specific location...for some reason it is not working for me. Any suggestions highly appreciated!

Posted by sam on August 18, 2010 at 01:29 PM PDT #

Hi Sam, Thats is pretty miuch possible. 1) With bursting porcess you can choose the file delivery to save the Invoices/report to required folder. 2) write another Java program with which read the folder, pick the Invoice in the loop and email it using Deliver manager Now how to get the delivery details (email address) ? If email is part of xml data file, implement the bursting status listener, and add the logic in before deliver to push the xml data file to same location as invoices/report. This way, you can parse the XML data file to get the email address and other details for that perticular inoivce/report.

Posted by ashish.shrivastava on August 18, 2010 at 03:02 PM PDT #

Hi Ashish, I have a payment format generated in e-Text format. I want to place this in a different server. Can I do the same using XML Bursting? If so can you please help me with some inputs? Thanks, Arun Raj

Posted by Arun on August 31, 2010 at 03:03 PM PDT #

Hi Aashish, i am new to XML publishers. I am working on one XML report for which the output needs to be sent to some recipient. Now when there is some data in the output file,it sending it smoothly but when the output is blank.it throwing an error. PLease let me know if we can send blank file through bursting and how. Error coming is: OUTPUT_TYPE>excel email /tmp/090210_043402909/xdo1_1_2.xls fail Error!! Could not deliver the output for Delivery channel:null . Please check the Log for error details.. Regards Gopal

Posted by Gopal Sharma on September 03, 2010 at 05:44 AM PDT #

The example creates only one pdf with first employee record. Please let me know how to create multiple pdf's for each employee?

Posted by sarada on April 13, 2011 at 04:12 PM PDT #

I am able to run the sample successfully. Thank's a lot. I have a small query, can a bursting, call .xdo file in BIPServer instead of employee.rtf locally ?

Posted by guest on April 20, 2011 at 09:37 AM PDT #

We can reference a EBS Report/template through XDO protocals, but an .XDO (enterprise BIP report)

Posted by ashish.shrivastava on April 20, 2011 at 01:31 PM PDT #

I have problem in bursting reports to email ids having apostrophe. For Eg. I am unable to deliver reports to vikas'osharma@xyz.com

getting following error:

Error!! Could not deliver the output for Delivery channel:EMAIL . Please check the Log for error details..

Please advise.

Posted by guest on December 13, 2011 at 08:11 PM PST #

Hi all

I am using the Delivery SQL method to burst my report, but i have a file data source (input.xml)and not a JDBC data saource as the report data source. How do i write my delivery query given that the input.xml file is in a file data source, which i cannot see in my bursting definition.

Thanks very much!

Posted by guest on February 14, 2012 at 03:00 AM PST #

Is it possible to get XML File as Output of Bursting?

I have a requirement where I want to send the xml data generated by XML Publisher to a email id . is this possible via bursting.

Posted by guest on July 09, 2012 at 04:01 AM PDT #

There is no 'XML' type output, but you can implement the Bursting Listener and have custome logic to get the XML ans deliver it.
Check out this article.

Check out the "Working with Bursting Listener" blog.
https://blogs.oracle.com/BIDeveloper/entry/working_with_bursting_listener

Posted by ashish shrivastava on July 09, 2012 at 04:10 AM PDT #

Hi Ashish,

Thanks for the reply. But how can we invoke the Bursting listener. Can we do it in Bursting control file any examples

Posted by Ashish Harbhajanka on July 11, 2012 at 07:12 PM PDT #

I want to automate bursting issue. currently we have to manually burst BIP reports for given parameters.

Is there any way that we can automate this process?

Regards
Vikas

Posted by guest on February 22, 2013 at 01:08 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

bocadmin_ww

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today