Table of Contents

Event Modeling - Event Rule

What is a Rule?

Logical Data Modeling - Rule

A rule is a directive to guide or influence a process behaviour and is a key concept of an Event driven architecture.

A rule consists of a conditional expression that is specified using the attributes defined in a corresponding event structure and a rule action that takes place when the rule condition is satisfied by an instance of the event structure.

Event management policies define how an event instance is handled once the rule action is executed. This, in a nutshell, describes how a typical rules-based system works.

Typically, rules follow Event-Condition-Action (ECA) rule semantics where an event happens and if a rule condition evaluates to true for this event, then some prescribed action is performed. The ECA components are defined as:

Standard Notation

The standard notation for ECA rules is:

ON    <event structure>
IF    <condition> 
THEN  <action> 

where:

Example

An example of a rule is the following: If a customer chose to fly Abcair Airlines to Orlando and if his stay in Orlando is more than 7 days, then offer an Acar rental car promotion to him. Using the ECA notation, this rule is:

ON
      AddFlight  (Custid, Airline, FromCity, ToCity, Depart, Return)
IF
      Airline = 'Abcair' and ToCity = 'Orlando' and Return-Depart >= 7
THEN
      OfferPromotion  (CustId, 'RenralCar', 'Acar')

where:

Documentation / Reference