Map<String, Object> inMap = UtilMisc.<String, Object>toMap("userLogin", userLogin, "workEffortId", productionRunTaskId);
inMap.put("costComponentTypeId", "ACTUAL_" + workEffortCostCalc.getString("costComponentTypeId"));
inMap.put("costComponentCalcId", costComponentCalc.getString("costComponentCalcId"));
inMap.put("costUomId", costComponentCalc.getString("currencyUomId"));
inMap.put("cost", totalCost);
dispatcher.runSync("createCostComponent", inMap);
} else {
// use the custom method (aka formula) to compute the costs
Map<String, Object> inMap = UtilMisc.<String, Object>toMap("userLogin", userLogin, "workEffort", workEffort);
inMap.put("workEffortCostCalc", workEffortCostCalc);
inMap.put("costComponentCalc", costComponentCalc);