.getDeploymentCache();
// Find the process definition
ProcessDefinitionEntity processDefinition = null;
if (processDefinitionId!=null) {
processDefinition = deploymentCache.findDeployedProcessDefinitionById(processDefinitionId);
if (processDefinition == null) {
throw new ActivitiException("No process definition found for id = '" + processDefinitionId + "'");
}
} else if(processDefinitionKey != null){
processDefinition = deploymentCache.findDeployedLatestProcessDefinitionByKey(processDefinitionKey);