@Test public void testTimeTrackingForSequentialWorkflow() throws WorkflowException { Workflow.Sequential wf = new Workflow.Sequential(); LifeStepWorkflowItem job1 = new LifeStepWorkflowItem(); LifeStepWorkflowItem job2 = new LifeStepWorkflowItem(); wf.add(job1, job2); wf.submit(); Date submitTime1 = new Date(2000); Date startTime1 = new Date(3000); Date stopTime1 = new Date(5000); Date submitTime2 = new Date(5000); Date startTime2 = new Date(7000); Date stopTime2 = new Date(9000); assertWfTime(job1, null, null, null); assertWfTime(job2, null, null, null); assertWfTime(wf, null, null, null); setTime(submitTime1, job1, job2); incLifeStep(job1, job2); assertWfTime(job1, submitTime1, null, null); assertWfTime(job2, null, null, null); assertWfTime(wf, submitTime1, null, null); setTime(startTime1, job1, job2); incLifeStep(job1, job2); assertWfTime(job1, submitTime1, startTime1, null); assertWfTime(job2, null, null, null); assertWfTime(wf, submitTime1, startTime1, null); setTime(stopTime1, job1, job2); incLifeStep(job1, job2); assertWfTime(job1, submitTime1, startTime1, stopTime1); assertWfTime(job2, submitTime2, null, null); assertWfTime(wf, submitTime1, startTime1, null); setTime(startTime2, job1, job2); incLifeStep(job1, job2); assertWfTime(job1, submitTime1, startTime1, stopTime1); assertWfTime(job2, submitTime2, startTime2, null); assertWfTime(wf, submitTime1, startTime1, null); setTime(stopTime2, job1, job2); incLifeStep(job1, job2); assertWfTime(job1, submitTime1, startTime1, stopTime1); assertWfTime(job2, submitTime2, startTime2, stopTime2); assertWfTime(wf, submitTime1, startTime1, stopTime2); incLifeStep(job1, job2); assertWfTime(job1, submitTime1, startTime1, stopTime1); assertWfTime(job2, submitTime2, startTime2, stopTime2); assertWfTime(wf, submitTime1, startTime1, stopTime2); }
public void add(WorkflowItem... items) { for (WorkflowItem item : items) { item.addWorkflowStatusListener(this); } itemList.addAll(Arrays.asList(items)); if (!itemList.isEmpty()) { aggregateChildInformation(); } }
Workflow extends AbstractWorkflowItem implements WorkflowStatusListener { public void add(WorkflowItem... items) { for (WorkflowItem item : items) { item.addWorkflowStatusListener(this); } itemList.addAll(Arrays.asList(items)); if (!itemList.isEmpty()) { aggregateChildInformation(); } } }
Workflow extends AbstractWorkflowItem implements WorkflowStatusListener { public void add(WorkflowItem... items) { for (WorkflowItem item : items) { item.addWorkflowStatusListener(this); } itemList.addAll(Arrays.asList(items)); if (!itemList.isEmpty()) { aggregateChildInformation(); } } protected  Workflow(WorkflowItem... items); }
Workflow extends AbstractWorkflowItem implements WorkflowStatusListener { public void add(WorkflowItem... items) { for (WorkflowItem item : items) { item.addWorkflowStatusListener(this); } itemList.addAll(Arrays.asList(items)); if (!itemList.isEmpty()) { aggregateChildInformation(); } } protected  Workflow(WorkflowItem... items); void add(WorkflowItem... items); boolean isSustainable(); void setSustainable(boolean sustainable); @Override void kill(); @Override void updateStatus(); @Override void handleStatusChanged(WorkflowStatusEvent event); @Override Object[] getJobIds(); @Override WorkflowItem[] getItems(); }
Workflow extends AbstractWorkflowItem implements WorkflowStatusListener { public void add(WorkflowItem... items) { for (WorkflowItem item : items) { item.addWorkflowStatusListener(this); } itemList.addAll(Arrays.asList(items)); if (!itemList.isEmpty()) { aggregateChildInformation(); } } protected  Workflow(WorkflowItem... items); void add(WorkflowItem... items); boolean isSustainable(); void setSustainable(boolean sustainable); @Override void kill(); @Override void updateStatus(); @Override void handleStatusChanged(WorkflowStatusEvent event); @Override Object[] getJobIds(); @Override WorkflowItem[] getItems();  }