Task t = (Task) en.nextElement(); alreadyFound = true; if (t.getPlanElement() == null) { if (isInfoEnabled()) { info(getAgentIdentifier() + " - redoTasks: Null Plan Element to be filled for task " +t.getUID()); } handleTask(t, subscriptionResults); } else { PlanElement prevPE = t.getPlanElement();   if (orgActivityInThePast (subscriptionResults)) { if (isInfoEnabled()) { info(getAgentIdentifier() + " - redoTasks: not replanning " + t.getUID() + " because it's in the past."); } } else { if (isInfoEnabled()) { info(getAgentIdentifier() + " - redoTasks: Plan Element removed from " + t.getUID() + " and replanned."); }  publishRemove(prevPE); handleTask(t, subscriptionResults);   if ((t.getPlanElement () == null) || (t.getPlanElement () == prevPE)) { warn (getAgentIdentifier() + " - redoTasks: didn't replan " + t.getUID () + " properly, PE not updated."); } } } } } else { if (isInfoEnabled()) { info ("Not acting on change since not all required elements on blackboard."); } } }
  public void redoTasks() {    SubscriptionResults subscriptionResults = checkSubscriptions();    if (subscriptionResults != null) {      Enumeration enum = myInputTaskCallback.getSubscription().elements();      boolean alreadyFound = false;      if (isInfoEnabled()) {	if (!enum.hasMoreElements()) {	  info ("no tasks to replan on redo?");	}      }      while (enum.hasMoreElements()) {	if (alreadyFound) {	  warn(getAgentIdentifier() + " - more than one determine requirements task!");	}