LogisticsInventoryPG thePG = (LogisticsInventoryPG)inv. searchForPropertyGroup(LogisticsInventoryPG.class); Iterator newIter = newRefillProjs.iterator(); while (newIter.hasNext()) { Task newRefillProj = (Task) newIter.next();  thePG.addRefillProjection(newRefillProj);  inventoryPlugin.publishRefillTask(newRefillProj, inv); } }
  public void compareRefillProjections(ArrayList newRefillProjs, 					ArrayList oldRefillProjs, 					Inventory inv) {    //Rescind all old Refill Projection Tasks    Iterator oldIter = oldRefillProjs.iterator();    while (oldIter.hasNext()) {      Task oldRefillProj = (Task) oldIter.next();      // add in a check for a null - nulls and tasks are put in the      // refill lists so make sure we don't publish null!      if (oldRefillProj != null) {	  // remove this from the workflow's sub task list first	  ((NewWorkflow)oldRefillProj.getWorkflow()).removeTask(oldRefillProj);	inventoryPlugin.publishRemove(oldRefillProj);      }    }    //Process all new Refill Projection Tasks    LogisticsInventoryPG thePG = (LogisticsInventoryPG)inv.	searchForPropertyGroup(LogisticsInventoryPG.class);    Iterator newIter = newRefillProjs.iterator();    while (newIter.hasNext()) {      Task newRefillProj = (Task) newIter.next();      // apply the Task to the LogisticsInventoryBG      thePG.addRefillProjection(newRefillProj);      // hook the task in with the MaintainInventory workflow and publish      inventoryPlugin.publishRefillTask(newRefillProj, inv);    }  }