MPTask mpTask = (MPTask) taskToMPTask.get (previousTask);
if (isInfoEnabled ()) { info (getName() + " - looking task " + previousTask.getUID() + "'s mptask parent uid " + previousTask.getParentTaskUID()); }  MPTask mpTask = (MPTask) uidToMPTask.get (previousTask.getParentTaskUID());
  public boolean addToPrevious (Vector tasklist, Asset anAsset, Date start, Date end, Date setupStart, Date wrapupEnd) {    // see explanation for bug #11866 above    Task previousTask;    String taskKey = anAsset.getUID().toString() + "-" + start.getTime() + "-" + end.getTime();    previousTask = (Task) tripletToTask.get (taskKey);    if (previousTask == null) {      if (isInfoEnabled ()) {	info (getName() + " - couldn't find task with key " + taskKey + 	      " so looking in role schedule of " + anAsset.getUID());      }      previousTask = getEncapsulatedTask (anAsset, start, end); // look on asset's role schedule      if (previousTask != null)	tripletToTask.put (taskKey, previousTask);    }    if (previousTask != null) { // found transport task      if (isDebugEnabled()) 	debug (getName () + ".addToPrevious - found previous task for asset " + 			    anAsset.getUID());      Vector directObjects = getDirectObjectsForAgg(tasklist);       // step 1 - add to d.o. of transport task      Asset directObject = addToDirectObject (previousTask, directObjects);      if (makeSetupAndWrapupTasks) {	if (setupStart.getTime() < start.getTime()) {	  // step 2 - add to d.o. of setup	  addToPreviousSetupWrapup (anAsset, directObject, setupStart, start, "setup");	}	if (wrapupEnd.getTime() > end.getTime()) {	  // step 3 - add to d.o. of wrapup	  addToPreviousSetupWrapup (anAsset, directObject, end, wrapupEnd, "wrapup");	}      }      MPTask mpTask = (MPTask) taskToMPTask.get (previousTask);      if (mpTask == null) { // should only happen after rehydration	if (isInfoEnabled ()) {	  info (getName() + " - looking for mptask parent of " + previousTask.getUID()+ " on blackboard via expensive query.");	}	// do expensive blackboard query	mpTask = getMPTask (previousTask.getParentTaskUID ());	taskToMPTask.put (previousTask, mpTask); // remember for next time       }      if (mpTask == null) {	if (isInfoEnabled ()) {	  info ("Can't find mptask " + previousTask.getParentTaskUID () + 		" parent of " + previousTask.getUID() + " on blackboard. Must have been removed.");	}	return false; // the MP task was removed from the blackboard while scheduler was running      }      // step 4 - add to d.o. of MPTask parent      ((NewMPTask) mpTask).setDirectObject (directObject);      // step 5 - Make MP Task know of new parents      Enumeration parents = mpTask.getParentTasks ();      Vector parentsVector = enumToVector (parents);      ((NewMPTask)mpTask).setParentTasks (getEnumWithNewParents (parentsVector, tasklist));      if (isInfoEnabled ()) {	info (getName() + " - publish changing " + mpTask.getUID());      }      publishChange (mpTask);      // step 6 - make aggregations for connecting parent tasks to MPTask      NewComposition comp = (NewComposition) mpTask.getComposition ();      addAggregations (comp, tasklist, start, end);      publishChange (comp);            return true;    }    return false;  }