use of org.drools.core.reteoo.builder.BuildContext in project drools by kiegroup.
the class CompositeObjectSinkAdapterTest method setUp.
@Before
public void setUp() throws Exception {
store.setClassFieldAccessorCache(new ClassFieldAccessorCache(Thread.currentThread().getContextClassLoader()));
store.setEagerWire(true);
this.kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase();
this.buildContext = new BuildContext(kBase);
this.buildContext.setRule(new RuleImpl("test"));
}
use of org.drools.core.reteoo.builder.BuildContext in project drools by kiegroup.
the class PropertyChangeListenerTest method setUp.
@Before
public void setUp() throws Exception {
this.kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase();
this.buildContext = new BuildContext(kBase);
this.entryPoint = buildContext.getKnowledgeBase().getRete().getEntryPointNodes().values().iterator().next();
;
}
use of org.drools.core.reteoo.builder.BuildContext in project drools by kiegroup.
the class ScenarioTest method createContext.
public BuildContext createContext() {
RuleBaseConfiguration conf = new RuleBaseConfiguration();
KnowledgeBaseImpl rbase = new KnowledgeBaseImpl("ID", conf);
BuildContext buildContext = new BuildContext(rbase);
RuleImpl rule = new RuleImpl("rule1").setPackage("org.pkg1");
InternalKnowledgePackage pkg = new KnowledgePackageImpl("org.pkg1");
pkg.getDialectRuntimeRegistry().setDialectData("mvel", new MVELDialectRuntimeData());
pkg.addRule(rule);
buildContext.setRule(rule);
return buildContext;
}
Aggregations