public ArrayList<Task> getTasksSequence() {
       ArrayList<Task> tasks = new ArrayList<Task>();
       bi = new BreadthFirstIterator<Task, Edge>(wf);
       while(bi.hasNext()) {
        Task t = (Task) bi.next();
        tasks.add(t);
       }
       return tasks;
   }