@jeremy642 I believe what you are referring to was a bit of an experimental project and not actively maintained.
It maybe this https://github.com/rbrush/clara-tools
@tony.kay you can provided collections of rule structures to mk-session. It doesn’t only accept namespaces. You can also define a var that holds a collection of rules and give it metadata :production-seq. So that single var name can be passed.
Different ways to do things. Depending on your goals.
However sometimes it can be fine to combine into larger rule sets. Rules that don’t match facts won’t contribute much to runtime.
Ah, I misunderstood how mk-session worked…my bad
No problem!
@mikerod Thanks
I have a bunch of rules that derive some final state fact. What I run into is that multiple rules might match and in the end I get multiple results. So in the standard decision tree, there is order to the final state precedence. Would it be appropriate to add a priority property to these final state results and then query on that priority to narrow it down to a single result?
@jeremy642 that is one approach
I think I’ve answered variations of this question a lot of times, but don’t think it’s saved anywhere
🙂
you can prioritize rules by building a tiered structure to them
or you can let them all fire
insert some “intermediate fact”
then have 1 more rule to accumulate all “intermediate facts” and insert your final fact based on the aggregate of them
I can give examlpes in a bit if needed
I guess I have one example of one approach here https://gist.github.com/mrrodriguez/6a6f8373b25d69826b3efe154c928fac#file-clara_tiered_fact_update_rules-clj
Thanks. I'll check it out and play with it.