jobResult.setStatus( jobRequest.getStatus() );
return jobResult;
}
private void approveRequest(CommandContext ctx, JobRequest request, JobResult result) {
JobRequestApprovalService approvalService = null;
try {
approvalService = getApprovalService(ctx);
} catch( Exception e) {
logger.warn("Unable to retrieve {} bean: {}",
JobRequestApprovalService.class.getSimpleName(),
e.getMessage(),
e);
result.setStatus(JobStatus.APPROVED);
return;
}
if( approvalService == null ) {
result.setStatus(JobStatus.APPROVED);
} else {
approvalService.requestApproval(request, result);
}
}