code: private String getActivityID(Task task)
     {
        String result = null;
        if (m_activityIDField != null)
        {
           Object value = task.getCachedValue(m_activityIDField);
           if (value != null)
           {
              result = value.toString();
           }
        }
        return result;
     }
docs: Retrieve the Activity ID value for this task.
  @param task Task instance
  @return Activity ID value