[rules-users] evaluating different aspects of the same event

Andre morpheusandre at web.de
Fri Jul 22 08:41:42 EDT 2011


i want to  accumulate on different properties of my event.
i have 3 rules which all work in the same manner , accumulate on that event
and then work with that result
my rules are all like this 

rule "Request counting Subject By Id"
when
    $set: Set()
            from accumulate($neu : RequestCtx() over
window:time(1m),countMatchingSubjectIdsInRequest($neu) )
    java.util.Map.Entry( $id: key, $count: value > 1 ) from $set
then
    channels["AuthZBlocking"].send(new ItemCacheEntry(new Item((String)$id),
new Date(System.currentTimeMillis()+ 20000)));
end

these rules should work concurrently, depending on the propterties.

to test this i wrote... 

let us assume:
Rule1 looks for A.A and if |A.A>1| fire
Rule2 looks for A.B and if |A.B>1| fire
Rule3 looks for A.C and if |A.C>1| fire
i inserted
A.A
A.A
A.B
A.B
A.C
A.C
and instead of firing 1,2,3
the engine fires : 1,1,2,1,1,2,1,2

Do i have to influence the agenda , when working on the same eventtype ??


--
View this message in context: http://drools.46999.n3.nabble.com/evaluating-different-aspects-of-the-same-event-tp3191232p3191232.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list