private void addSkippedServices(Map<String, List<OrderService>> skippedServices, List<OrderService> servicesJustAdded) {
    for (OrderService service : servicesJustAdded) {
      if (skippedServices.containsKey(service.serviceName)) {
        List<OrderService> servicesToAdd = skippedServices.remove(service.serviceName);
        addGroupingServices(servicesToAdd, service.serviceName);
        addSkippedServices(skippedServices, servicesToAdd);
      }
    }
  }
Adds services which were previously skipped, if the service they are supposed
to come after has been added.
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/Grouping.java