I want to keep only 1 fact with id=="aaaa". But this is not working:
rule "leave only one" when $removeUs : java.util.List(size>1) from collect(Fact(id=="aaaa") then size = $removeUs.size(); for (int i=1; i < size; i++) { retract($removeUs.get(i)); } end
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users