/** * Returns the error message count. * * @param correlationId correlation Id. * @return the error message count. */ @ManagedOperation @ManagedOperationParameters({ @ManagedOperationParameter(name = "correlationId", description = "Correlation ID") }) public int getTaskErrorMessageCount(String correlationId) { return taskExecutor.getTaskResult(correlationId).getErrorMessageCount(); }
/** * Returns task error messages. * * @param correlationId correlation Id. * @return task error messages. */ @ManagedOperation @ManagedOperationParameters({ @ManagedOperationParameter(name = "correlationId", description = "Correlation ID") }) public String getTaskErrorMessages(String correlationId) { Map<String, TaskItemResult> taskItems = taskExecutor.getTaskResult(correlationId).getTaskItems(); if (!taskItems.isEmpty()) { StringBuilder errors = new StringBuilder(); for (TaskItemResult taskItemResult : taskItems.values()) { errors.append("[").append(taskItemResult).append("]"); } return errors.toString(); } return ""; }