while (wftasks.hasMoreElements()) { Task t = (Task) wftasks.nextElement(); if (t.getVerb().equals(verbGLS)) { Enumeration pp = t.getPrepositionalPhrases(); while (pp.hasMoreElements()) { PrepositionalPhrase app = (PrepositionalPhrase) pp.nextElement(); if ((app.getPreposition().equals(Constants.Preposition.FOR)) && (app.getIndirectObject() instanceof Organization) ) { return true;
try { ((WorkflowImpl) wf).setWalkingSubtasks(true);  while (wftasks.hasMoreElements()) { Task t = (Task) wftasks.nextElement(); if (t.getVerb().equals(verbGLS)) { Enumeration pp = t.getPrepositionalPhrases(); while (pp.hasMoreElements()) { PrepositionalPhrase app = (PrepositionalPhrase) pp.nextElement(); if ((app.getPreposition().equals(Constants.Preposition.FOR)) && (app.getIndirectObject() instanceof Organization) ) { return true; }
  public static UnaryPredicate myExpsPred() {    return new UnaryPredicate() {      public boolean execute(Object o) {	if (o instanceof Expansion) {	  Workflow wf = ((Expansion)o).getWorkflow();	  // Synchronize so we can walk tasks safely	  synchronized (wf) { 	    Enumeration wftasks = wf.getTasks();	    while (wftasks.hasMoreElements()) {	      Task t = (Task) wftasks.nextElement();	      if (t.getVerb().equals(verbGLS)) {		Enumeration pp = t.getPrepositionalPhrases();		while (pp.hasMoreElements()) {		  PrepositionalPhrase app = (PrepositionalPhrase) pp.nextElement();		  if ((app.getPreposition().equals(Constants.Preposition.FOR)) && (app.getIndirectObject() instanceof Organization) ) {		    return true;		  }		}	      }	    }	  } // end synchronization of workflow	}	return false;      }    };  }