}
  public void expandAndDistributeRequisitions(Collection tasks) {	LogisticsInventoryPG logInvPG;	Task aTask, wdrawTask;	Iterator taskIter = tasks.iterator();	while (taskIter.hasNext()) {	    aTask = (Task) taskIter.next();            SupplyTaskKey key = getSupplyTaskKey(aTask);            Task existingTask = getExistingTask(key);            if (isPrediction(aTask)) {              if (existingTask != null) {                if (logger.isWarnEnabled()) {                  logger.warn("SupplyExpander rescinding redundant prediction: " + aTask);                } else if (logger.isDebugEnabled()) {                  logger.debug("SupplyExpander rescinding unnecessary predicton: " + aTask);                }                inventoryPlugin.publishRemove(aTask); // Probably a bug                continue;              }              if (logger.isDebugEnabled()) {                logger.debug("SupplyExpander adding prediction: " + aTask);              }              putExistingTask(key, aTask);            } else {              putExistingTask(key, aTask); // Regardless of what follows, this is now the prevailing task for this slot              if (existingTask != null && isPrediction(existingTask)) {                // Maybe we can use the withdraw of the prediction                NewPlanElement pe = (NewPlanElement) existingTask.getPlanElement();                inventoryPlugin.publishRemove(existingTask);                if (logger.isDebugEnabled()) {                  logger.debug("SupplyExpander replacing prediction with: " + aTask);                }                if (pe != null) {                  pe.resetTask(aTask);                  // Cause the existing estimated AllocationResult of the expansion to be sent for the new task.                  Transaction.noteChangeReport(pe, new PlanElement.EstimatedResultChangeReport());                  inventoryPlugin.publishChange(pe);                  continue;     // No need to process the task itself                }              } else {                if (logger.isDebugEnabled()) {                  logger.debug("Adding supply task " + aTask);                }              }            }	    wdrawTask = expandDemandTask(aTask, createWithdrawTask(aTask));	    logInvPG = getLogisticsInventoryPG(wdrawTask);	    if (logInvPG != null) {	      logInvPG.addWithdrawRequisition(wdrawTask);	    }	    ((NewWorkflow)wdrawTask.getWorkflow()).setAllocationResultAggregator(supplyARA);	}    }