Sorry for the duplication, but this very strange bug sure needs a subject.
Scenario: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 isselected by the DissolveCluster fact. As soon as there is no such ClusterLink anymore, the AlertCluster and the DissolveCluster facts are to be retracted:rule "remove link to dissolved AlertCluster"agenda-group "dissolve"auto-focus truewhenDissolveCluster( $cluster: cluster )AlertCluster( this == $cluster )$clusterLink: ClusterLink( $alertEvent: alertEvent, alertCluster == $cluster )AlertEvent( this == $alertEvent ) from entry-point "Cluster Stream"thenSystem.out.println( "Dissolving...!" );retract( $clusterLink );endrule "clean up after dissolving AlertCluster"agenda-group "dissolve"when$dissolveCluster: DissolveCluster( $cluster: cluster )$alertCluster: AlertCluster( this == $cluster )not ClusterLink( alertCluster == $cluster )thenSystem.out.println( "Dissolve finished." );retract( $alertCluster );retract( $dissolveCluster );endDoes anybody see anything wrong with these rules?The problem is that, after all ClusterLinks have been removed, the final clean-up ruleis 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