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

Allow session.halt even for `match()` #143

Merged
merged 2 commits into from Feb 25, 2015

Conversation

Projects
None yet
2 participants
@raymondfeng
Contributor

raymondfeng commented Feb 24, 2015

@doug-martin At the moment, session.halt() only applies to matchUntilHalt(). We have use cases that allow certain rules to fail fast by halting the evaluation of rules. For example, to enforce rate limiting with multiple criteria such as per ip, per app, we should halt the session if one of the rules find out the limit has been exceeded. We could set a flag into facts and have all rules to check it but that's really cumbersome.

Please note this PR was created on top of #142 and the diff is bit messy.

doug-martin added a commit that referenced this pull request Feb 25, 2015

@doug-martin doug-martin merged commit d4a2705 into noolsjs:master Feb 25, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

doug-martin added a commit to doug-martin/nools that referenced this pull request Feb 25, 2015

v0.4.0
* Fix for issue noolsjs#122 referencing defined class within another defined class
   * Also fixes accessing scoped functions within a defined class.
* Fix for issue noolsjs#119 window was removed from the nools.js file now it is called in the current scope of `this`.
* Allow session.halt even for `match()` noolsjs#143 - @raymondfeng
   * Now if you call `halt()` even if you did not call `matchUntilHalt()`
* Now you can use a function as a constraint (Only applies to rules defined programatically) noolsjs#142 - @raymondfeng
* You can now define types using scope [noolsjs#142](noolsjs#142) - @raymondfeng
* Fix for issue, is the dsl you do not have to escape `\` characters noolsjs#123

@doug-martin doug-martin referenced this pull request Feb 25, 2015

Merged

v0.4.0 #144

doug-martin added a commit to doug-martin/nools that referenced this pull request Feb 25, 2015

v0.4.0
* Fix for issue noolsjs#122 referencing defined class within another defined class
   * Also fixes accessing scoped functions within a defined class.
* Fix for issue noolsjs#119 window was removed from the nools.js file now it is called in the current scope of `this`.
* Allow session.halt even for `match()` noolsjs#143 - @raymondfeng
   * Now if you call `halt()` even if you did not call `matchUntilHalt()`
* Now you can use a function as a constraint (Only applies to rules defined programatically) noolsjs#142 - @raymondfeng
* You can now define types using scope [noolsjs#142](noolsjs#142) - @raymondfeng
* Fix for issue, is the dsl you do not have to escape `\` characters noolsjs#123

@doug-martin doug-martin referenced this pull request Mar 4, 2015

Closed

Stop matching #149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment