clara

http://www.clara-rules.org/
2019-04-28T00:10:16.010100Z

Use a vector and no quoting needed

Joel 2019-04-28T03:57:01.011900Z

How is anyone going about getting the reasons for the rule decisions? Or, as often done in other systems, use the rule name, in Clara case the :doc tag. The problem I see is when I do (inspect session) the :rule-matches matches rules that never fired.

Joel 2019-04-28T04:19:16.012800Z

Actually it looks like the rules have a () "matches" section, that I need to check... Unclear how I should be parsing that. Is there any convenience fn's?

2019-04-28T09:54:33.013200Z

I'm not sure what you're trying to do, could you elaborate?

Joel 2019-04-28T17:31:56.013400Z

I was trying to strip out the rule :docs that had matches. It wasn't clear to me that there were rules listed that weren't fired. This did the trick: (defn matched-rule-docs [session] (let [rule-match-map (:rule-matches (inspect session)) matched-rules (filter #(seq (get rule-match-map %)) (keys rule-match-map))] (map :doc matched-rules)))

Joel 2019-04-28T18:57:04.014100Z

Can this be done w/o using :test?: ''' [?registry <- ListRegistry] [:test (.isMember ?registry "userguidwl" "whitelist" "userguid")] '''

Joel 2019-04-28T18:58:06.014900Z

(java class)

ethanc 2019-04-28T18:59:51.016600Z

Use the this symbol in place of ?registry, If I read your question correctly

💯 2
Joel 2019-04-28T19:05:45.016900Z

you probably do read it correctly, ill try that.