ReteooRuleBase rbase = new ReteooRuleBase("ID", conf);
BuildContext buildContext = new BuildContext(rbase, rbase
.getReteooBuilder().getIdGenerator());
InternalWorkingMemory wm = (InternalWorkingMemory) rbase
.newStatefulSession(true);
// Overwrite values now taking into account the configuration options.
context.put(BUILD_CONTEXT, buildContext);
context.put(WORKING_MEMORY, wm);