use of edu.cornell.kfs.concur.businessobjects.ConcurReport in project cu-kfs by CU-CommunityApps.
the class ConcurEventNotificationProcessingServiceImpl method processConcurEventNotification.
protected void processConcurEventNotification(ConcurEventNotification concurEventNotification) {
LOG.info("processConcurEventNotification() start");
try {
ValidationResult validationResult = new ValidationResult();
ConcurReport concurReport = concurReportsService.extractConcurReport(concurEventNotification.getObjectURI());
if (concurReport != null) {
LOG.info("Concur report status code from Concur: report ID: " + concurReport.getReportID() + ", status code: " + concurReport.getConcurStatusCode() + ", workflow URI: " + concurReport.getWorkflowURI());
if (ConcurUtils.isConcurReportStatusAwaitingExternalValidation(concurReport.getConcurStatusCode())) {
validationResult = validateReportAccountInfo(concurReport);
concurReportsService.updateExpenseReportStatusInConcur(concurReport.getWorkflowURI(), validationResult);
} else {
LOG.info("Concur Report not in Awaiting External Validation status");
validationResult.addMessage(configurationService.getPropertyValueAsString(ConcurKeyConstants.INCORRECT_CONCUR_STATUS_CODE));
}
concurEventNotificationService.updateConcurEventNotificationFlagsAndValidationMessage(concurEventNotification, ConcurConstants.EVENT_NOTIFICATION_NOT_IN_PROCESS, ConcurConstants.EVENT_NOTIFICATION_PROCESSED, validationResult.isValid(), validationResult.getErrorMessagesAsOneFormattedString());
}
} catch (Exception e) {
LOG.error("An exception occured while processing this request: id " + concurEventNotification.getConcurEventNotificationId() + ", object URI" + concurEventNotification.getObjectURI() + ", error: " + e.getMessage(), e);
}
}
use of edu.cornell.kfs.concur.businessobjects.ConcurReport in project cu-kfs by CU-CommunityApps.
the class ConcurReportsServiceImpl method extractConcurReportFromTravelRequestDetails.
protected ConcurReport extractConcurReportFromTravelRequestDetails(String reportURI) {
TravelRequestDetailsDTO travelRequestDetailsDTO = retrieveTravelRequestDetails(reportURI);
List<ConcurAccountInfo> concurAccountInfos = extractAccountInfoFromTravelRequestDetails(travelRequestDetailsDTO);
return new ConcurReport(travelRequestDetailsDTO.getRequestID(), travelRequestDetailsDTO.getConcurStatucCode(), travelRequestDetailsDTO.getWorkflowActionURL(), concurAccountInfos);
}
use of edu.cornell.kfs.concur.businessobjects.ConcurReport in project cu-kfs by CU-CommunityApps.
the class ConcurReportsServiceImpl method extractConcurReportFromExpenseDetails.
protected ConcurReport extractConcurReportFromExpenseDetails(String reportURI) {
ExpenseReportDetailsDTO expenseReportDetailsDTO = retrieveExpenseReportDetails(reportURI);
List<ConcurAccountInfo> concurAccountInfos = extractAccountInfoFromExpenseReportDetails(expenseReportDetailsDTO);
return new ConcurReport(expenseReportDetailsDTO.getReportId(), expenseReportDetailsDTO.getConcurStatusCode(), expenseReportDetailsDTO.getWorkflowActionURL(), concurAccountInfos);
}
Aggregations