clara

http://www.clara-rules.org/
Linus Ericsson 2021-05-26T17:11:44.002Z

When I construct rules, I sometimes make circular references (often by a rule inserting a fact which invalidates itself which triggers a rule that inserts a fact again). Is there any way to tell clara-rules to actually cancel when it has ended up in a cycle like this?

ethanc 2021-05-26T17:12:41.002700Z

I believe @wparker was working on something like this

ethanc 2021-05-26T17:13:45.002900Z

https://github.com/cerner/clara-rules/issues/275

1πŸ™
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πŸ‘