Bursting: Conditional delivery

This is in response to arvind’s question on how we can set the conditional delivery based on the user preference available in xml data file. Here is an example.



<?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="email1" 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:filesystem id="file1"
output="C:\burst\sample\${EMPNO}_${ENAME}_${MGR}_PRINT.pdf"/>
<xapi:print id="print1" printer="${PRINT_URL}" copies="2"
orientation-requested="3" />
</xapi:delivery>
<xapi:document key="${EMPNO}"
output-type="pdf" delivery="email1">
<xapi:template type="rtf" location="${TEMPLATE_LOC}"
filter=".//EMPLOYEE[DEL_CHANNEL='EMAIL']" >
</xapi:template>
</xapi:document>
<xapi:document key="${EMPNO}" output-type="pdf" delivery="print1">
<xapi:template type="rtf" location="${TEMPLATE_LOC}"
filter=".//EMPLOYEE[DEL_CHANNEL='PRINT']" >
</xapi:template>
</xapi:document>
<xapi:document key="${EMPNO}" output-type="pdf" delivery="file1">
<xapi:template type="rtf" location="${TEMPLATE_LOC}"
filter=".//EMPLOYEE[DEL_CHANNEL='FILE_SYSTEM']" >
</xapi:template>
</xapi:document>
</xapi:request>
</xapi:requestset>

We need to define multiple document sections corresponding to each delivery channel and the filter condition to deliver the output based on user preference. Here DEL_CHANNEL is the element in xml data file, which define the user delivery preference.

Comments:

Ashish, Thanks for posting that, it looks like a really cool feature of the bursting control file that could come in handy. For clarity, though, could you post a sample of an XML data file that would go with that config file? Thanks, Glen

Posted by Glen on April 08, 2009 at 04:40 AM PDT #

Great tip! Thanks Kevin

Posted by Kevin Woodrow on April 23, 2009 at 05:54 PM PDT #

Hi, I tried this technique and it is working fine when I hard code the location of the template as /eb_rdo0/applmgr/pnappl/xxgis/11.5.0/reports/US/abc.rtf. But when I try the method $TEMP_LOC it is failing. Bursting logic is throwing an error as java.io.FileNotFoundException. Is there any setting we need to make ??

Posted by devendar gandra on May 12, 2009 at 03:51 AM PDT #

i have done few xml publisher reports and did little bit bursting. However, your example made me understand bursting better. Thanks,

Posted by sanjai misra on October 21, 2009 at 05:52 AM PDT #

This article is really good...It helps me a lot.. Thank you..

Posted by Amudalapati on November 21, 2009 at 10:12 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