This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-28
Channels
- # aleph (3)
- # beginners (10)
- # boot (135)
- # clara (2)
- # cljsjs (2)
- # cljsrn (1)
- # clojure (68)
- # clojure-austin (4)
- # clojure-france (2)
- # clojure-japan (1)
- # clojure-spec (30)
- # clojure-uk (11)
- # clojurescript (48)
- # component (65)
- # cursive (5)
- # datomic (40)
- # dirac (5)
- # emacs (3)
- # events (16)
- # funcool (2)
- # klipse (46)
- # lein-figwheel (2)
- # luminus (8)
- # off-topic (4)
- # om (7)
- # other-languages (4)
- # parinfer (21)
- # re-frame (15)
- # reagent (30)
- # ring (1)
- # ring-swagger (9)
- # rum (3)
- # specter (7)
- # test-check (8)
- # testing (5)
- # vim (21)
- # yada (4)
@wparker: Hi William, With reference to your discussion thread on conditional activation: https://groups.google.com/forum/#!searchin/clara-rules/conditional$20activation%7Csort:relevance/clara-rules/w_Iq7zom2bU/OFcbeFZlCwAJ We have a similar requirement when we want to fire rule-3, when either rule-1 or rule-2 does not fire for a fact of TypeA We find that the [:not [Logicamarker ]] approach is not working as it appears that RETE engine fires the rule bcos before the rule-1 or rule-2 creates the LogicalMarker, rule-3 LHS seems to be satisfied. Any tips would be really helpful. (defrecord LogicalMarker [marker prop1 prop2] (defrule rule-1 [?a <- TypeA (= ?prop1 prop1) (= ?prop2 prop2)] [?x <- TypeX] => (insert! (map->LogicalMarker {:marker "1" :prop1 ?prop1 :prop2 ?prop2})) (defrule rule-2 [?a <- TypeA (= ?prop1 prop1) (= ?prop2 prop2)] [?y <- TypeY] => (insert! (map->LogicalMarker {:marker "2" :prop1 ?prop1 :prop2 ?prop2})) (defrule rule-3 [?a <- TypeA (= ?prop1 prop1) (= ?prop2 prop2)] [:not [LogicalMarker (= ?prop1 :prop1) (= ?prop2 :prop2)]] => (println "Conditional Rule executed successfully!")
Hey @ramkumarkb, I posted a response on the Google Group thread. Hopefully that helps.