JavaScript Rule Engine
JavaScript
Switch branches/tags
Nothing to show
Latest commit ab60442 May 10, 2011 @tdegrunt tdegrunt Typo
Permalink
Failed to load latest commit information.
examples Better examples May 10, 2011
lib Better examples May 10, 2011
README.md Typo May 10, 2011
package.json Renamed conditions to condition (singular). Renamed actions to May 10, 2011

README.md

Jools

What is Jools?

Jools is a forward chaining Business Rules Engine (BRE), currently implemented as an inference engine.

JSON Rules

Jools uses JSON rules. Rules consist of a descriptive name, one or more conditions and one or more consequences. Jools allows for very expressive rules, take for example the following:

{
  "name": "say hello to Dave",
  "condition": 
    function(name) {
      return name == "Dave";
    }
  ,
  "consequence": 
    function(name) {
      console.log("Hello " + name);
    }
}

Provided the following fact, the rule would output "Hello Dave" to the console:

{
  "name": "Dave",
  "email": "dave@ibm.com"
}