Map<String, Object> serviceContext = FastMap.newInstance();
// change the production run (header) status to PRUN_CANCELLED
serviceContext.put("workEffortId", productionRunId);
serviceContext.put("currentStatusId", "PRUN_CANCELLED");
serviceContext.put("userLogin", userLogin);
dispatcher.runSync("updateWorkEffort", serviceContext);
// Cancel the product promised
List<GenericValue> products = delegator.findByAnd("WorkEffortGoodStandard",
UtilMisc.toMap("workEffortId", productionRunId, "workEffortGoodStdTypeId", "PRUN_PROD_DELIV",
"statusId", "WEGS_CREATED"));
if (!UtilValidate.isEmpty(products)) {