[rules-users] Rules influencing each other ?

Andre morpheusandre at web.de
Tue Jul 26 11:29:12 EDT 2011


during my tests i see, that when data is evaluated from other rules than the
third one,  the third will not fire, even if the right combination of events
occur
and when the same events occur without any other events, then the third one
works , any idea ?? 


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
    eval(DroolsUtils.isUpToDate($count))
then
    channels["AuthZBlocking"].send(new ItemCacheEntry(new Item((String)$id),
new Date(System.currentTimeMillis()+ 30000),new StringMatcher()));
end

// Implementing Use Case 2
rule "Request counting Resources By Id"
when
    $set: Set()
            from accumulate($neu : RequestCtx() over
window:time(1m),countMatchingResourcesInRequest($neu) )
    java.util.Map.Entry( $id: key, $count: value > 1 ) from $set
    eval(DroolsUtils.isUpToDate($count))
then
    channels["AuthZBlocking"].send(new ItemCacheEntry(new Item((String)$id),
new Date(System.currentTimeMillis()+ 30000),new StringMatcher()));
end

// Implementing Use Case 3
rule "Request counting analysed Resources By Id"
when
    $list: ArrayList()
            from accumulate($neu : RequestCtx() over
window:time(1m),countMatchingAnalysedResourcesInRequest($neu) )
    ResourceMatch( $id: uri, count > 1 ) from $list
then
    channels["AuthZBlocking"].send(new ItemCacheEntry(new URIItem($id), new
Date(System.currentTimeMillis()+ 30000), new URIMatcher()));
end

--
View this message in context: http://drools.46999.n3.nabble.com/Rules-influencing-each-other-tp3200654p3200654.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list