"'"+processInstanceId+"' " +
"points to a child execution of process instance " +
"'"+processInstance.getProcessInstanceId()+"'. " +
"Please invoke the "+getClass().getSimpleName()+" with a root execution id.");
}
ProcessDefinitionImpl currentProcessDefinitionImpl = processInstance.getProcessDefinition();
DeploymentManager deploymentCache = commandContext
.getProcessEngineConfiguration()
.getDeploymentManager();
ProcessDefinitionEntity currentProcessDefinition;
if (currentProcessDefinitionImpl instanceof ProcessDefinitionEntity) {
currentProcessDefinition = (ProcessDefinitionEntity) currentProcessDefinitionImpl;
} else {
currentProcessDefinition = deploymentCache.findDeployedProcessDefinitionById(currentProcessDefinitionImpl.getId());
}
ProcessDefinitionEntity newProcessDefinition = deploymentCache
.findDeployedProcessDefinitionByKeyAndVersion(currentProcessDefinition.getKey(), processDefinitionVersion);