@Test public void testSkippedTasks() throws Exception { Task A = new FailedTask("A-Failed"); Task B = new EmptyTask("B"); Task C = new EmptyTask("C"); Task D = new EmptyTask("D"); Task E = new EmptyTask("E"); Task F = new EmptyTask("F"); Task G = new EmptyTask("G"); this.tg = new TaskGraph(); this.tg.addTask(A); this.tg.addTask(B); this.tg.addTask(C); this.tg.addTask(D, TaskGuard.ALL_PREDECESSORS_SUCCEEDED, A, B); this.tg.addTask(E, TaskGuard.ALL_PREDECESSORS_SUCCEEDED, D); this.tg.addTask(F, TaskGuard.ALL_PREDECESSORS_COMPLETED, C, D); this.tg.addTask(G, TaskGuard.ALL_ANCESTORS_SUCCEEDED, F); this.job = this.je.submit("Job-skipped-task", this.tg, true); this.job.waitForCompletion(); assertEquals(((TaskStatusElementImpl)this.job.getTaskGraph().getTaskNode(A).getStatus()).getStatus(), TaskStatus.FAILED); assertEquals(((TaskStatusElementImpl)this.job.getTaskGraph().getTaskNode(B).getStatus()).getStatus(), TaskStatus.PASSED); assertEquals(((TaskStatusElementImpl)this.job.getTaskGraph().getTaskNode(C).getStatus()).getStatus(), TaskStatus.PASSED); assertEquals(((TaskStatusElementImpl)this.job.getTaskGraph().getTaskNode(D).getStatus()).getStatus(), TaskStatus.SKIPPED); assertEquals(((TaskStatusElementImpl)this.job.getTaskGraph().getTaskNode(E).getStatus()).getStatus(), TaskStatus.SKIPPED); assertEquals(((TaskStatusElementImpl)this.job.getTaskGraph().getTaskNode(F).getStatus()).getStatus(), TaskStatus.PASSED); assertEquals(((TaskStatusElementImpl)this.job.getTaskGraph().getTaskNode(G).getStatus()).getStatus(), TaskStatus.SKIPPED); }
public Job submit(String name, TaskGraph taskGraph, JobCompletionListener listener, boolean persistent) throws Exception { return initJob(name, taskGraph, null, listener, null, persistent); }
JobEngine { public Job submit(String name, TaskGraph taskGraph, JobCompletionListener listener, boolean persistent) throws Exception { return initJob(name, taskGraph, null, listener, null, persistent); } }
JobEngine { public Job submit(String name, TaskGraph taskGraph, JobCompletionListener listener, boolean persistent) throws Exception { return initJob(name, taskGraph, null, listener, null, persistent); } private  JobEngine(); }
JobEngine { public Job submit(String name, TaskGraph taskGraph, JobCompletionListener listener, boolean persistent) throws Exception { return initJob(name, taskGraph, null, listener, null, persistent); } private  JobEngine(); synchronized void init(int jobThreadPoolSize, int taskThreadPoolSize); static synchronized JobEngine getEngine(); void shutdown(); void logStatus(); Job submit(String name, TaskGraph taskGraph, JobCompletionListener listener, boolean persistent); Job submit(String name, TaskGraph taskGraph, JobCompletionListener jobListener,
            TaskChangeListener taskListener, boolean persistent); Job submit(String name, TaskGraph taskGraph, boolean persistent); Job submit(String name, TaskGraph taskGraph, Set<LockObjectReference> objects, JobCompletionListener listener); Job submit(String name, TaskGraph taskGraph, Set<LockObjectReference> objects,
            JobCompletionListener jobListener, TaskChangeListener taskListener); Job submit(String name, TaskGraph taskGraph, Set<LockObjectReference> objects); Job submit(String name, TaskGraph taskGraph, Set<LockObjectReference> objects,
            JobCompletionListener jobCompletionListener, TaskChangeListener taskChangeListener, boolean persistent); boolean isActive(); static void setJobThreadPoolSize(String value); static void setTaskThreadPoolSize(String value); synchronized void abortJob(Long jobId, String reason); void addJobCompletionListener(JobCompletionListener listener); void removeJobCompletionListener(JobCompletionListener listener); synchronized Job getJobByTask(Task task); }
JobEngine { public Job submit(String name, TaskGraph taskGraph, JobCompletionListener listener, boolean persistent) throws Exception { return initJob(name, taskGraph, null, listener, null, persistent); } private  JobEngine(); synchronized void init(int jobThreadPoolSize, int taskThreadPoolSize); static synchronized JobEngine getEngine(); void shutdown(); void logStatus(); Job submit(String name, TaskGraph taskGraph, JobCompletionListener listener, boolean persistent); Job submit(String name, TaskGraph taskGraph, JobCompletionListener jobListener,
            TaskChangeListener taskListener, boolean persistent); Job submit(String name, TaskGraph taskGraph, boolean persistent); Job submit(String name, TaskGraph taskGraph, Set<LockObjectReference> objects, JobCompletionListener listener); Job submit(String name, TaskGraph taskGraph, Set<LockObjectReference> objects,
            JobCompletionListener jobListener, TaskChangeListener taskListener); Job submit(String name, TaskGraph taskGraph, Set<LockObjectReference> objects); Job submit(String name, TaskGraph taskGraph, Set<LockObjectReference> objects,
            JobCompletionListener jobCompletionListener, TaskChangeListener taskChangeListener, boolean persistent); boolean isActive(); static void setJobThreadPoolSize(String value); static void setTaskThreadPoolSize(String value); synchronized void abortJob(Long jobId, String reason); void addJobCompletionListener(JobCompletionListener listener); void removeJobCompletionListener(JobCompletionListener listener); synchronized Job getJobByTask(Task task); static final int DEFAULT_JOB_THREAD_POOL_SIZE; static final int DEFAULT_TASK_THREAD_POOL_SIZE; }