Top
Interstage Big DataComplex Event Processing Server V1.1.0 User's Guide
FUJITSU Software

5.11.5 Rule Definition

The rule definition processes two types of events. It consists of filter rules and complex event processing rules.

5.11.5.1 Filter Rules (IF-THEN Format)

These filter rules are for two types of events.

 1
2
3
4
5
6
7
8
9
10
on LocationEvent {
if ($status == "1" AND lookup("StoreInfo", $areaID == $areaID) = true()) then
join("MemberInfo", $memberID==$ID)
output($memberID, $areaID, "MemberInfo".$age) as FilteredLocationEvent;
}

on CouponEvent {
join("StoreInfo", $storeID == $ID)
output($storeID, $couponID, $targetAge, "StoreInfo".$areaID) as FilteredCouponEvent;
}

Below is an explanation of each line.

5.11.5.2 Complex Event Processing Rules (SQL Format)

These complex event processing rules are for the two types of events processed by the filter rules.

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
create window outEventWin.std:firstunique(memberID,couponID).win:time(3 min)
as (memberID string, storeID string, couponID string);

@Name('EPL1')
insert into outEventWin
select loc.memberID as memberID,cpn.storeID as storeID,cpn.couponID as couponID
from FilteredLocationEvent as loc unidirectional
inner join FilteredCouponEvent.win:time(3 min) as cpn
on loc.areaID=cpn.areaID and loc.age=cpn.targetAge;

@Name('EPL2')
@DebugLogListener
select * from outEventWin;

@Name('filterOut1')
@DebugLogListener
select * from FilteredLocationEvent;

@Name('filterOut2')
@DebugLogListener
select * from FilteredCouponEvent;

Below is an explanation of each line.