NewWorkflow wf = getPlanningFactory().newWorkflow(); wf.setParentTask(parent); wf.setIsPropagatingToSubtasks(true); NewTask t; Iterator subtasksIT = subtasks.iterator(); while(subtasksIT.hasNext()) { t = (NewTask) subtasksIT.next(); t.setWorkflow(wf); wf.addTask(t); } return wf;
NewWorkflow wf = getPlanningFactory().newWorkflow(); wf.setParentTask(parent); wf.setIsPropagatingToSubtasks(true); NewTask t; Iterator subtasksIT = subtasks.iterator(); while(subtasksIT.hasNext()) { t = (NewTask) subtasksIT.next(); t.setWorkflow(wf); wf.addTask(t);
    public Workflow buildWorkflow(Task parent, Collection subtasks) {	NewWorkflow wf = getPlanningFactory().newWorkflow();	wf.setParentTask(parent);	wf.setIsPropagatingToSubtasks(true);	NewTask t;	Iterator subtasksIT = subtasks.iterator();	while(subtasksIT.hasNext()) {	    t = (NewTask) subtasksIT.next();	    t.setWorkflow(wf);	    wf.addTask(t);	}	return wf;    }