inventoryPlugin.publishRefillTask(newRefill);
inventoryPlugin.publishRefillTask(newRefill, (Inventory)inv);
  private void createRefillTask(double quantity, long endDay, Asset inv, long today) {    // make a new task    NewTask newRefill = inventoryPlugin.getRootFactory().newTask();    // who sets the parent?? - THE GLUE PLUGIN    //newRefill.setParentTask(theParent);    newRefill.setVerb(Constants.Verb.Supply);    newRefill.setDirectObject(inv);    //plan??    // create preferences    Vector prefs = new Vector();    Preference p_end,p_qty;    p_end = createRefillTimePreference(endDay, today);    p_qty = createRefillQuantityPreference(quantity);    prefs.addElement(p_end);    prefs.addElement(p_qty);    newRefill.setPreferences(prefs.elements());    //create Prepositional Phrases    Vector pp_vector = new Vector();    pp_vector.addElement(createPrepPhrase(Constants.Preposition.FOR, getOrgName()));    pp_vector.add(createPrepPhrase(Constants.Preposition.OFTYPE, 					 inventoryPlugin.getSupplyType()));    Object io;    Enumeration geolocs = getAssetUtils().getGeolocLocationAtTime(getMyOrganization(), endDay);    if (geolocs.hasMoreElements()) {      io = (GeolocLocation)geolocs.nextElement();    } else {	io = getHomeLocation();    }    pp_vector.addElement(createPrepPhrase(Constants.Preposition.TO, io));    //TODO - get the LogInvPG accessor settled    // Asset resource = inv.getLogisticsInventoryPG().getResource();//     TypeIdentificationPG tip = ((Asset)resource).getTypeIdentificationPG();//     MaintainedItem itemID = MaintainedItem.findOrMakeMaintainedItem(// 								    "Inventory", // 								    tip.getTypeIdentification(),// 								    null,// 								    tip.getNomenclature());//     pp_vector.addElement(createPrepPhrase(Constants.Preposition.MAINTAINING, itemID));    pp_vector.addElement(createPrepPhrase(Constants.Preposition.REFILL, null));    newRefill.setPrepositionalPhrases(pp_vector.elements());    inventoryPlugin.publishRefillTask(newRefill);  }