I am trying to learn clara rules - clojure which is present in "http://www.clara-rules.org/docs/firststeps/"
(ns with-mongo.clara.example
(:require [clara.rules :refer :all]))
(defrecord SupportRequest [client level])
(defrecord ClientRepresentative [name client])
(defrule is-important
"Find important support requests."
[SupportRequest (= :high level)]
=>
(println "High support requested!"))
(defrule notify-client-rep
"Find the client representative and request support."
[SupportRequest (= ?client client)]
[ClientRepresentative (= ?client client) (= ?name name)]
=>
(println "Notify" ?name "that"
?client "has a new support request!"))
Executing the following in REPL
(-> (mk-session 'with-mongo.clara.example)
(insert (->ClientRepresentative "Alice" "Acme")
(->SupportRequest "Acme" :high))
(fire-rules))
But what I get in eclipse is CompilerException java.lang.RuntimeException: Unable to resolve symbol: fire-rules in this context, compiling:(C:\Users\x\AppData\Local\Temp\form-init8304513432405616575.clj:1:2)
Does anyone has any details on it?