1

I am using MS bot framework and trying to redirect the conversation from one dialog to another. If I use context.Call, the newly called dialog waits for the user to input any message first, which is undesirable. So I want to immediately start the new dialog. I am using context.Forward, which calls an instance of a FormDialog, but the newly created dialog outputs the first message, and then the whole dialog stack ends, returning me to the main screen of my bot.

await context.Forward<TestDialogForm, object>(
                TestDialog.GetDialog(), ChildTestDialogCompleted,
                string.Empty, CancellationToken.None);

What am I doing wrong? context.Call() works fine with the same dialog.

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
  • So you want to switch to the form dialog and immediately prompt for the first field? How are you building your form? – Nafis Zaman Aug 17 '16 at 01:08

1 Answers1

1

See: Calling Forms from Dialogs

This works for me:

await context.Forward(
                new TestDialogForm(), 
                ChildTestDialogCompleted, 
                message, 
                System.Threading.CancellationToken.None);
Community
  • 1
  • 1
Michael Washington
  • 2,744
  • 20
  • 29