destype Examples Distribution XML File Examples

20-30 Publishing Reports to the Web with Oracle Reports Services 21 Using Event-Driven Publishing 21-1 21 Using Event-Driven Publishing Modern business processes often require the blending of automation into the work environment through behind-the-scenes functions and procedures. Behind-the-scenes tasks can include the automatic production of output such as an invoice that prints automatically when an order is processed, a Web site that is automatically updated with current data, or an automatic e-mail with fresh report output when a transaction is completed. Automatic output in response to events used to be a fairly complicated effort, particularly if you wished to produce the same results possible through interactive, RAD development tools, such as Oracle Reports Developer. To address the requirement of automatic output, Oracle Reports Services includes a scheduling mechanism that enables the invocation of reports on a scheduled basis without requiring additional user interaction. But this leaves one requirement unresolved: the ability to automatically run a report in response to an event in the database, such as the insertion of a record or the change of a value. With the Oracle Reports Services Event-Driven Publishing API, you can automatically run a report in response to an event in the database, such as the insertion of a record or the change of a value. The Event-Driven Publishing API is a PLSQL API that allows for the automatic submission of jobs to Oracle Reports Services from within the database. This chapter provides an overview of the Event-Driven Publishing API and includes examples of its use. It includes the following sections: ■ The Event-Driven Publishing API ■ Debugging Applications that Use the Event-Driven Publishing API ■ Invoking a Report from a Database Event ■ Integrating with Oracle Advanced Queuing

21.1 The Event-Driven Publishing API

The Event-Driven Publishing API is a PLSQL package that provides the basic functions required for the development of procedures that respond to events in the database. Event-driven jobs are submitted using the HTTP protocol. The server assigns a unique job_ident record to every call, useful for tracking the status of the job.

21.1.1 Elements of the API

The API consists of several key elements: