use of org.apache.oozie.workflow.WorkflowException in project oozie by apache.
the class TestLiteWorkflowLib method testLoopFork.
public void testLoopFork() throws WorkflowException {
LiteWorkflowApp def = new LiteWorkflowApp("wf", "<worklfow-app/>", new StartNodeDef(TestControlNodeHandler.class, "one")).addNode(new NodeDef("one", null, SynchNodeHandler.class, Arrays.asList(new String[] { "f" }))).addNode(new ForkNodeDef("f", TestControlNodeHandler.class, Arrays.asList(new String[] { "two", "three" }))).addNode(new NodeDef("two", null, SynchNodeHandler.class, Arrays.asList(new String[] { "j" }))).addNode(new NodeDef("three", null, SynchNodeHandler.class, Arrays.asList(new String[] { "j" }))).addNode(new JoinNodeDef("j", TestControlNodeHandler.class, "four")).addNode(new NodeDef("four", null, SynchNodeHandler.class, Arrays.asList(new String[] { "f" }))).addNode(new EndNodeDef("end", TestControlNodeHandler.class));
LiteWorkflowInstance job = new LiteWorkflowInstance(def, new XConfiguration(), "1");
try {
job.start();
fail();
} catch (WorkflowException ex) {
assertEquals(ErrorCode.E0709, ex.getErrorCode());
}
assertEquals(WorkflowInstance.Status.FAILED, job.getStatus());
}
Aggregations