Wednesday, June 13, 2018

XML Bursting with Example


1. Create RDF Report
2. Register Executable
3. Register Concurrent Program
4. Create XML bursting control file
5. Register data definition
6. Create RTF template File
7. Upload RTF file to data template
8. Place RTF File on Server
9. Add concurrent program in request group
10. Set the Temporary Working Directory
11. Submit concurrent Program and wait for email

XML Bursting Concept

Oracle Defines it as following
Oracle Reports enables you to deliver a single report to multiple destinations simultaneously. Using the new, enhanced distribution feature, you can set up your report to be distributed to an e-mail destination, a portal, a printer, or anywhere else when the report is run. This feature also enables you to improve performance, since you only fetch the data once for many different formats and destinations. Using distribution also reduces your maintenance overhead because you only need one job request to publish the report to multiple destinations. You can refine this further by sending the Header section to some recipients, the main to others, and the entire report to an entirely different recipient list.

Business Requirement
We have a concurrent program for generating payslip and we want a concurrent program through which payslip should be generated and output should be emailed to all persons. Every person should receive only his related payslip.
Solution concept
There are different ways of achieving this task. But in this post i am demonstrating the feature of XML Bursting to accomplish this task. In this example we shall create the concurrent program and will see how to burst it through XML Bursting.
Step By Step Solution
Note: In case of pure xml report, this report has to be called through pl/sql and xml bursting program should be called sub sequentially passing the request id of report concurrent program.
Step 1 – Create a report in RDF 
Create a report in Oracle Report Builder and make sure that report should contain following
1. Parameter p_conc_request_id
2. User Exit in Before and After Report Triggers
3. User Exit and XML Publisher bursting program call on After Report Trigger
XML Bursting Report

After Report Trigger should look like this
After Report Trigger

Step 2 – Register Executable
Once report is ready, register its executable program through Application Developer responsibility
Oracle HRMS Executeable

Step 3 – Register Concurrent Program
Register Concurrent Program against the executable created in step above. Make sure the Output should be of XML type.
Concurrent Program
Add Variable to Concurrent program. These parameters will be as per your custom requirement. In this example for simplicity purpose, i have taken only one parameter of business group id. Make sure that token of parameter should match with parameters in RDF Report.
Concurrent Program Parameters

XML output of this program looks like this
XML File
Step 4 – Create XML bursting control file
Next and very important step is to create the XML Bursting control file. Oracle has suggested instructions to create the bursting control file, Following which we can control the behavior of this feature as per our need. Find the example of sample control file.
XML Bursting Control File Simple

Detailed explanation of above file is given below
XML Bursting control File Sample
Step 5 – Register data definition
Register data definition through XML Publisher responsibility. Make Sure that Short Code of concurrent program and Code of data definition should be same.
Data Definition
Step 6 – Create RTF template File
Using the XML file that we had generated in Step 3 above, create RTF template. Creating RTF template using XML publisher is out of scope of this post. Once template is ready, it looks like this.
RTF Template File
Step 7 – Upload RTF file to data template
Create template against the data definition created above and upload the RTF template file as shown below
Data Template
Step 8 – Upload RTF Template to Data Template
This additional step is must required. You need to upload RTF template at any location on your server. Bursting program considers this template to generate the output. You can place this file using WinScp software if you have access otherwise ask your DBA to place file on any location of your application server. Preferably, you can put this template file on your temporary folder that you will do in Step 10ahead.
Step 9 – Add concurrent program in request group
At this step you need to add your custom program XX Employee Data – XML Bursting in request group of your responsibility. You should also add the XML Publisher Report Bursting Program program in addition to it. Short name of XML Bursting concurrent program is XDOBURSTREP. 
You had called this program in the After-Report parameter of you RDF report created above. If you will not add this concurrent program in your request group,  your concurrent program will execute smoothly but xml publisher concurrent program will error out.


Step 10 – Set the Temporary Working DirectoryYou also need to set the temporary working directory. Through XMP Publisher responsibility, Go to Administration Tab
XML Publisher Admin
and set the value of temporary working directory.
Temp Directory Location
It could be any directory where Apps user create the temporary files to be used for bursting.
Final Step for XML Bursting – Submit concurrent Program and wait for email
At this point, all your steps are completed and its time to submit the custom concurrent program XX Employee Data – XML Bursting.
Once you submit the program, as soon as it gets completed, it submits bursting program that we had called in After-Report trigger of rdf report of this concurrent time. If this program gets completed successfully and your SMTP server is configured properly, you should received an email as per your control file.
In my case case, following  is the email i received through this concurrent program.
email attachment
Following is further detail, when i open the attachment in the email i received.
Attachment Detail

No comments:

Post a Comment

Buyer Setup

1) In HRMS  'People > Enter and maintain',Create New Employee  whose Last name must be same as User name Which we are logged in...