Hi,

 

I'm new to Drools and currently trying to implement some examples using CEP /
Fusion. I got stuck on a problem to which I can't find any solution in the
online documentation, so I'm hoping for your help.

I'm trying to write a rule, which is activated whenever a certain event
occurs and no event of the same type occurred in the e.g. last 5 minutes (or
just at the same time). I know how to do it if these are events of different
types, but I can't find any way for events of the same type. What I tried is
something like that:

 

$error : RouterErrorEvent ( $name : routerName ) from entry-point "abc"

not ($otherError : RouterErrorEvent ( (this coincides $error) && (routerName
== $name) ) from entry-point "abc")

 

First of all there's the problem, that $error and $otherError will be the
same instance if a "RouterEventError" has been inserted from the "abc" entry
point. Adding a (this != $error) to the second, ($otherError) obviously is no
solution to that as well. 

If it were two different events something like in example 2.19 would work:

 

$error1 : ErrorOneEvent( $id : id ) 

not ($error2 : ErrorTwoEvent( id == $id, this coincides $error1 ))

 

I'm kinda sure I'm missing something pretty "easy" here... or is this
approach completely wrong?

As I'm aware of the fact that I couldn't be more of a newbie J I would
appreciate any suggestions for nice tutorials or further reading as well!

 

Thanks in advance!

 

Georg

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to