On 20/09/2013, Jonathan Knehr <jonathan.kn...@gmail.com> wrote:
> I am wondering if I can insert a fact, fire all activated rules, then
> retract the fact all in a rules consequence.

Certainly. But the fireAllRules() would have to address a session
different from the one that's executing the consequence.

>
> I have similar behavior using the API that I'd like to be able to do inside
> a rule, as well.

A consequence is just Java,  so go ahead.

>
> The idea is that once all the rules that cause activations get fired, it
> gets retracted immediately. This is so that we don't have to have cleanup
> rules all over the place, and have to ensure that the salience is set
> correctly.

Is "it" a fact? You can retract it from the place where it was
inserted, for instance. Well-designed rule sets don't have "cleanup
rules all over the place". And salience is a last resort, not a
first-class way of designing rule sets.

>
> Any ideas?
>
> Thanks in advance!
>
> Sent from my iPhone

Looks like it.

-W


> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to