productId = productId == null ? productIdTo : productId;
GenericValue product = null;
try {
product = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", productId));
} catch (GenericEntityException e) {
Map<String, String> messageMap = UtilMisc.toMap("errMessage", e.getMessage());
errMsg = UtilProperties.getMessage(resource,"productservices.problems_reading_product_entity", messageMap, locale);
result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR);
result.put(ModelService.ERROR_MESSAGE, errMsg);