code: private String getActivityStatus(Task mpxj)
     {
        String result;
        if (mpxj.getActualStart() == null)
        {
           result = "Not Started";
        }
        else
        {
           if (mpxj.getActualFinish() == null)
           {
              result = "In Progress";
           }
           else
           {
              result = "Completed";
           }
        }
        return result;
     }
docs: Retrieve an activity status.
  
  @param mpxj MPXJ Task instance
  @return activity status