removeFromDirectObject (agg.getTask(), mpTask);
AssetGroup newGroup = removeFromDirectObject (agg.getTask(), mpTask); Expansion exp = (Expansion) mpTask.getPlanElement(); if (exp == null) { warn ("no expansion of mp task " + mpTask.getUID() + " must be in the middle of rescinds..."); } else { Enumeration enum = exp.getWorkflow ().getTasks(); while (enum.hasMoreElements()) { Task subtask = (Task) enum.nextElement();  Vector newSet = new Vector (); newSet.addAll (newGroup.getAssets()); AssetGroup newAssetGroup = assetHelper.makeAssetGroup (getLDMService().getLDM().getFactory(), newSet); ((NewItemIdentificationPG) newAssetGroup.getItemIdentificationPG()).setItemIdentification("group_for_subtask_of_" + mpTask.getUID() + "_with_" + newSet.size() +"_members"); ((NewTask) subtask).setDirectObject (newAssetGroup);  publishChange (subtask); }   checkMPTaskDO (mpTask); }
  public void handleRemovedAggregation (Aggregation agg) {	    Vector removedTasks = new Vector();    removedTasks.add(agg.getTask());    handleRemovedTasks(removedTasks.elements());        MPTask mpTask = agg.getComposition ().getCombinedTask ();    if (mpTask == null)      error ("no mp task on aggregation of " + agg.getTask().getUID());    else {      removeFromDirectObject (agg.getTask(), mpTask); // ignore returned asset group    }  }