code: protected Long getProcessDefinedPriority(ProcessDefinitionImpl processDefinition, String propertyKey, ExecutionEntity execution, String errorMsgHead) {
      if (processDefinition != null) {
        ParameterValueProvider priorityProvider = (ParameterValueProvider) processDefinition.getProperty(propertyKey);
        if (priorityProvider != null) {
          return evaluateValueProvider(priorityProvider, execution, errorMsgHead);
        }
      }
      return null;    
    }
docs: Returns the priority which is defined in the given process definition.
  The priority value is identified with the given propertyKey.
  Returns null if the process definition is null or no priority was defined.
  
  @param processDefinition the process definition that should contains the priority
  @param propertyKey the key which identifies the property
  @param execution the current execution
  @param errorMsgHead the error message header which is used if the evaluation fails
  @return the priority defined in the given process