@Test @org.junit.Test public void testDeciderCannotbeFirstElementOnStart() throws Exception { String METHOD = "testDeciderCannotbeFirstElementOnStart"; try { boolean seenException = false; JobExecution jobExec = null; try { jobExec = jobOp.startJobAndWaitForResult("decider_as_first_job_element_fails"); } catch (JobStartException e) { Reporter.log("Caught JobStartException: " + e.getLocalizedMessage()); seenException = true; } // If we caught an exception we'd expect that a JobExecution would not have been created, // though we won't validate that it wasn't created. // If we didn't catch an exception that we require that the implementation fail the job execution. if (!seenException) { Reporter.log("Didn't catch JobStartException, Job Batch Status = " + jobExec.getBatchStatus()); assertWithMessage("Job should have failed because of decision as first execution element.", BatchStatus.FAILED, jobExec.getBatchStatus()); } } catch(Exception e) { handleException(METHOD, e); } }
jobExec = jobOp.startJobAndWaitForResult("job_executable_sequence_invalid", null); } catch (JobStartException e) { Reporter.log("Caught JobStartException: " + e.getLocalizedMessage()); seenException = true;
jobExec = jobOp.startJobAndWaitForResult("flow_transition_to_step_out_of_scope", null); } catch (JobStartException e) { Reporter.log("Caught JobStartException: " + e.getLocalizedMessage()); seenException = true;
jobExec = jobOp.startJobAndWaitForResult("split_transition_to_step_out_of_scope", null); } catch (JobStartException e) { Reporter.log("Caught JobStartException: " + e.getLocalizedMessage()); seenException = true;