if (action != null && !action.equals(RestConstants.JOB_ACTION_START)) {
throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ErrorCode.E0303, RestConstants.ACTION_PARAM, action);
}
boolean startJob = (action != null);
String user = conf.get(OozieClient.USER_NAME);
DagEngine dagEngine = Services.get().get(DagEngineService.class).getDagEngine(user, getAuthToken(request));
String id = dagEngine.submitJob(conf, startJob);
json.put(JsonTags.JOB_ID, id);
}
catch (DagEngineException ex) {
throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ex);
}