assertNotNull( retractedWorker );
StatefulKnowledgeSessionImpl sessionImpl = (StatefulKnowledgeSessionImpl) ksession;
ReteooWorkingMemory reteWorkingMemory = sessionImpl.session;
AbstractWorkingMemory abstractWorkingMemory = (AbstractWorkingMemory) reteWorkingMemory;
InternalRuleBase ruleBase = (InternalRuleBase) abstractWorkingMemory.getRuleBase();
Collection<EntryPointNode> entryPointNodes = ruleBase.getRete().getEntryPointNodes().values();
EntryPointNode defaultEntryPointNode = null;
for ( EntryPointNode epNode : entryPointNodes ) {
if ( epNode.getEntryPoint().getEntryPointId() == "DEFAULT" ) {
defaultEntryPointNode = epNode;
break;
}
}
assertNotNull( defaultEntryPointNode );
Map<ObjectType, ObjectTypeNode> obnodes = defaultEntryPointNode.getObjectTypeNodes();
ObjectType key = new ClassObjectType( DroolsQuery.class );
ObjectTypeNode droolsQueryNode = obnodes.get( key );
ObjectHashSet droolsQueryMemory = (ObjectHashSet) abstractWorkingMemory.getNodeMemory( droolsQueryNode );
assertEquals( 0,
droolsQueryMemory.size() );
Entry[] entries = droolsQueryMemory.getTable();
int entryCounter = 0;