Skip to content

Add accumulator conditions to :condition-matches in session inspection #293

Open
@WilliamParker

Description

@WilliamParker

This is similar to #289 but for accumulator conditions rather than negation conditions. So, for example, if we have a rule like

(defrule min-temp-and-windspeed
    [?min-temp (acc/min :temperature) <- Temperature (some-predicate this)]
    [?min-wind (acc/min :windspeed) <- WindSpeed (some-predicate-2 this)]
   =>
  (insert (->ColdAndWindy ?min-temp ?min-wind)))

we'd be able to find Temperature facts matching some-predicate by looking at the :condition-matches. We'd also be able to find WindSpeed facts matching some-predicate-2 if the predicate did not depend on bindings from previous conditions. As in general for the :condition-matches, we'd be able to find these matches regardless of whether the rule fired, so even if there were, say, no WindSpeed facts we could still inspect on the Temperature condition.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions