if (manager != null) {
manager.validate((KieSession) kruntime, ProcessInstanceIdContext.get(id));
}
ProcessPersistenceContextManager ppcm
= (ProcessPersistenceContextManager) this.kruntime.getEnvironment().get( EnvironmentName.PERSISTENCE_CONTEXT_MANAGER );
ppcm.beginCommandScopedEntityManager();
ProcessPersistenceContext context = ppcm.getProcessPersistenceContext();
org.jbpm.process.instance.ProcessInstance processInstance = null;
processInstance = (org.jbpm.process.instance.ProcessInstance) this.processInstances.get(id);