public static void processMaxSubscriptionPercent(
      Integer newMaxSubscriptionPercentFromArray,
      StoragePool pool,
      DbClient dbClient,
      RecordableEventManager eventManager) {

    // get limits in vipr
    int poolSubscriptionPercent =
        pool.getMaxThinPoolSubscriptionPercentage() == null
            ? 0
            : pool.getMaxThinPoolSubscriptionPercentage();
    int poolUtilizationPercent =
        pool.getMaxPoolUtilizationPercentage() == null ? 0 : pool.getMaxPoolUtilizationPercentage();
    _logger.info(
        String.format(
            "StoragePool %s subscription/utilization percent limits in vipr: %s / %s",
            pool.getPoolName(), poolSubscriptionPercent, poolUtilizationPercent));

    Integer currentMaxSubscriptionPercentFromArray =
        pool.getMaxThinPoolSubscriptionPercentageFromArray();
    _logger.info(
        String.format(
            "Current maximum subscription percent of storage pool %s from array in vipr : %s ",
            pool.getPoolName(), currentMaxSubscriptionPercentFromArray));

    // Currently smis uses value of 0 as indication that MaxSubscriptionPercent is not available.
    // Some array clients explicitly set this array limit to 0 to indicate that the value is 0%.
    // The OPT was filed 448553 and it targeted for 4.6.2
    // The plan is to use null to show that this property is not available, and 0 will show 0%.
    // Until the fix for OPT is in, we will use 0 and null as indication for the property is not
    // available.
    // TODO!! Remove check for 0 when the OPT is in.
    if (newMaxSubscriptionPercentFromArray != null
        && newMaxSubscriptionPercentFromArray != 0
        && newMaxSubscriptionPercentFromArray < poolSubscriptionPercent) {
      // reset vipr limit and send alert
      pool.setMaxThinPoolSubscriptionPercentage(newMaxSubscriptionPercentFromArray);
      recordBourneStoragePoolEvent(
          RecordableEventManager.EventType.StoragePoolUpdated,
          pool,
          "Discovered pool max subscription percent is below current pool subscription limit. The limit will be reset.",
          RecordType.Alert,
          dbClient,
          eventManager);
      // check if we need to reset max utilization percent in vipr
      // pool max utilization percent is always less or equal to pool max subscription percent,
      // so we do this check in this 'if' statement
      if (newMaxSubscriptionPercentFromArray < poolUtilizationPercent) {
        // reset vipr utilization limit and send alert
        pool.setMaxPoolUtilizationPercentage(newMaxSubscriptionPercentFromArray);
        recordBourneStoragePoolEvent(
            RecordableEventManager.EventType.StoragePoolUpdated,
            pool,
            "Discovered pool max subscription percent is below current pool utilization limit. The limit will be reset.",
            RecordType.Alert,
            dbClient,
            eventManager);
      }
    } else if (currentMaxSubscriptionPercentFromArray != null
        && currentMaxSubscriptionPercentFromArray == poolSubscriptionPercent
        && (newMaxSubscriptionPercentFromArray == null
            || currentMaxSubscriptionPercentFromArray < newMaxSubscriptionPercentFromArray)) {
      // In this case array limit went up from previous value and vipr max pool subscription percent
      // is using old array value ---
      // send event that array value was increased so client may increase vipr limits if needed.
      recordBourneStoragePoolEvent(
          RecordableEventManager.EventType.StoragePoolUpdated,
          pool,
          "Discovered pool max subscription percent is above current pool subscription limit",
          RecordType.Event,
          dbClient,
          eventManager);
    }

    // set array subscription percent in the pool
    pool.setMaxThinPoolSubscriptionPercentageFromArray(newMaxSubscriptionPercentFromArray);
    // TODO!! Remove the "if" below when fix for OPT 448553 is in.
    // Use 0 as not available until then.
    if (newMaxSubscriptionPercentFromArray != null && newMaxSubscriptionPercentFromArray == 0) {
      pool.setMaxThinPoolSubscriptionPercentageFromArray(null);
    }
  }