code: public int getState()
     {
        boolean hasSuspendedComponents = false;
        boolean hasResumedComponents = false;
        List<Suspendable> suspendableComponents = getComponentInstancesOfType(Suspendable.class);
        for (Suspendable component : suspendableComponents)
        {
           if (component.isSuspended())
           {
              hasSuspendedComponents = true;
           }
           else
           {
              hasResumedComponents = true;
           }
        }
  
        if (hasSuspendedComponents && !hasResumedComponents)
        {
           return ManageableRepository.SUSPENDED;
        }
        else if (!hasSuspendedComponents)
        {
           return ManageableRepository.ONLINE;
        }
        else
        {
           return ManageableRepository.UNDEFINED;
        }
     }
docs: Returns current workspace state.