Another option would be the addition of a single "Trigger" fact, inserted along
with your regular facts, added as an additional pattern to all rules,
and retracted
in each RHS.
You might also consider using Event processing to terminate the Engine's
run after the first AfterActivationFiredEvent.
-W
2010/7/14 Mauricio Salatino <salaboy(a)gmail.com>:
you can also add an extra property to your facts to check and add
condition
to check that property. (like a processed flag)
Greetings
2010/7/13 Leonardo Gomes <leonardo.f.gomes(a)gmail.com>
>
> Hi Droolers,
>
> I'm trying to avoid loops and looking at different possibilities (no-loop,
> activation-group, lock-on-active, etc.).
>
> >Scenario I want to avoid:
>
> For example, the initial facts trigger *rule 1*, which inserts new facts
> that will trigger *rule 2*, which will then insert facts that would
> re-trigger *rule 1*.
>
> >Possibilities I tried:
>
> no-loop -> just prevents the re-activation of the same rule
> lock-on-active -> I can't know which rules should have lock-on-active set
> to true, since I don't know what will be the initial facts.
>
> >What I'm trying to achieve:
>
> All rules in my rule set should execute only once. So, a rule inserts new
> facts only rules that haven't executed so far, should be activated.
>
> Is there a way to do that, let's say 'out-of-the-box', with DRL?
>
> Thank you,
> Leo.
>
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
--
- CTO @
http://www.plugtree.com
- MyJourney @
http://salaboy.wordpress.com
- Co-Founder @
http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users