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)) {
for(GenericValue product : products) {
product.set("statusId", "WEGS_CANCELLED");