Task senttask = ((AllocationforCollections)pe).getAllocationTask();
NewTask senttask = (NewTask) ((AllocationforCollections)pe).getAllocationTask();
  private void processTask(Task task, Collection changes) {    PlanElement pe = task.getPlanElement();    if (pe == null) return;        // MAJOR HACK BY MIK AND BETH!!!!!  HACK HACK HACK     // Fixes a problem in multi-vm societies where the planelement    // doesn't get re-matched up.  This code gets called when changes    // are made to a task (preference changes)... other plugins and    // this LP expect this task to already have a pe from the first    // time around.    if (! (pe instanceof Allocation)) return;    Allocation all = (Allocation) pe;    Asset asset = all.getAsset();    ClusterPG cpg = asset.getClusterPG();    if (cpg == null) return;    MessageAddress destination = cpg.getMessageAddress();    if (destination == null) return;    Task senttask = ((AllocationforCollections)pe).getAllocationTask();    if (senttask != null) {      if (((TaskImpl)senttask).private_updatePreferences((TaskImpl)task)) {        // we changed task, so:        // Give the task to the blackboard for transmission        rootplan.sendDirective(senttask, changes);      }    }  }