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 (4)
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 | April 8, 2009 11:40 AM
Posted on April 8, 2009 11:40
Great tip!
Thanks
Kevin
Posted by Kevin Woodrow | April 24, 2009 12:54 AM
Posted on April 24, 2009 00:54
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 | May 12, 2009 10:51 AM
Posted on May 12, 2009 10:51
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 | October 21, 2009 12:52 PM
Posted on October 21, 2009 12:52