Sorry for the duplication, but this very strange bug sure needs a subject. <br><br><div class="gmail_quote">On 8 September 2012 13:07, 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"><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Scenario: </span><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

5.3.0, STREAM, fireUntilHalt() run in separate thread, AlertEvent events inserted every 1 or two seconds.</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">The following rules should retract ClusterLink facts referencing the AlertCluster that is</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

selected by the DissolveCluster fact. As soon as there is no such ClusterLink any</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">more, the AlertCluster and the DissolveCluster facts are to be retracted:</div>

<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style><div><font color="#222222" face="arial, sans-serif">rule &quot;remove link to dissolved AlertCluster&quot;</font></div>
<div><font color="#222222" face="arial, sans-serif">agenda-group &quot;dissolve&quot;</font></div><div><font color="#222222" face="arial, sans-serif">auto-focus true</font></div><div><font color="#222222" face="arial, sans-serif">when</font></div>

<div><font color="#222222" face="arial, sans-serif">    DissolveCluster( $cluster: cluster )</font></div><div><font color="#222222" face="arial, sans-serif">    AlertCluster( this == $cluster )</font></div><div><font color="#222222" face="arial, sans-serif">    $clusterLink: ClusterLink( $alertEvent: alertEvent, alertCluster == $cluster )</font></div>

<div><font color="#222222" face="arial, sans-serif">    AlertEvent( this == $alertEvent ) from entry-point &quot;Cluster Stream&quot;</font></div><div><font color="#222222" face="arial, sans-serif">then</font></div><div>
<font color="#222222" face="arial, sans-serif">    System.out.println( &quot;Dissolving...!&quot; );</font></div>
<div><font color="#222222" face="arial, sans-serif">    retract( $clusterLink );</font></div><div><font color="#222222" face="arial, sans-serif">end</font></div><div><font color="#222222" face="arial, sans-serif"><br></font></div>

<div><font color="#222222" face="arial, sans-serif">rule &quot;clean up after dissolving AlertCluster&quot;</font></div><div><font color="#222222" face="arial, sans-serif">agenda-group &quot;dissolve&quot;</font></div><div>

<font color="#222222" face="arial, sans-serif">when</font></div><div><font color="#222222" face="arial, sans-serif">    $dissolveCluster: DissolveCluster( $cluster: cluster )</font></div><div><font color="#222222" face="arial, sans-serif">    $alertCluster: AlertCluster( this == $cluster )</font></div>

<div><font color="#222222" face="arial, sans-serif">    not ClusterLink( alertCluster == $cluster )</font></div><div><font color="#222222" face="arial, sans-serif">then</font></div><div><font color="#222222" face="arial, sans-serif">    System.out.println( &quot;Dissolve finished.&quot; );</font></div>

<div><font color="#222222" face="arial, sans-serif">    retract( $alertCluster );</font></div><div><font color="#222222" face="arial, sans-serif">    retract( $dissolveCluster );</font></div><div><font color="#222222" face="arial, sans-serif">end</font></div>

</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
Does anybody see anything wrong with these rules? </div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

The problem is that, after all ClusterLinks have been removed, the final clean-up rule</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">is not executed.</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
Luckily, the last CE in the first rule isn&#39;t necessary. If &quot;AlertEvent(...) from ...&quot;</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">is removed, both rules work correctly.</div>

<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div>
<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>
<br></blockquote></div><br>