Configuring the Application Module Updating web.xml
10.1 Overview of After-Report Triggers
BI Publisher enables you to set up an HTTP notification that will execute after-report generation as an after-report trigger. This enables you to integrate BI Publisher with other Oracle and third-party applications such as a BPEL process, Content Management applications, or other workflow applications. BI Publisher supports Event triggers Before Data and After Data triggers in the Data Model Definition, which you can use to trigger programs during data generation. HTTP notification will trigger after the report is generated.10.1.1 Limitations
Note that immediately upon the generation of the report in BI Publisher, the notification will execute. There is currently no ability to call back or introduce a listener or process between the report generation and the HTTP notification to your servlet.10.1.2 Process Overview for Adding After-Report Triggers to Reports
The following tasks are required to complete the setup of an after-report trigger for your report: 1. Create your servlet or third-party application, as described in this chapter. 2. Register your servlet URL as an HTTP delivery server in the BI Publisher Administration page. See Section 10.2.1, Registering the HTTP Servlet. The servlet has to be made available bypassing security, therefore, the servlet mapping is required in web.xml under WEB-INF folder. 3. Create a schedule for the report, choosing HTTP Notification.10.2 Setting Up After-Report Triggers
When the report generation has completed BI Publisher will call the HTTP notification as a post-process and submit the URL that you registered as an HTTP server with the following additional parameters: 10-2 Developers Guide for Oracle Business Intelligence Publisher ■ jobid ■ report_url ■ status Values for status are S for success and F for failure. Your remote application can then access these parameters using BI Publishers APIs and Web services to access the job details, including report output and XML data as shown in the following code sample: Example 10–1 Sample Code for Setting Up After-Report Triggers String id = request.getParameterjobid; String report_url = request.getParameterreport_url; String status = request.getParameterstatus; try { Scheduler sch =new SchedulerImpl; JobHistoryInfo[] jobs= sch.getJobHistoryInfoid; for int i = 0; ijobs.length; i++{ JobHistoryInfo outinfo = jobs[i]; FileOutputStream fos = new FileOutputStreamtargetDir+id+.pdf; byte[] buf = new byte[256]; int read = 0; InputStream in = outinfo.getDocumentOutput; while read =in.readbuf 0 { fos.writebuf, 0, read; } in.close; fos.close; } } catch Exception e { Logger.loge; }10.2.1 Registering the HTTP Servlet
Note that if the HTTP servlet is running inside the BI Publisher application on the same server, you must register it in web.xml located in the WEB-INF folder. Update the web.xml file as follows: servlet servlet-nameHttpNotificationTestservlet-name servlet-classoracle.xdo.service.scheduling.HttpNotificationTestservlet-class servlet servlet-mapping servlet-nameHttpNotificationTestservlet-name url-patternservicesHttpNotificationTesturl-pattern servlet-mapping Alternatively, you can create a JSP page instead of a HTTP Servlet to handle this HTTP notification. With JSP, you do not need to modify web.xml.Parts
» Oracle Fusion Middleware Online Documentation Library
» About BI Publisher Web Services About In-Session Methods
» Click the Add button. You will see a new tab with the new monitor listening on
» Base Data Types XML-to-Java Data Type Mappings
» Complex Data Types Oracle Fusion Middleware Online Documentation Library
» cancelSchedule Method cancelScheduleInSession Method
» deleteSchedule Method Oracle Fusion Middleware Online Documentation Library
» deleteScheduleInSession Method deliveryService Method deliveryServiceInSession Method
» downloadDocumentData Method downloadDocumentDataInSession Method
» getAllScheduledReport Method Oracle Fusion Middleware Online Documentation Library
» getAllScheduledReportHistory Method getAllScheduledReportHistoryInSession Method
» getAllScheduledReportInSession Method getDeliveryServiceDefinition Method
» getScheduledJobInfo Method getScheduledJobInfoInSession Method
» getScheduledReportDeliveryInfo Method Oracle Fusion Middleware Online Documentation Library
» getScheduledReportDeliveryInfoInSession Method getScheduledReportOutputInfo Method
» getScheduledReportOutputInfoInSession Method getXMLData Method
» getXMLDataInSession Method purgeJobHistory Method purgeJobHistoryInSession Method
» resendScheduledReport Method Oracle Fusion Middleware Online Documentation Library
» resendScheduledReportInSession Method resumeSchedule Method
» resumeScheduleInSession Method scheduleReport Method
» scheduleReportInSession Method suspendSchedule Method suspendScheduleInSession Method
» createReport Method Oracle Fusion Middleware Online Documentation Library
» createReportInSession Method downloadReportDataChunk Method
» downloadReportDataChunkInSession Method getReportDefinition Method
» getReportDefinitionInSession Method getReportParameters Method
» getReportParametersInSession Method getReportSampleData Method getReportSampleDataInSession Method
» getTemplate Method getTemplateInSession Method
» getTemplateParameters Method Oracle Fusion Middleware Online Documentation Library
» getTemplateParameterInSession Method Oracle Fusion Middleware Online Documentation Library
» getXDOSchema Method Oracle Fusion Middleware Online Documentation Library
» getXDOSchemaInSession Method Oracle Fusion Middleware Online Documentation Library
» removeTemplateForReport Method removeTemplateForReportInSession Method runReport Method
» runReportInSession Method updateReportDefinition Method
» updateXLIFFForReport Method updateXLIFFForReportInSession Method
» uploadReportDataChunk Method uploadReportDataChunkInSession Method uploadTemplateForReport Method
» createUser Method Oracle Fusion Middleware Online Documentation Library
» getBIPHTTPSessionInterval Method Oracle Fusion Middleware Online Documentation Library
» hasObjectAccess Method hasObjectAccessInSession Method
» impersonate Method isUserExists Method
» updateRole Method updateUser Method
» validateLogin Method Oracle Fusion Middleware Online Documentation Library
» copyObject Method copyObjectInSession Method createFolder Method
» createFolderInSession Method createObject Method
» createObjectInSession Method Oracle Fusion Middleware Online Documentation Library
» downloadObject Method Oracle Fusion Middleware Online Documentation Library
» downloadObjectInSession Method downloadXLIFF Method downloadXLIFFInSession Method
» getFolderContents Method getFolderContentsInSession Method getObject Method getObjectInfo Method
» getObjectInfoInSession Method Oracle Fusion Middleware Online Documentation Library
» getObjectInSession Method objectExist Method
» objectExistInSession Method renameObject Method renameObjectInSession Method
» updateObject Method updateObjectInSession Method uploadObject Method uploadObjectInSession Method
» uploadXLIFF Method uploadXLIFFInSession Method
» Prerequisites Oracle Fusion Middleware Online Documentation Library
» Obtaining the Libraries Oracle Fusion Middleware Online Documentation Library
» RTF Processor Engine Oracle Fusion Middleware Online Documentation Library
» FO Processor Engine Oracle Fusion Middleware Online Documentation Library
» PDF Document Merger Oracle Fusion Middleware Online Documentation Library
» PDF Bookbinder Processor Oracle Fusion Middleware Online Documentation Library
» PDF Digital Signature Engine
» eText Processor Oracle Fusion Middleware Online Documentation Library
» Document Processor Engine Oracle Fusion Middleware Online Documentation Library
» BI Publisher Properties Oracle Fusion Middleware Online Documentation Library
» Advanced Barcode Formatting Oracle Fusion Middleware Online Documentation Library
» Delivering Documents by E-Mail
» Delivering Your Document to a Printer
» Delivering Your Document to a Local Printer
» Delivering Your Documents to a Fax Server Delivering Your Documents to a RightFax Server
» Delivering Your Documents to a WebDAV Server
» Delivering Your Document over the File Transfer Protocol FTP
» Delivering Your Documents over Secure FTP
» Delivering Your Documents over Hypertext Transfer Protocol HTTP
» Delivering Documents over AS2
» Delivering Documents Using an External Command Delivering Documents to the Local File System
» Asynchronous Delivery Requests Oracle Fusion Middleware Online Documentation Library
» Document Filter Support Oracle Fusion Middleware Online Documentation Library
» Date Expression Support Oracle Fusion Middleware Online Documentation Library
» Internationalization Support Setting Global Properties
» Define Delivery Properties Register your custom DeliveryRequestFactory to the DeliveryManager
» Implement DeliveryRequest Interface Implement DeliveryRequestHandler Interface
» Register your custom DeliveryRequestFactory to DeliveryManager
» Configuration File Support Oracle Fusion Middleware Online Documentation Library
» Configuring the Application Module Updating web.xml
Show more