return this.ruleBase;
}
public InternalWorkingMemory newWorkingMemory() {
synchronized ( this.ruleBase.getPackagesMap() ) {
ReteooWorkingMemory wm = new ReteooWorkingMemory( this.ruleBase.nextWorkingMemoryCounter(),
this.ruleBase,
(SessionConfiguration) this.conf,
this.environment );
StatefulKnowledgeSessionImpl ksession = new StatefulKnowledgeSessionImpl( wm, new KnowledgeBaseImpl( this.ruleBase ), mappedWorkingMemoryListeners, mappedAgendaListeners, mappedProcessListeners );
((Globals) wm.getGlobalResolver()).setDelegate( this.sessionGlobals );
wm.setKnowledgeRuntime( ksession );
wm.setWorkingMemoryEventSupport( this.workingMemoryEventSupport );
wm.setAgendaEventSupport( this.agendaEventSupport );
wm.setRuleFlowEventSupport( this.ruleFlowEventSupport );
final InitialFactHandleDummyObject initialFact = new InitialFactHandleDummyObject();
final InitialFactHandle handle = new InitialFactHandle( wm.getFactHandleFactory().newFactHandle( initialFact,
wm.getObjectTypeConfigurationRegistry().getObjectTypeConf( EntryPoint.DEFAULT,
initialFact ),
wm ) );
wm.queueWorkingMemoryAction( new WorkingMemoryReteAssertAction( handle,
false,
true,
null,
null ) );
return wm;