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:

Create your servlet or third-party application, as described in this chapter.

The servlet has to be made available bypassing security, therefore, the servlet mapping is required in web.xml (under WEB-INF folder).

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:

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 Publisher's APIs and Web services to access the job details, including report output and XML data as shown in the following code sample:

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.

10.2.2 Sample Program

Following is a sample HTTP servlet that is called as an HTTP Notification. In this example, the servlet is deployed on the same server as the BI Publisher application. If your servlet is deployed on a remote server, use the BI Publisher Web service APIs to access the report details. For more information about the BI Publisher Web service APIs, see Oracle Fusion Middleware Java API Reference for Oracle Business Intelligence Publisher 11g.

In this sample, the servlet uses the information provided by the HTTP request as input to the BI Publisher Web services to retrieve the report output. This could then be used to insert in an approval workflow.