|Oracle® Database PL/SQL Packages and Types Reference
11g Release 2 (11.2)
|PDF · Mobi · ePub|
This functionality is deprecated with Oracle Database Release 11.2 and obsoleted with Release 12.1. For details regarding obsolescence, seeMy Oracle Support Note ID 1244535.1
See Also:Oracle Database Rules Manager and Expression Filter Developer's Guide for more information.
This chapter contains the following topics:
This section contains topics that relate to using the Rules Manager Types.
The Oracle Database installation runs the
catrul.sql script to load the
DBMS_RLMGR package and create the required Rules Manager schema objects in the
Table 257-1 describes the Rules Manager object type.
|Object Type Name||Description|
Specifies a list of event identifiers to the
RLM$EVENTIDS defines a table of
CREATE OR REPLACE TYPE RLM$EVENTIDS is table of VARCHAR2(38);
RLM$EVENTIDS type passes a list of event identifiers to the
CONSUME_PRIM_EVENTS procedure. These event identifiers are
ROWIDs for the corresponding events in the database and their values are available through the arguments of the action callback procedure and rule class results view columns, when the rule class is configured for
RULE consumption policy
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; /