XML Bursting

Oracle Bursting Mechanism enables us to deliver a single XML Publisher report/letter to multiple destinations simultaneously. This is a very helpful feature especially if you are trying to send the output of a report to an email address or multiple email address.The output is sent via email. User does not need to login to Oracle to get the report.

Picture1

Pre-requisite

1.SMTP configuration

2.Change the temporary directory location.

  • A temporary directory has to be provided for XML Publisher engine to use for bursting.
  • Responsibility: XML Publisher Administrator
  • Navigation: Administration tab
Picture2

3. Attach Seeded Program to the Responsibility: XML Publisher Report Bursting Program

The following Bursting File needs to be attached to the Data Definition of the BI Publisher report that you are trying to burst :

<!–?xml version=”1.0″ encoding=”UTF-8″?>

<xapi:requestset xmlns:xapi=”http://xmlns.oracle.com/oxp/xapi”&gt;

<xapi:request select=”/PERSON/LIST_G_FIRST_NAME”>

<xapi:delivery>

<xapi:email server=”ATANML01.at.adsonydadc.com” port=”25″ from=“XYZ@XXX.com” reply-to =“ABC@XXX.com”>

<xapi:message id=”123″ to=“${EMAIL}” attachment=”true” subject=“Busting Report”>

Busting Report Body

<!–xapi:message>

<!–xapi:email>

<!–xapi:delivery>

<xapi:document output=”${EMPLOYEE_NUMBER}” output-type=”excel” delivery=”123″>

<xapi:template type=”rtf” location=”xdo://PER.XX_PERSON.en.00/?getSource=true” filter=””>

<!–xapi:document>

<!–xapi:request>

<!–xapi:requestset>

Explanation of the bursting template

XML Tags

Explanation

xapi:request select= This tag in the control file indicates from which tag/node in the concurrent program output XML should separated for bursting
xapi:delivery This node contains all email related attributes
xapi:email This tag contains the email attributes like,server or the email server IP or nameport or the email server portfrom or the email address from which the server should send the emailreply-to or the email address to which the replies should be sent
xapi:message This tag contains the attributes about the email like,To or the email address where the email should be sentSubject or the email subjectattachment , i.e. if the email should contain an attachmentThe mail body will be enclosed within the tags
xapi:document This node contains the attachment document and XML template related tags and attributes.The attributes in this tag are related to the email attachmentOutput or attachment file nameOutput-type or attachment file type
xapi:template The node contains the template information like,Type or the file type of the template

Attach the Bursting File to Data Definition
Responsibility: XML Publisher Administrator
Navigation: Data Definition

XMLBursting021

The bursting process is now complete.
Automatic execution of XML Publisher Report Bursting Program
Since the bursting program, XML Publisher Report Bursting Program, has to be run manually this might not be feasible for all users to use. The bursting program can be executed automatically if we use a rdf report to generate the data for the XML publisher report. In a rdf report we can add the following piece of code in the After Report trigger in the report to execute the bursting program as soon as the output has been generated by the report.

function AfterReport return boolean is

req_id NUMBER;

err varchar2(4000);

BEGIN

SRW.USER_EXIT(‘FND SRWEXIT’);

begin

req_id := fnd_request.submit_request (‘XDO’, — application

‘XDOBURSTREP’,– program short name

”, — description

”, — start time

FALSE, — sub request

‘N’, — argument1

: P_CONC_REQUEST_ID, — argument2

‘N’, — argument3

NULL, — argument4

NULL, — argument5

NULL, — argument6

CHR (0) — represents end of arguments

) ;

exception when others then

err:= sqlerrm;

srw.message(100,’exception ‘ || err);

end ;

if req_id = 0 then

srw.message(101,’failed to submit bursting program ‘);

else

srw.message(102,’request id for bursting program is ‘||req_id);

end if;

return (TRUE);

END;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s