if((result == false) && (type.equals("PackagedPOL") || type.equals("BulkPOL"))) { logger.debug("\n Mismatch direct object type... type for plugin is: " + type + "]" + " type for DO is: [" + pg.getSupplyType() + "]"); }
  public boolean isDirectObjectOfType(Task t, String type) {    boolean result = false;    Asset asset = t.getDirectObject();    // Check for aggregate assets and grab the prototype    if (asset instanceof AggregateAsset) {      asset = ((AggregateAsset)asset).getAsset();    }    try {      SupplyClassPG pg = (SupplyClassPG)asset.searchForPropertyGroup(SupplyClassPG.class);      if (pg != null) {	result = type.equals(pg.getSupplyType());      }      else {	logger.debug("No SupplyClassPG found on asset "+ this.taskDesc(t));      }    } catch (Exception e) {      logger.error("Tasks DO is null "+ this.taskDesc(t)+"\n"+e);    }    return result;  }