if (processDefinition == null) {
String errorMessage = String.format("No matching process definition with key: %s ", processDefinitionKey);
throw new RestException(Status.NOT_FOUND, errorMessage);
}
ProcessDefinitionResource processDefinitionResource = getProcessDefinitionById(processDefinition.getId());
return processDefinitionResource;
}