devedse / SubDialogBotReproduction

This bot reproduces an issue we're running into where we can't figure out how to return back to the parent dialog once you enter a child dialog.
MIT License
0 stars 0 forks source link

When completing a subdialog in the Microsoft Bot framework V4, how do you continue on the parent dialog? #1

Open ahmadbk opened 2 years ago

ahmadbk commented 2 years ago

Hi,

We are experiencing the same issue as yourself and are blocked whilst upgrading from BFv3 to BFv4. We wanted to ask if you had manage to resolve the issue. I am referring to your following StackOverFlow post:

When completing a subdialog in the Microsoft Bot framework V4, how do you continue on the parent dialog?

Your response and assistance in this matter would be really appreciated.

Regards, Ahmad

devedse commented 2 years ago

Pfff that's been a long time ago. Maybe @Rufus1123 you remember?

Rufus1123 commented 2 years ago

That's a tough one. Have not done anything with the bot framework past 2+ years and I don't remember how we solved the issue. I'll try to give some leads though.

  1. Adding a Dialog with AddDialog simply adds it to the stack of callable dialogs, it won't continue this dialog. You have to call it with BeginDialog(dialogId)
  2. Withing Component Dialog, there are overridable metods for BeginDialogAsync/ContinueDialogAsync and OnBeginDialogAsync/OnContinueDialogAsync. The methods with and without the On prefix work slightly differently and I remember having some problems managing our dialog stack due to that.
  3. For good examples, see the BotSamples by Microsoft. I think the ComplexDialogBot may help you further: https://github.com/microsoft/BotFramework-BlogSamples/tree/master/SDKV4-Samples/dotnet_core/ComplexDialogBot