Set<String> productIdSet = ProductWorker.getRefurbishedProductIdSet(productId, delegator);
productIdSet.add(productId);
EntityCondition bySerialNumberCondition = EntityCondition.makeCondition(EntityCondition.makeCondition("serialNumber", EntityOperator.EQUALS, serialNum),
EntityOperator.AND, EntityCondition.makeCondition("productId", EntityOperator.IN, productIdSet));
List<GenericValue> inventoryItemsBySerialNumber = delegator.findList("InventoryItem", bySerialNumberCondition, null, null, null, false);
// this is a status update, so referenced serial number MUST already exist
if (inventoryItemsBySerialNumber.size() == 0) {
String errMsg = "Referenced serial numbers must already exist, but serial number [" + serialNum + "] was not found.";
errorMapList.add(UtilMisc.<String, String>toMap("description", errMsg, "reasonCode", "SerialNumberRequiredButNotFound"));