-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agenda Groups #29
Comments
* Added new agenda-group (noolsjs#29) * More documentation * Salience * Agenda Groups * Auto-focus * Scope * Cleaned up agenda and made more modular
Sorry this took so long. So the new version of nools (v0.1.4) now contains agenda groups. I implemented this slightly different that what was recommended from above instead I used a similar pattern to drools agenda-groups. So In the above example you have two agenda groups defined. In order to set focus to one of them you would use the As you focus a particular agenda group that group is added to a stack maintained by the agenda and only activations from a particular agenda group are fired until: A) The agenda group runs out of activations to fire and it is then popped from the stack and the next agenda group takes focus. B) Focus is called explicitly in which case that agenda group is added to the stack and takes precedence. C) An activation with Any recommendations would be appreciated and I hope this fits your needs! -Doug |
No need to apologize, it's open source, if I'd really needed it sooner then it's my responsibility to implement and submit as a pull request :) So thanks for doing this. I'm actually quite familiar with drools and have submitted some work to the expert engine in the past so this is perfect. I had given a design that had a minimal solution but this should work much nicer. Thanks again. |
A really useful feature would be have agenda groups support in the default rules language. This would allow groupings of rules that need to run together because of a logic reason that could be configured semantically. Currently the only way to achieve this is through a heavy use of priority/salience.
It would look like:
Then there would be a nools.groupArray which would be empty by default and you would add groups to this array in the order of desired execution such as nools.groupArray = ['a1', 'a2']. This ordering would result in a rules run of first attempting "A group a1 rule" and "Another group a1 rule" then attempting "A group a2 rule". Effectively running each agenda group as a separate rete tree that get's instantiated as the one prior is finished.
The text was updated successfully, but these errors were encountered: