IOException {
String status;
String jobId = getResourceName(request);
try {
if (jobId.endsWith("-B")) {
BundleEngine engine = Services.get().get(BundleEngineService.class).getBundleEngine(getUser(request));
status = engine.getJobStatus(jobId);
} else if (jobId.endsWith("-W")) {
DagEngine engine = Services.get().get(DagEngineService.class).getDagEngine(getUser(request));
status = engine.getJobStatus(jobId);
} else {
CoordinatorEngine engine =
Services.get().get(CoordinatorEngineService.class).getCoordinatorEngine(getUser(request));
if (jobId.contains("-C@")) {
status = engine.getActionStatus(jobId);
} else {
status = engine.getJobStatus(jobId);
}
}
} catch (BaseEngineException ex) {
throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ex);
}