environment = EnvironmentFactory.newEnvironment();
}
CommandService commandService = ((SessionConfiguration) conf).getCommandService(this, environment);
if (commandService != null) {
return new CommandBasedStatefulKnowledgeSession(commandService);
} else {
ReteooStatefulSession session = (ReteooStatefulSession) this.ruleBase.newStatefulSession( (SessionConfiguration) conf,
environment );
return new StatefulKnowledgeSessionImpl( session, this );
}