Expansion expansion = (Expansion) detReqTask.getPlanElement(); NewWorkflow wf = (NewWorkflow) expansion.getWorkflow(); HashSet remTaskHash = new HashSet(removedAssets); Enumeration subtasks = wf.getTasks(); while(subtasks.hasMoreElements()) { Task task = (Task) subtasks.nextElement() Asset consumer = task.getDirectObject(); if(remTaskHash.contains(consumer)) { wf.removeTask(task); dfPlugin.publishRemove(task); } } dfPlugin.publishChange(expansion);
Expansion expansion = (Expansion) detReqTask.getPlanElement(); NewWorkflow wf = (NewWorkflow) expansion.getWorkflow(); HashSet remTaskHash = new HashSet(removedAssets); Enumeration subtasks = wf.getTasks(); while(subtasks.hasMoreElements()) { Task task = (Task) subtasks.nextElement(); Asset consumer = task.getDirectObject(); if(remTaskHash.contains(consumer)) { wf.removeTask(task); dfPlugin.publishRemove(task); }
    public void removeSubtasksFromDetermineRequirements(Task detReqTask, Collection removedAssets) {	Expansion expansion = (Expansion) detReqTask.getPlanElement();	NewWorkflow wf = (NewWorkflow) expansion.getWorkflow();	HashSet remTaskHash = new HashSet(removedAssets);	Enumeration subtasks = wf.getTasks();	while(subtasks.hasMoreElements()) {	    Task task = (Task) subtasks.nextElement()	    Asset consumer = task.getDirectObject();	    if(remTaskHash.contains(consumer)) {		wf.removeTask(task);		dfPlugin.publishRemove(task);	    }	}	dfPlugin.publishChange(expansion);    }