Fork me on GitHub

@flavio : So the or is on two different conditions on the same fact? It sounds like this need not fire twice. Or conditions in the constraints on a single fact condition don’t produce multiple firings, that is only for :or conditions that are actually part of the Rete network. I think of something like [:or B C] as firing for all elements of the union of B and C, to put it differently, whereas conditions like [B (or pred1 pred2)] are still one set that just calls clojure.core/or to determine what facts of type B should be members of that set. A concrete example might help; will fire once per matching Order, while will fire once per matching NewCustomer or ValuedCustomer. If you have a single fact that you’re trying to test it sounds like you want something more like new-or-valued-customer-basic-coupons in that examples page; the :or condition functionality is really just shorthand for writing multiple rules in a single defrule in the code. Does this help? It is a bit confusing because we’re using the same word “or” to mean fundamentally different things.


Also, you may have seen, but if you haven’t that could be helpful. The key point though is that that only addresses booleans created like ; the way to distinguish the cases visibly is what is a clojure keyword (:or :and) versus a normal Clojure function call like (or… or (and...