clara

http://www.clara-rules.org/
futuro 2020-10-06T15:11:56.035500Z

A second idea @bmaddy , if it fits your project, would be to create a UI for building rules, perhaps presenting a searchable list of Fact records to users, along with their available fields, and allow them to pick the facts and fields they want to match on, plus the Boolean expression combinations.

futuro 2020-10-06T15:12:43.036900Z

That’s definitely not a small project, but might greatly raise the accessibility for non-developers to write facts with, while providing guardrails to help them.

👍 1
2020-10-06T15:36:05.038500Z

@futuro Yeah, a UI would be nice, but that's way off in the future. At the moment, we're not entirely sure we'll have users writing actual rules yet. We'll see what happens. Good ideas though!

👍 2
1
Matthew Pettis 2020-10-06T20:16:45.041500Z

I think I've asked this before, but I cannot retrieve the history too far back of this channel... What is the best way to capture the chain of facts and rules that caused a fact to be produced in a session? I don't need a full-blown GUI, and honestly would just be able to get a data structure I can manipulate myself...

Matthew Pettis 2020-10-06T20:18:20.043400Z

So, for instance, if I have a session with a rule that has something like "P => Q" and I insert a fact P into the session, and query for the fact Q, which should be present, I'd like to be able to take Q and inspect the session and see the presence of fact P and the rule "P => Q". But, you know, with more complex rules and such. Is this readily available?

Matthew Pettis 2020-10-06T20:19:39.044900Z

I've looked at https://github.com/rbrush/clara-tools , but I can't get the shopping.clj example to work -- launches a web page, but with no session and nothing to look at, as far as I can tell. But again, I really don't want the gui, I just want to be able to inspect a session for the chain of facts and rules that lead to other facts being present in the system...

Matthew Pettis 2020-10-06T20:20:39.046200Z

It should also make sense in simple cases. As in the prior case, if P is an inserted fact, and I want to see how I got P, I should just see "P" with no rules, as it was inserted a priori...

2020-10-07T19:03:40.047600Z

As far as I know the clara-tools project isn’t really maintained anymore. From what you describe though I think you can probably accomplish what you’re looking for in a non-GUI environment with session inspection, particularly the :fact->explanations key. http://www.clara-rules.org/docs/inspection/

👍 1
2020-10-07T19:04:43.047900Z

The fact-graph functionality might also be of use, though note that this is basically just another view over the information returned by session inspection. https://github.com/cerner/clara-rules/blob/main/src/main/clojure/clara/tools/fact_graph.cljc

Matthew Pettis 2020-10-07T19:36:09.051500Z

Thanks! I think session-inspection is exactly what I need at this point of what I think are my simple needs.