docs: protected Long evaluateValueProvider(ParameterValueProvider valueProvider, ExecutionEntity execution, String errorMessageHeading) {
      Object value;
      try {
        value = valueProvider.getValue(execution);
  
      } catch (ProcessEngineException e) {
  
        if (Context.getProcessEngineConfiguration().isEnableGracefulDegradationOnContextSwitchFailure()
            && isSymptomOfContextSwitchFailure(e, execution)) {
  
          value = getDefaultPriorityOnResolutionFailure();
          logNotDeterminingPriority(execution, value, e);
        }
        else {
          throw e;
        }
      }
  
      if (!(value instanceof Number)) {
        throw new ProcessEngineException(errorMessageHeading + ": Priority value is not an Integer");
      }
      else {
        Number numberValue = (Number) value;
        if (isValidLongValue(numberValue)) {
          return numberValue.longValue();
        }
        else {
          throw new ProcessEngineException(errorMessageHeading + ": Priority value must be either Short, Integer, or Long");
        }
      }
    }