context = new ClassPathXmlApplicationContext("jbpm/local-emf/local-emf-spring.xml");
AbstractPlatformTransactionManager aptm = (AbstractPlatformTransactionManager) context.getBean( "jbpmTxManager" );
RuntimeManager manager = (RuntimeManager) context.getBean("runtimeManager");
RuntimeEngine engine = manager.getRuntimeEngine(ProcessInstanceIdContext.get());
KieSession ksession = engine.getKieSession();
TaskService taskService = engine.getTaskService();
int ksessionId = ksession.getId();
ProcessInstance processInstance = ksession.startProcess("com.sample.bpmn.hello");
System.out.println("Process started");
manager.disposeRuntimeEngine(engine);
engine = manager.getRuntimeEngine(ProcessInstanceIdContext.get(processInstance.getId()));
ksession = engine.getKieSession();
taskService = engine.getTaskService();
assertEquals(ksessionId, ksession.getId());
AuditLogService logService = (AuditLogService) context.getBean("logService");
DefaultTransactionDefinition def = new DefaultTransactionDefinition();