clara

http://www.clara-rules.org/
2021-05-29T08:31:28.021700Z

Yes this feature allow you to detect when Clara is likely in a loop and then define behaviour such as logging something, throwing an exception, etc. Do note that it is fundamentally an error handing construct though, not a way to actually stop the loop while still having a valid outcome of firing the rules (obviously throwing an exception etc. will stop the loop but you won’t have output from the rules session). @oscarlinusericsson

1👍
EsakkiSundar Varatharajan 2021-05-29T12:39:21.023400Z

Hello Clara Gurus, I'm a newbie and just getting started with Clara Rules and planning to use it with Java. I'm getting an error when trying to run the code. `ExceptionInInitializerError: Syntax error compiling at (example/shopping.clj:2:3). clara.rules.accumulators` I'm attaching the project source for your reference. Could you please help. Please install Maven. Go to your project root directory and to compile the project execute `mvn -q compile` To run the code `mvn -q exec:java -Dexec.mainClass=example.ClaraExampleMain`

Linus Ericsson 2021-05-29T13:00:05.024600Z

you have a syntax error in the import clause, there are ))) on the second row. should be )) (ns example.shopping (:import (example Customer Promotion Order)) (:require [clara.rules.accumulators :as acc] [clara.rules :refer :all])) like so

EsakkiSundar Varatharajan 2021-05-29T13:06:05.025600Z

Thanks a Lot Linus for your help and support. Highly appreciate your time and effort for spotting this out. It works fine now.