@eraserhd sounds like an interesting project. Do the task inputs and outputs change frequently, preventing the use of a simple dependency graph? Can you say more about the business domain? If you haven’t seen this, you may find it useful for working with pull expressions: https://github.com/edn-query-language/eql
This sounds quite similar to something I've been working on in my spare time!
http://www.clara-rules.org/docs/rules/ mentions "props", but I can't see documentation for them on that page. Does anyone know what they are?
@dominicm it is a simple map, currently the only thing supported would be salience, i think. http://www.clara-rules.org/docs/conflictsalience/
However, it’s typically not recommended to write rules in a way where you have to use that
it can have confusing semantics I believe
(probably why it hasn’t been documented much 😛 )
Is it possible to create rules with parameters? And be explicit about passing them in?
@dominicm It isn’t clear to me how that would work in general
However, queries take parameters if that’s more what you’re looking for
For rules, instead of taking a parameter, model the param as a fact inserted by a rule perhaps
Instead of
(defrule param-rule
[A (= <my-param-here> x)]
=>
<do things>)
Do
(defrule find-param
[?i <- InputFact]
=>
(insert! (map->Param (extract-data ?i))))
(defrule param-rule
[?p <- Param]
[A (= (:x ?p) x)]
=>
<do things>)
@mikerod hmm, maybe I haven't thought it through. But I want to write rules like "for every X insert 5", where I might have multiple of these inserted.
Ah, right, of course.
My rule just needs to find "Candidate X", and then insertions can be made about X candidate. 🙂
I think so