Granting Item Level Privileges

16 Using the Content Management Event Framework 16-1 16 Using the Content Management Event Framework This chapter describes the Oracle Portal Content Management Event Framework CMEF. It contains the following sections: ■ Section 16.1, What Is the Content Management Event Framework? ■ Section 16.2, How Does the Content Management Event Framework Work? ■ Section 16.3, Using the Content Management Event Framework ■ Section 16.4, Installing the Examples ■ Section 16.5, Example: Portal Object Event Logging ■ Section 16.6, Example: Item Notification ■ Section 16.7, Example: Item Validation ■ Section 16.8, Example: Integrating External Workflow 16.1 What Is the Content Management Event Framework? CMEF enables you to extend Oracle Portals content management functionality by adding programmatic hooks to certain pre-defined portal events. The framework publishes these events to an Oracle database queue. This allows third party programs to subscribe to these events and to use the APIs to extend your portal. In this way, you can use page and item related events within a portal to trigger actions within one or more external applications. 16.2 How Does the Content Management Event Framework Work? CMEF uses Oracle Streams Advanced Queuing AQ technology. Oracle Streams AQ is an Oracle database component that provides a message-queue system with a rich and industry standard feature set. Oracle Streams AQ offers the following features: ■ Multiple ways for applications producers to place messages in a queue enqueue. ■ Multiple ways for applications consumers to get messages from a queue dequeue. ■ A publishsubscribe model that enables the producer application to be independent of the consumer applications. ■ Propagation of messages between queues on different machines and databases. 16-2 Oracle Fusion Middleware Developers Guide for Oracle Portal ■ Guaranteed delivery of messages along with exception handling in case messages cannot be delivered. ■ Persistent storage of messages. ■ Message prioritization. ■ Time properties for messages such as expiration and delays. For more information, refer to the Oracle Streams Advanced Queuing page on the Oracle Technology Network OTN: http:www.oracle.comtechnologyproductsaq Actions within a portal through the Oracle Portal user interface, the Web-based Distributed Authoring and Versioning WebDAV protocol, or PLSQL APIs trigger CMEF events. These events cause Oracle Portal to publish CMEF messages to a queue. You can create subscribers to consume the messages on the queue and perform actions based on them. For example, you could create a subscriber to verify that when a user adds an item to a portal page, its display name is less than 80 characters. The subscriber may process events as they occur or process them based on some time interval. There are three major types of CMEF events: ADD, UPDATE, and DELETE. Every content management action falls under one of these events. An event can be in one of several different states. For example, when a user adds an item to a page, the state of the ADD event indicates whether the item is available immediately PUBLISHED or at some later date NOT_PUBLISHED. Refer to Section 16.3, Using the Content Management Event Framework to learn more about how subscribers can use this information to retrieve messages of interest to them. Using the events published by CMEF involves the following five basic queuing operations: ■ Enqueuing Messages: Oracle Portal publishes messages known as enqueuing to the multiconsumer queue named WWSBR_EVENT_Q. Messages to this queue never expire. For more information, refer to Section 16.2.1, Enqueuing Messages . ■ Dequeuing Messages: Subscribing applications pick up messages known as dequeuing from the queue. For more information, refer to Section 16.2.2, Subscribers and Dequeuing Messages . ■ Exception Handling: A message is said to be processed normally if it is consumed within the specified time interval and within the specified number of attempts. Messages not consumed normally are placed in a separate queue called the exception queue. For more information, refer to Section 16.2.3, Exception Handling . ■ Listening for Messages: An application can use LISTEN to wait for messages for multiple subscriptions without having to repeatedly poll the queue. For more information, refer to Section 16.2.4, Listening for Messages . ■ Notifications: This Oracle Streams AQ feature enables users or clients to receive notification of a message of interest. For more information, refer to the Oracle Streams AQ documentation. You use the DBMS_AQ package to perform queuing operations.

16.2.1 Enqueuing Messages

CMEF enqueues messages to the WWSBR_EVENT_Q queue, specifying AQ message properties that subscriber applications can then use at dequeue time Table 16–1 .