String categoryId = (String) context.get("categoryId");
GenericValue productCategory = null;
List<GenericValue> members = null;
try {
productCategory = delegator.findByPrimaryKeyCache("ProductCategory", UtilMisc.toMap("productCategoryId", categoryId));
members = EntityUtil.filterByDate(productCategory.getRelatedCache("ProductCategoryMember", null, UtilMisc.toList("sequenceNum")), true);
if (Debug.verboseOn()) Debug.logVerbose("Category: " + productCategory + " Member Size: " + members.size() + " Members: " + members, module);
} catch (GenericEntityException e) {
String errMsg = "Problem reading product categories: " + e.getMessage();
Debug.logError(e, errMsg, module);