title: node.js bot framework universalbot beginDialogAction usage?
body: <p>Maybe I'm stupid, but I really don't understand how to read the <a href="https://docs.botframework.com/en-us/node/builder/chat-reference/modules/_botbuilder_d_.html" rel="nofollow">node.js version of Microsoft's bot framework sdk</a>. I'm trying to figure out how to use <a href="https://docs.botframework.com/en-us/node/builder/chat-reference/classes/_botbuilder_d_.universalbot.html#begindialogaction" rel="nofollow">beginDialogAction()</a> or <a href="https://docs.botframework.com/en-us/node/builder/chat-reference/classes/_botbuilder_d_.universalbot.html#endconversationaction" rel="nofollow">endConversationAction()</a> in a <a href="https://docs.botframework.com/en-us/node/builder/chat-reference/classes/_botbuilder_d_.consoleconnector.html" rel="nofollow">ConsoleConnector bot</a>. The documentation says it registers an action when triggered but no mention of how to trigger it. I want to leverage the idea that it can add a dialog in the middle of callstack outside of the normal flow.</p>
  
  <p>I'm sorry I can't provide code but I can give this...</p>
  
  <pre><code>var connector = new builder.ConsoleConnector().listen();
  var connector = new builder.ConsoleConnector().listen();
  var bot = new builder.UniversalBot(connector);
  
  bot.dialog('/', [
      function( session ) {
          builder.Prompts.text(session, "blah blah blah?");
      },
      function( session, results ) {
          // ...
  
          session.beginDialog('/foo');
          session.endDialog();
      }
  ]);
  
  bot.dialog('/foo', [
      function( session, args ) {
          // ...
      },
      function( session, results ) {
          // ...
          session.endDialog();
      }
  ]);
  
  bot.use({ botbuilder: function( session, next ) {
  
      // CALL THE ACTION 'bar' HERE TO ADD '/help' to the callstack
  
      // ...
      next();
  }});
  
  bot.beginDialogAction('bar', '/help');
  
  bot.dialog('/help', [
      function( session, args ) {
          // ...
      },
      function( session, results ) {
          // ...
          session.endDialog();
      }
  ]);
  </code></pre>