code: private void propagateStatusAndAlert(final ExecutableFlowBase base, final Status status) {
      if (!Status.isStatusFinished(base.getStatus()) && base.getStatus() != Status.KILLING) {
        this.logger.info("Setting " + base.getNestedId() + " to " + status);
        boolean shouldAlert = false;
        if (base.getStatus() != status) {
          base.setStatus(status);
          shouldAlert = true;
        }
        if (base.getParentFlow() != null) {
          propagateStatusAndAlert(base.getParentFlow(), status);
        } else if (this.azkabanProps.getBoolean(ConfigurationKeys.AZKABAN_POLL_MODEL, false)) {
          // Alert on the root flow if the first error is encountered.
          // Todo jamiesjc: Add a new FLOW_STATUS_CHANGED event type and alert on that event.
          if (shouldAlert && base.getStatus() == Status.FAILED_FINISHING) {
            ExecutionControllerUtils.alertUserOnFirstError((ExecutableFlow) base, this.alerterHolder);
          }
        }
      }
    }
docs: Recursively propagate status to parent flow. Alert on first error of the flow in new AZ
  dispatching design.
  
  @param base the base flow
  @param status the status to be propagated