environment );
int id = ((ReteooRuleBase) ((KnowledgeBaseImpl) this.kbase).ruleBase).nextWorkingMemoryCounter();
RuleBaseConfiguration conf = ((ReteooRuleBase) ((KnowledgeBaseImpl) this.kbase).ruleBase).getConfiguration();
ReteooStatefulSession session = ProtobufInputMarshaller.readSession( context,
id,
environment,
(SessionConfiguration) config );
context.close();
if ( ((SessionConfiguration) config).isKeepReference() ) {
((ReteooRuleBase) ((KnowledgeBaseImpl) this.kbase).ruleBase).addStatefulSession( session );
}
return (StatefulKnowledgeSession) session.getKnowledgeRuntime();
}