inventoryPlugin.publishChange(pe);
  private void checkPlanElement(Task withdraw, LogisticsInventoryPG thePG) {    //if this task already has a pe - make sure the results are consistent    // with best.    PlanElement pe = withdraw.getPlanElement();    AllocationResult ar = pe.getEstimatedResult();    double taskEnd, arQty, taskQty;    boolean correct = false;    if (ar != null) {      double resultTime;      // make sure END_TIME is specified - otherwise use START_TIME      // UniversalAllocator plugin only gives start times      if (ar.isDefined(AspectType.END_TIME)) {        resultTime = ar.getValue(AspectType.END_TIME);      } else {        resultTime = ar.getValue(AspectType.START_TIME);      }      //double arEnd = ar.getValue(AspectType.END_TIME);      arQty = ar.getValue(AspectType.QUANTITY);      taskEnd = getTaskUtils().getPreference(withdraw, AspectType.END_TIME);      taskQty = getTaskUtils().getPreference(withdraw, AspectType.QUANTITY);      if ( (resultTime == taskEnd) && (arQty == taskQty) ) {        correct = true;      }    }     //if the existing allocation result was not best or the     //Allocation result was null, make a new allocation result    if (!correct) {      AllocationResult estimatedResult = PluginHelper.        createEstimatedAllocationResult(withdraw, inventoryPlugin.getRootFactory(),                                         0.9, true);      pe.setEstimatedResult(estimatedResult);      //inventoryPlugin.publishChange(pe);      thePG.updateWithdrawRequisition(withdraw);    }    // mark it as changed either way so that the actionable expansion list contains this change    inventoryPlugin.publishChange(pe);  }