<div dir="ltr"><div>so I&#39;ve now come up with: <br><br>$foo1 : Foo($status : Status)<br>
<br>
not(Foo(Status == $status. this before $foo1))<br><br><br>
$dupes : ArrayList (size&gt;0) from collect ( Foo(Status == $status, this coincides $foo1))<br><br></div>$fin : Foo() from $dupes<br><div>
<br>
$foos : ArrayList (size&gt;0) from collect ( Foo(Status != $status, this after $fin))<br><br><br></div><div>However I am getting a ClassCastException: org.drools.common.DefaultFactHandle cannot be cast to org.drools.common.EventFactHandle  and I am not sure why. Does anyone have any thoughts?<br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 16, 2013 at 12:31 AM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If there is no other attribute that distinguishes between the two<br>
Foo objects at the same time and with the same status, then the<br>
theory says that there is just one fact/event and you just happen<br>
to have the data duplicated. Getting rid of the duplicate may be<br>
one way of solving your problem.<br>
<br>
Another approach would be to create a marker fact saying that you&#39;ve<br>
dealt with a Foo at a certain time, and check for its absence, both in<br>
the rule you&#39;ve (almost) shown.<br>
<span class="HOEnZb"><font color="#888888"><br>
-W<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 16/04/2013, burmanator &lt;<a href="mailto:alexburman@gmail.com">alexburman@gmail.com</a>&gt; wrote:<br>
&gt; I am trying to track when an event object Foo with a distinguishing<br>
&gt; identifier of Status.<br>
&gt; I want to try and identify a list of events when a Foo event with Status 2<br>
&gt; happens after an event with Status 1 but at the same time a Status 1 has<br>
&gt; not<br>
&gt; happened before.<br>
&gt;<br>
&gt; fight now I&#39;ve come up with:<br>
&gt;<br>
&gt; $foo1 : Foo($status : Status)<br>
&gt;<br>
&gt; not(Foo(Status == $status. this before $foo1))<br>
&gt;<br>
&gt; $foos : ArrayList (size&gt;0) from collect ( Foo(Status != $status, this after<br>
&gt; $foo1))<br>
&gt;<br>
&gt; Part of the problem I am having, is that a Foo event with the same Status<br>
&gt; can happen at the same timestamp. How do I get it to work so the rule only<br>
&gt; triggers once for multiple events on the same timestamp?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context:<br>
&gt; <a href="http://drools.46999.n3.nabble.com/Drools-Fusion-Finding-an-event-that-occuring-after-an-event-but-not-before-it-tp4023352.html" target="_blank">http://drools.46999.n3.nabble.com/Drools-Fusion-Finding-an-event-that-occuring-after-an-event-but-not-before-it-tp4023352.html</a><br>

&gt; Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Sincerely,<br>Alex Burman<br>cell: 908-672-0198
</div>