}
processInstance = (org.jbpm.process.instance.ProcessInstance)
processInstanceInfo.getProcessInstance(kruntime, this.kruntime.getEnvironment(), readOnly);
processInstance.setId(processInstanceInfo.getId());
if (((ProcessInstanceImpl) processInstance).getProcessXml() == null) {
Process process = kruntime.getKieBase().getProcess( processInstance.getProcessId() );
if ( process == null ) {
throw new IllegalArgumentException( "Could not find process " + processInstance.getProcessId() );
}
processInstance.setProcess( process );
}