if (processInstance.getProcessId().equals(processId)) {
return;
}
synchronized (processInstance) {
org.drools.definition.process.Process oldProcess = processInstance.getProcess();
processInstance.disconnect();
processInstance.setProcess(oldProcess);
updateNodeInstances(processInstance, nodeMapping);
processInstance.setKnowledgeRuntime((InternalKnowledgeRuntime) kruntime);
processInstance.setProcess(process);
processInstance.reconnect();