@Override
  public boolean exec(MethodContext methodContext) {
    // if anything but false it will be true
    boolean setIfNull = !"false".equals(methodContext.expandString(setIfNullStr));

    GenericValue value = valueAcsr.get(methodContext);
    if (value == null) {
      String errMsg =
          "In set-pk-fields a value was not found with the specified valueAcsr: "
              + valueAcsr
              + ", not setting fields";

      Debug.logWarning(errMsg, module);
      if (methodContext.getMethodType() == MethodContext.EVENT) {
        methodContext.putEnv(simpleMethod.getEventErrorMessageName(), errMsg);
        methodContext.putEnv(
            simpleMethod.getEventResponseCodeName(), simpleMethod.getDefaultErrorCode());
      } else if (methodContext.getMethodType() == MethodContext.SERVICE) {
        methodContext.putEnv(simpleMethod.getServiceErrorMessageName(), errMsg);
        methodContext.putEnv(
            simpleMethod.getServiceResponseMessageName(), simpleMethod.getDefaultErrorCode());
      }
      return false;
    }

    Map<String, ? extends Object> theMap = mapAcsr.get(methodContext);
    if (theMap == null) {
      Debug.logWarning(
          "In set-pk-fields could not find map with name " + mapAcsr + ", not setting any fields",
          module);
    } else {
      value.setPKFields(theMap, setIfNull);
    }
    return true;
  }