Search in sources :

Example 6 with DefaultRulesEngine

use of org.jeasy.rules.core.DefaultRulesEngine in project easy-rules by j-easy.

the class Launcher method main.

public static void main(String[] args) {
    // create facts
    Facts facts = new Facts();
    // create rules
    Rules rules = new Rules();
    rules.register(new HelloWorldRule());
    // create a rules engine and fire rules on known facts
    RulesEngine rulesEngine = new DefaultRulesEngine();
    rulesEngine.fire(rules, facts);
}
Also used : DefaultRulesEngine(org.jeasy.rules.core.DefaultRulesEngine) DefaultRulesEngine(org.jeasy.rules.core.DefaultRulesEngine) RulesEngine(org.jeasy.rules.api.RulesEngine) Rules(org.jeasy.rules.api.Rules) Facts(org.jeasy.rules.api.Facts)

Aggregations

Rules (org.jeasy.rules.api.Rules)6 DefaultRulesEngine (org.jeasy.rules.core.DefaultRulesEngine)6 Facts (org.jeasy.rules.api.Facts)5 RulesEngine (org.jeasy.rules.api.RulesEngine)5 FileReader (java.io.FileReader)1 Rule (org.jeasy.rules.api.Rule)1 RulesEngineParameters (org.jeasy.rules.api.RulesEngineParameters)1 MVELRule (org.jeasy.rules.mvel.MVELRule)1 MVELRuleFactory (org.jeasy.rules.mvel.MVELRuleFactory)1 YamlRuleDefinitionReader (org.jeasy.rules.support.reader.YamlRuleDefinitionReader)1