public ExecutionErrorInstanceList getExecutionErrorsByProcessInstance(String containerId, Number processInstanceId, String nodeName, boolean includeAcknowledged, Integer page, Integer pageSize, String sort, boolean sortOrder) { logger.debug("About to get execution errors for process instance id {} and node {}", processInstanceId, nodeName); List<ExecutionError> errors = null; if (nodeName == null || nodeName.isEmpty()) { errors = processInstanceAdminService.getErrorsByProcessInstanceId(processInstanceId.longValue(), includeAcknowledged, buildQueryContext(page, pageSize, sort, sortOrder));; } else { errors = processInstanceAdminService.getErrorsByProcessInstanceId(processInstanceId.longValue(), nodeName, includeAcknowledged, buildQueryContext(page, pageSize, sort, sortOrder)); } logger.debug("Found errors {}", errors); ExecutionErrorInstanceList errorInstanceList = convertToErrorInstanceList(errors); return errorInstanceList; }