Sorry for the duplication, but this very strange bug sure needs a subject.
On 8 September 2012 13:07, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
5.3.0, STREAM, fireUntilHalt() run in separate thread, AlertEvent events
inserted every 1 or two seconds.
The following rules should retract ClusterLink facts referencing the
AlertCluster that is
selected by the DissolveCluster fact. As soon as there is no such
more, the AlertCluster and the DissolveCluster facts are to be retracted:
rule "remove link to dissolved AlertCluster"
DissolveCluster( $cluster: cluster )
AlertCluster( this == $cluster )
$clusterLink: ClusterLink( $alertEvent: alertEvent, alertCluster ==
AlertEvent( this == $alertEvent ) from entry-point "Cluster Stream"
System.out.println( "Dissolving...!" );
retract( $clusterLink );
rule "clean up after dissolving AlertCluster"
$dissolveCluster: DissolveCluster( $cluster: cluster )
$alertCluster: AlertCluster( this == $cluster )
not ClusterLink( alertCluster == $cluster )
System.out.println( "Dissolve finished." );
retract( $alertCluster );
retract( $dissolveCluster );
Does anybody see anything wrong with these rules?
The problem is that, after all ClusterLinks have been removed, the final
is not executed.
Luckily, the last CE in the first rule isn't necessary. If
"AlertEvent(...) from ..."
is removed, both rules work correctly.
rules-users mailing list