code: private FieldType getActivityIDField(Map<FieldType, String> map)
     {
        FieldType result = null;
        for (Map.Entry<FieldType, String> entry : map.entrySet())
        {
           if (entry.getValue().equals("task_code"))
           {
              result = entry.getKey();
              break;
           }
        }
        return result;
     }
docs: Determine which field the Activity ID has been mapped to.
  
  @param map field map
  @return field