JSONObject json = new JSONObject();
try {
String user = conf.get(OozieClient.USER_NAME);
DagEngine dagEngine = Services.get().get(DagEngineService.class).getDagEngine(user, getAuthToken(request));
String id = dagEngine.submitHttpJob(conf, jobType);
json.put(JsonTags.JOB_ID, id);
}
catch (DagEngineException ex) {
throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ex);
}