title: Bluebird Promise: Nested or conditional chains
body: <p>I use Bluebird Promises for a Node.js application. How can I introduce conditional chain branches for my application? Example: </p>
  
  <pre><code>exports.SomeMethod = function(req, res) {
          library1.step1(param) 
          .then(function(response) { 
              //foo
  
              library2.step2(param)
              .then(function(response2) { //-&gt; value of response2 decides over a series of subsequent actions
                  if (response2 == "option1") {
                      //enter nested promise chain here?
                      //do().then().then() ...
                  }
  
                  if (response2 == "option2") {
                      //enter different nested promise chain here?
                      //do().then().then() ...
                  }
  
                 [...]
              }).catch(function(e) { 
                  //foo
              });
      });
  };
  </code></pre>
  
  <p>Apart from not having figured out a working version of this yet, this solution feels (and looks) weird somehow. I got a sneaking suspicion that I am somewhat violating the concept of promises or something like that. Any other suggestions how to introduce this kind of conditional branching (each featuring not one but many subsequent steps)?</p>