2 Workspace Manager Events
Certain applications may be interested in knowing what Workspace Manager operations are being performed and may want to take some actions based on that. Several types of Workspace Manager operations can be captured as events.
Workspace Manager provides a framework for communicating these events asynchronously to the interested applications. The applications can then take some actions based on the event. Some scenarios in which events can be used include the following:
-
An application wants to be notified whenever a workspace is merged to LIVE so that it can refresh its data.
-
Workspace data needs to be archived whenever a new savepoint is created.
The Workspace Manager event framework is built on the Oracle Advanced Queuing (AQ) capability. Messaging features provided by AQ, such as asynchronous notification, persistence, propagation, access control, history, and rule-based subscription, can be used for Workspace Manager events.
Workspace Manager creates a multiconsumer queue where events are enqueued. The relevant information about the event, such as the type of event, the user and workspace that triggered the event, and the name of the versioned table, is initialized in the event payload and enqueued. Applications can subscribe to these events, optionally specifying a rule for their subscriptions. Only the events that satisfy the rule will be applicable to the subscriber. Subscribers can get event notification in variety of ways, such as listening for the events in the queue, registering a callback for notification, or explicitly dequeuing events from the queue.
Because events are communicated asynchronously to the other applications, the performance of the workspace operation generating the event is not affected.
Note:
To use Workspace Manager events in an application, you must understand the relevant AQ concepts and techniques described in Oracle AI Database Transactional Event Queues and Advanced Queuing User's Guide.
This chapter contains the following major sections:
- List of Workspace Manager Events
The following table lists the Workspace Manager events and when each occurs. - Event Parameters
When an event occurs, information is stored in parameters that are bundled into an object type calledWMSYS.WM$EVENT_TYPE
and enqueued into the event queue. A subscriber can dequeue the event object on receiving notification. - ALLOW_CAPTURE_EVENTS System Parameter
The Workspace Manager system parameterALLOW_CAPTURE_EVENTS
can be used to capture events. - AQ Operations and Workspace Manager Events
This section describes Advanced Queuing objects and techniques relevant to developers of applications that work with captured Workspace Manager events.
Parent topic: Conceptual and Usage Information