code: public void checkStates( INotificationMngr notificationMngr ) {
  
  		// Check the status of scoped instances
  		Collection<Instance> scopedInstances = InstanceHelpers.findAllScopedInstances( this.application );
  		for( Instance scopedInstance : scopedInstances ) {
  
  			// Never started instances,
  			// or scoped instances that have been stopped by an agent,
  			// are not processed anymore here
  			if( scopedInstance.getStatus() == InstanceStatus.NOT_DEPLOYED
  					|| scopedInstance.getStatus() == InstanceStatus.DEPLOYING
  					|| scopedInstance.getStatus() == InstanceStatus.UNDEPLOYING ) {
  				scopedInstance.data.remove( MISSED_HEARTBEATS );
  				continue;
  			}
  
  			// Otherwise
  			String countAs = scopedInstance.data.get( MISSED_HEARTBEATS );
  			int count = countAs == null ? 0 : Integer.parseInt( countAs );
  			if( ++ count > THRESHOLD ) {
  				scopedInstance.setStatus( InstanceStatus.PROBLEM );
  				notificationMngr.instance( scopedInstance, this.application, EventType.CHANGED );
  				this.logger.severe( "Agent " + InstanceHelpers.computeInstancePath( scopedInstance ) + " has not sent heart beats for quite a long time. Status changed to PROBLEM." );
  			}
  
  			scopedInstance.data.put( MISSED_HEARTBEATS, String.valueOf( count ));
  		}
  	}
docs: Check the scoped instances states with respect to missed heart beats.
  @param notificationMngr