throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ErrorCode.E0303,
RestConstants.ACTION_PARAM, action);
}
boolean startJob = (action != null);
String user = conf.get(OozieClient.USER_NAME);
BundleEngine bundleEngine = Services.get().get(BundleEngineService.class).getBundleEngine(user,
getAuthToken(request));
String id = null;
boolean dryrun = false;
if (action != null) {
dryrun = (action.equals(RestConstants.JOB_ACTION_DRYRUN));
}
if (dryrun) {
id = bundleEngine.dryrunSubmit(conf, startJob);
}
else {
id = bundleEngine.submitJob(conf, startJob);
}
json.put(JsonTags.JOB_ID, id);
}
catch (BundleEngineException ex) {
throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ex);