[rules-users] Handle not found for object if using treeset

rjlist at nextmind.net rjlist at nextmind.net
Wed Apr 23 05:29:58 EDT 2008


Hi All,

i've a simple rules that retract objects form the WM


rule "Retract From ArrayList"
	when
	$total: ArrayList() from collect ( PrestationFacturable()  )

	then
	retract($total.get(0));
end

at the end of fireAll all the fact are well retracted but if I  
replace ArrayList by TreeSet


rule "Retract From TreeSet"
	when
	$tree: TreeSet() from collect ( PrestationFacturable()  )

	then
	retract($tree.first());
end


I got the following exception
org.drools.spi.ConsequenceException: org.drools.FactException:  
Retract error: handle not found for object: [6, val=1]. Is it in the  
working memory?

because the $tree (at second run) still contains the object that as  
been removed


can somebody can explain this behavior ?


Thanks in advance

-P.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080423/e655cfac/attachment.html 


More information about the rules-users mailing list