Exemplo n.º 1
0
  public BuildContext createContext() {

    RuleBaseConfiguration conf = new RuleBaseConfiguration();

    ReteooRuleBase rbase = new ReteooRuleBase("ID", conf);
    BuildContext buildContext = new BuildContext(rbase, rbase.getReteooBuilder().getIdGenerator());

    Rule rule = new Rule("rule1", "org.pkg1", null);
    org.drools.rule.Package pkg = new org.drools.rule.Package("org.pkg1");
    pkg.getDialectRuntimeRegistry().setDialectData("mvel", new MVELDialectRuntimeData());
    pkg.addRule(rule);
    buildContext.setRule(rule);

    return buildContext;
  }