title: How do I return a Mono after Flux's onComplete is executed?
body: <p>I am trying to save a set of categories. When all categories are saved, set the categories of product to it. Then return Product. So far I've managed to do this.</p>
  
  <pre><code>public Mono&lt;Product&gt; save(Product product) {
      final Set&lt;Category&gt; categories = product.getCategories();
      Set&lt;Category&gt; _categorySet = new HashSet&lt;&gt;();
      Mono&lt;Product&gt; _product;
      for (Category category : categories) {
          final Mono&lt;Category&gt; save = categoryService.save(category);
          save.subscribe(_categorySet::add,null,()-&gt;{
              product.setCategories(_categorySet);
              repository.save(product);
          });
      }
  }
  </code></pre>
  
  <p>How do I return product after it has been saved without relying on <code>block()</code>? I cannot seem to find a source to learn these stuffs. Can someone point me to good materials.</p>