try {
newWfInstance = workflowLib.createInstance(app, conf, jobId);
}
catch (WorkflowException e) {
throw new CommandException(e);
}
wfBean.setAppName(app.getName());
wfBean.setProtoActionConf(protoActionConf.toXmlString());
}
catch (WorkflowException ex) {
throw new CommandException(ex);
}
catch (IOException ex) {
throw new CommandException(ErrorCode.E0803, ex);
}
catch (HadoopAccessorException ex) {
throw new CommandException(ex);
}
catch (URISyntaxException ex) {
throw new CommandException(ErrorCode.E0711, ex.getMessage(), ex);
}
try {
for (int i = 0; i < actions.size(); i++) {
if (!nodesToSkip.contains(actions.get(i).getName())) {
jpaService.execute(new WorkflowActionDeleteJPAExecutor(actions.get(i).getId()));
LOG.info("Deleting Action[{0}] for re-run", actions.get(i).getId());
}
else {
copyActionData(newWfInstance, oldWfInstance);
}
}
wfBean.setAppPath(conf.get(OozieClient.APP_PATH));
wfBean.setConf(XmlUtils.prettyPrint(conf).toString());
wfBean.setLogToken(conf.get(OozieClient.LOG_TOKEN, ""));
wfBean.setUser(conf.get(OozieClient.USER_NAME));
String group = ConfigUtils.getWithDeprecatedCheck(conf, OozieClient.JOB_ACL, OozieClient.GROUP_NAME, null);
wfBean.setGroup(group);
wfBean.setExternalId(conf.get(OozieClient.EXTERNAL_ID));
wfBean.setEndTime(null);
wfBean.setRun(wfBean.getRun() + 1);
wfBean.setStatus(WorkflowJob.Status.PREP);
wfBean.setWorkflowInstance(newWfInstance);
jpaService.execute(new WorkflowJobUpdateJPAExecutor(wfBean));
}
catch (JPAExecutorException e) {
throw new CommandException(e);
}
return null;
}