conf.set("d", "${c}${c}");
conf.set("f", "${e}${e}");
final String jobId1 = engine.submitJob(conf, true);
WorkflowJob wf = engine.getJob(jobId1);
XConfiguration wfConf = new XConfiguration(new StringReader(wf.getConf()));
assertEquals("AA", wfConf.get("a"));
assertEquals("B", wfConf.get("b"));
assertEquals("C", conf.get("c"));
assertEquals("CC", conf.get("d"));
assertEquals("CCCC", conf.get("e"));
assertEquals("CCCCCCCC", conf.get("f"));
waitFor(10000, new Predicate() {
public boolean evaluate() throws Exception {
WorkflowJobBean bean = Services.get().get(WorkflowStoreService.class).create().getWorkflow(jobId1, false);
return bean.getWorkflowInstance().getStatus().isEndState();
}
});
assertEquals(WorkflowJob.Status.KILLED, engine.getJob(jobId1).getStatus());
waitFor(10000, new Predicate() {
public boolean evaluate() throws Exception {
return CallbackServlet.JOB_ID != null;
}
});
assertEquals(wf.getId(), CallbackServlet.JOB_ID);
assertEquals("kill", CallbackServlet.NODE_NAME);
assertEquals("T:null", CallbackServlet.STATUS);
}