if (!publishAdd(subtask)) {
if (!publishAdd(subtask) && logger.isErrorEnabled()) {
  public void publishAddToExpansion(Task parent, Task subtask) {    //attach the subtask to its parent and the parent's workflow    PlanElement pe = parent.getPlanElement();    Expansion expansion;    NewWorkflow wf;    ((NewTask) subtask).setParentTask(parent);    ((NewTask) subtask).setPlan(parent.getPlan());    // Task has not been expanded, create an expansion    if (pe == null) {      RootFactory factory = getRootFactory();      // Create workflow      wf = (NewWorkflow)factory.newWorkflow();      wf.setParentTask(parent);      wf.setIsPropagatingToSubtasks(true);      wf.addTask(subtask);      ((NewTask) subtask).setWorkflow(wf);      // Build Expansion      expansion = factory.createExpansion(parent.getPlan(), parent, wf, null);      // Publish Expansion      publishAdd(expansion);    }    // Task already has expansion, add task to the workflow and publish the change    else if (pe instanceof Expansion) {      expansion =(Expansion)pe;      wf = (NewWorkflow)expansion.getWorkflow();      wf.addTask(subtask);      ((NewTask) subtask).setWorkflow(wf);      publishChange(expansion);    }    else {      logger.error("publishAddToExpansion: problem pe not Expansion? "+pe);	        }    // Publish new task    if (!publishAdd(subtask)) {      logger.error("publishAddToExpansion fail to publish task "+taskUtils.taskDesc(subtask));    }    if((subtask.getVerb().equals(Constants.Verb.SUPPLY)) ||       (subtask.getVerb().equals(Constants.Verb.PROJECTSUPPLY))) {      newRefills.add(subtask);    }  }