2010/2/24 Ansgar Konermann <ansgar.konerm...@googlemail.com>: > > rule "Issue error message if items preventing discount exist" > when > exists( ItemPreventingDiscount( $reason: reason, $item: item ) )
The exists isn't correct here; it prevents binding for $reason and $item used on the RHS. > then > System.out.println("Discount not allowed: Item '"+ $item.getDescription() > + "' prevents discount because " + $reason + "."); Probably should use a retract on the ItemPreventingDiscount here. Creating these XPreventingY facts would really make sense if they are later combined into a single error report against the Order. -W > end > _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users