Skip Headers
Oracle® Database PL/SQL Packages and Types Reference
11g Release 1 (11.1)

Part Number B28419-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

238 Rules Manager Types

Rules Manager is supplied with one predefined type and a public synonym for this type.

See Also:

Oracle Database Rules Manager and Expression Filter Developer's Guide for more information.

This chapter contains the following topics:


Summary of Rule Manager Types

Table 238-1 describes the Rules Manager object type.

Table 238-1 Rules Manager Object Types

Object Type Name Description
RLM$EVENTIDS Object Type
Specifies a list of event identifiers to the CONSUME_PRIM_EVENTS procedure


RLM$EVENTIDS Object Type

The RLM$EVENTIDS type is defined as a table of VARCHAR2 values as follows:

Syntax

CREATE OR REPLACE TYPE RLM$EVENTIDS is table of VARCHAR2(38);

Attributes

None.

Usage Notes

Examples

The following commands show the body of the action callback procedure for a rule class configured for RULE consumption policy. This demonstrates the use of RLM$EVENTDIDS type to consume the events before executing the action for the matched rules.

CREATE OR REPLACE PROCEDURE PromoAction (
      Flt        AddFlight, 
      Flt_EvtId  ROWID,    --- rowid for the fligt primitive event
      Car        AddRentalCar, 
      Car_EvtId  ROWID, 
      rlm$rule   TravelPromotions%ROWTYPE) is 
 evtcnsmd   NUMBER; 
BEGIN
 evtcnsmd := dbms_rlmgr.consume_prim_events(
              rule_class   => 'TravelPromotions',
              event_idents => RLM$EVENTIDS(Flt_EvtId, Car_EvtId));

 IF (evtcnsmd = 1) THEN 
   -- consume operation was successful; perform the action ---
   OfferPromotion (Flt.CustId, rlm$rule.PromoType, rlm$rule.OfferedBy);
 END IF;
END;
/