Your rule is wrong, as you are defining 3 patterns and the second pattern is looking for a fact in the main entry point, not your defined "MyEntryPoint". Fix it doing:
$s2 : MyModel ( name != "aaa" , id != $s1.id, ip == $s1, this after [0m,5m] $s1) from entry-point "MyEntryPoint" []s Edson 2009/7/21 nestabur <nesta...@gmail.com> > > Hi all, > > I'm getting crazy trying to create a CEP rule in droos 5.0.1 :( > > The rule is: > =============== > rule "RetractOlderFacts" > dialect "mvel" > when > $s1 : MyModel( name != "aaa") from entry-point > "MyEntryPoint" > $s2 : MyModel ( name != "aaa" , id != $s1.id, ip == $s1) > and MyModel ( > this after [0m,5m] $s1) from entry-point "MyEntryPoint" > then > retract($s2); > System.out.println(" ********* Retracting from WM"); > end > =============== > > The scenario is: > "After receiving a fact "MyModel" wich name != "aaa", if arrives another > with same ip and different id after a period between 0 and 5 minutes the > rule have to retract the last one and keep the first fact (the older one)" > > After receiving hundred and hundred of facts via JMS that may match with > the > rule condition, the rule never throws! > > is the rule correct? > could the problem be at the rule engine implementation? > > Could anyone hel me please? > > Thanks in advance, > > nestabur > -- > View this message in context: > http://www.nabble.com/CEP-Rule-Help-Needed-tp24591289p24591289.html > Sent from the drools - user mailing list archive at Nabble.com. > > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users >
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users