Fork me on GitHub
#clara
<
2019-04-28
>
mikerod00:04:16

Use a vector and no quoting needed

Joel03:04:01

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.

Joel04:04:16

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?

wparker09:04:33

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

Joel17:04:56

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)))

Joel18:04:04

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

Joel18:04:06

(java class)

ethanc18:04:51

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

Joel19:04:45

you probably do read it correctly, ill try that.