This site is obsolete and should be used for reference only. The information in this documentation is not guaranteed to work for Bot Framework SDK versions past 4.9.1.
Beta Release 0.8
MainDialog updates
Steps for updating to Waterfall MainDialog implementation
Steps
- Move introduction logic to DefaultActivityHandler OnMembersAddedAsync method.
- Copy routing logic from OnMessageActivityAsync method into RouteStepAsync method.
-
Change any switch statement cases that start new dialogs to return the result of BeginDialogAsync like below for proper dialog flow management:
Previous implementation
await dc.BeginDialogAsync("Faq");
New Implementation
return await stepContext.BeginDialogAsync("Faq");
-
-
Copy interruption logic from OnInterruptDialogAsync into InterruptDialogAsync
-
InterruptionActions have been deprecated, so each interruption should now manage the dialog continuation/cancellation on its own.
Previous implementation
case GeneralLuis.Intent.Cancel: { await dc.Context.SendActivityAsync(_templateEngine.GenerateActivityForLocale("CancelledMessage")); await dc.CancelAllDialogsAsync(); return InterruptionAction.End; }
New Implementation
case GeneralLuis.Intent.Cancel: { await innerDc.Context.SendActivityAsync(_templateEngine.GenerateActivityForLocale("CancelledMessage", userProfile)); await innerDc.CancelAllDialogsAsync(); await innerDc.BeginDialogAsync(InitialDialogId); interrupted = true; break; }
-