env.set( EnvironmentName.TRANSACTION_MANAGER,
ctx.getBean( "txManager" ) );
KnowledgeStoreService kstore = (KnowledgeStoreService) ctx.getBean( "kstore1" );
KnowledgeBase kbase1 = (KnowledgeBase) ctx.getBean( "kbProcessWorkItems" );
service = kstore.loadStatefulKnowledgeSession( sessionId,
kbase1,
null,
env );
processInstance = (RuleFlowProcessInstance) service.getProcessInstance( processInstanceId );