Enterprise Bot template not resuming MainDialog in single step WaterfallDialogEntity framework 6, load entities async/awaitEnterprise bot with authenticationAn exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dllC# async await HTTP server fails occasionallyHow to delete dialog stack of Botframework from console.applicationBot Framework: Loop through PromptsMicrosoft bot - Why does some bot example disable warning 1998Enterprise Bot Template Exception with Web ChatBot Framework - Enterprise Template .bot file missingBot Framework not able to authenticate with Enterprise Bot

How can I enter recovery mode (for Mac OS, on an iMac) remotely?

What's the relationship betweeen MS-DOS and XENIX?

Set theory with antielements?

Attacking the Hydra

Meaning of だけはわからない

How to gracefully leave a company you helped start?

Ghost house where the house only appeared once a year for it was the ghost

Why does auto deduce this variable as double and not float?

A Magic Diamond

Are there any cons in using rounded corners for bar graphs?

Duplicate and slide edge (rip from boundary)

Output with the same length always

What exactly happened to the 18 crew members who were reported as "missing" in "Q Who"?

100 Years of GCHQ - A quick afternoon puzzle!

Visa on arrival to exit airport in Russia

What is the fastest way to level past 95 in Diablo II?

A+ rating still unsecure by Google Chrome's opinion

Why does "auf der Strecke bleiben" mean "to fall by the wayside"?

How do ultra-stable oscillators for spacecraft work?

Why should I pay for an SSL certificate?

How to train a replacement without them knowing?

Output the list of musical notes

What should I do with the stock I own if I anticipate there will be a recession?

What if a restaurant suddenly cannot accept credit cards, and the customer has no cash?



Enterprise Bot template not resuming MainDialog in single step WaterfallDialog


Entity framework 6, load entities async/awaitEnterprise bot with authenticationAn exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dllC# async await HTTP server fails occasionallyHow to delete dialog stack of Botframework from console.applicationBot Framework: Loop through PromptsMicrosoft bot - Why does some bot example disable warning 1998Enterprise Bot Template Exception with Web ChatBot Framework - Enterprise Template .bot file missingBot Framework not able to authenticate with Enterprise Bot






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















When starting a dialog saying I want to talk to a human using the Enterprise Bot Template, the WaterfallDialog starts, displays the contact card and ends the flow by calling EndDialogAsync().



However, MainDialogs CompleteAsync() method is never called. Thus the bot is not asking for further help.



I noticed that in multistep WaterfallDialogs this works correctly. I believe that this has somehow to do with the RouterDialog.cs implementation, but could not make sense of it.



EscalateDialog.cs



private async Task<DialogTurnResult> SendPhone(WaterfallStepContext sc, CancellationToken cancellationToken)

await _responder.ReplyWith(sc.Context, EscalateResponses.ResponseIds.SendPhoneMessage);
return await sc.EndDialogAsync();



MainDialog.cs



protected override async Task CompleteAsync(DialogContext dc, CancellationToken cancellationToken = default(CancellationToken))

// The active dialog's stack ended with a complete status
await _responder.ReplyWith(dc.Context, MainResponses.ResponseIds.Completed);










share|improve this question


























  • Did you get the Enterprise bot from the AI repo or did you start with a VSIX template?

    – Kyle Delaney
    Mar 27 at 19:48











  • @KyleDelaney honestly I don’t remember. It’s already 3 month ago when I started the project. Are you trying to point me to an issue that might be solved in latest commit?

    – Sebastian Zolg
    Mar 27 at 20:08












  • No, I'm just trying to reproduce your behavior faithfully

    – Kyle Delaney
    Mar 28 at 16:49











  • If I have to guess I would say I used VSIX. Not sure, though. Looking forward for your analysis. Thanks in advance.

    – Sebastian Zolg
    Mar 28 at 16:51






  • 2





    I just created a new enterprise bot today and I'm afraid I can't reproduce your issue. MainDialog.CompleteAsync gets executed after EscalateDialog.SendPhone just as expected. Since you said you started the project 3 months ago, is it possible that you haven't updated to Bot Builder 4.3? While I couldn't find this particular bug in the GitHub repo, it still seems very possible that this was a bug in the SDK that's been fixed. Please check the versions of your NuGet packages and let me know what they are. I'm using 4.3.1.

    – Kyle Delaney
    Apr 9 at 0:35

















2















When starting a dialog saying I want to talk to a human using the Enterprise Bot Template, the WaterfallDialog starts, displays the contact card and ends the flow by calling EndDialogAsync().



However, MainDialogs CompleteAsync() method is never called. Thus the bot is not asking for further help.



I noticed that in multistep WaterfallDialogs this works correctly. I believe that this has somehow to do with the RouterDialog.cs implementation, but could not make sense of it.



EscalateDialog.cs



private async Task<DialogTurnResult> SendPhone(WaterfallStepContext sc, CancellationToken cancellationToken)

await _responder.ReplyWith(sc.Context, EscalateResponses.ResponseIds.SendPhoneMessage);
return await sc.EndDialogAsync();



MainDialog.cs



protected override async Task CompleteAsync(DialogContext dc, CancellationToken cancellationToken = default(CancellationToken))

// The active dialog's stack ended with a complete status
await _responder.ReplyWith(dc.Context, MainResponses.ResponseIds.Completed);










share|improve this question


























  • Did you get the Enterprise bot from the AI repo or did you start with a VSIX template?

    – Kyle Delaney
    Mar 27 at 19:48











  • @KyleDelaney honestly I don’t remember. It’s already 3 month ago when I started the project. Are you trying to point me to an issue that might be solved in latest commit?

    – Sebastian Zolg
    Mar 27 at 20:08












  • No, I'm just trying to reproduce your behavior faithfully

    – Kyle Delaney
    Mar 28 at 16:49











  • If I have to guess I would say I used VSIX. Not sure, though. Looking forward for your analysis. Thanks in advance.

    – Sebastian Zolg
    Mar 28 at 16:51






  • 2





    I just created a new enterprise bot today and I'm afraid I can't reproduce your issue. MainDialog.CompleteAsync gets executed after EscalateDialog.SendPhone just as expected. Since you said you started the project 3 months ago, is it possible that you haven't updated to Bot Builder 4.3? While I couldn't find this particular bug in the GitHub repo, it still seems very possible that this was a bug in the SDK that's been fixed. Please check the versions of your NuGet packages and let me know what they are. I'm using 4.3.1.

    – Kyle Delaney
    Apr 9 at 0:35













2












2








2








When starting a dialog saying I want to talk to a human using the Enterprise Bot Template, the WaterfallDialog starts, displays the contact card and ends the flow by calling EndDialogAsync().



However, MainDialogs CompleteAsync() method is never called. Thus the bot is not asking for further help.



I noticed that in multistep WaterfallDialogs this works correctly. I believe that this has somehow to do with the RouterDialog.cs implementation, but could not make sense of it.



EscalateDialog.cs



private async Task<DialogTurnResult> SendPhone(WaterfallStepContext sc, CancellationToken cancellationToken)

await _responder.ReplyWith(sc.Context, EscalateResponses.ResponseIds.SendPhoneMessage);
return await sc.EndDialogAsync();



MainDialog.cs



protected override async Task CompleteAsync(DialogContext dc, CancellationToken cancellationToken = default(CancellationToken))

// The active dialog's stack ended with a complete status
await _responder.ReplyWith(dc.Context, MainResponses.ResponseIds.Completed);










share|improve this question
















When starting a dialog saying I want to talk to a human using the Enterprise Bot Template, the WaterfallDialog starts, displays the contact card and ends the flow by calling EndDialogAsync().



However, MainDialogs CompleteAsync() method is never called. Thus the bot is not asking for further help.



I noticed that in multistep WaterfallDialogs this works correctly. I believe that this has somehow to do with the RouterDialog.cs implementation, but could not make sense of it.



EscalateDialog.cs



private async Task<DialogTurnResult> SendPhone(WaterfallStepContext sc, CancellationToken cancellationToken)

await _responder.ReplyWith(sc.Context, EscalateResponses.ResponseIds.SendPhoneMessage);
return await sc.EndDialogAsync();



MainDialog.cs



protected override async Task CompleteAsync(DialogContext dc, CancellationToken cancellationToken = default(CancellationToken))

// The active dialog's stack ended with a complete status
await _responder.ReplyWith(dc.Context, MainResponses.ResponseIds.Completed);







c# botframework






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 8 at 22:47









Kyle Delaney

2,9843 gold badges15 silver badges31 bronze badges




2,9843 gold badges15 silver badges31 bronze badges










asked Mar 27 at 12:32









Sebastian ZolgSebastian Zolg

7324 silver badges21 bronze badges




7324 silver badges21 bronze badges















  • Did you get the Enterprise bot from the AI repo or did you start with a VSIX template?

    – Kyle Delaney
    Mar 27 at 19:48











  • @KyleDelaney honestly I don’t remember. It’s already 3 month ago when I started the project. Are you trying to point me to an issue that might be solved in latest commit?

    – Sebastian Zolg
    Mar 27 at 20:08












  • No, I'm just trying to reproduce your behavior faithfully

    – Kyle Delaney
    Mar 28 at 16:49











  • If I have to guess I would say I used VSIX. Not sure, though. Looking forward for your analysis. Thanks in advance.

    – Sebastian Zolg
    Mar 28 at 16:51






  • 2





    I just created a new enterprise bot today and I'm afraid I can't reproduce your issue. MainDialog.CompleteAsync gets executed after EscalateDialog.SendPhone just as expected. Since you said you started the project 3 months ago, is it possible that you haven't updated to Bot Builder 4.3? While I couldn't find this particular bug in the GitHub repo, it still seems very possible that this was a bug in the SDK that's been fixed. Please check the versions of your NuGet packages and let me know what they are. I'm using 4.3.1.

    – Kyle Delaney
    Apr 9 at 0:35

















  • Did you get the Enterprise bot from the AI repo or did you start with a VSIX template?

    – Kyle Delaney
    Mar 27 at 19:48











  • @KyleDelaney honestly I don’t remember. It’s already 3 month ago when I started the project. Are you trying to point me to an issue that might be solved in latest commit?

    – Sebastian Zolg
    Mar 27 at 20:08












  • No, I'm just trying to reproduce your behavior faithfully

    – Kyle Delaney
    Mar 28 at 16:49











  • If I have to guess I would say I used VSIX. Not sure, though. Looking forward for your analysis. Thanks in advance.

    – Sebastian Zolg
    Mar 28 at 16:51






  • 2





    I just created a new enterprise bot today and I'm afraid I can't reproduce your issue. MainDialog.CompleteAsync gets executed after EscalateDialog.SendPhone just as expected. Since you said you started the project 3 months ago, is it possible that you haven't updated to Bot Builder 4.3? While I couldn't find this particular bug in the GitHub repo, it still seems very possible that this was a bug in the SDK that's been fixed. Please check the versions of your NuGet packages and let me know what they are. I'm using 4.3.1.

    – Kyle Delaney
    Apr 9 at 0:35
















Did you get the Enterprise bot from the AI repo or did you start with a VSIX template?

– Kyle Delaney
Mar 27 at 19:48





Did you get the Enterprise bot from the AI repo or did you start with a VSIX template?

– Kyle Delaney
Mar 27 at 19:48













@KyleDelaney honestly I don’t remember. It’s already 3 month ago when I started the project. Are you trying to point me to an issue that might be solved in latest commit?

– Sebastian Zolg
Mar 27 at 20:08






@KyleDelaney honestly I don’t remember. It’s already 3 month ago when I started the project. Are you trying to point me to an issue that might be solved in latest commit?

– Sebastian Zolg
Mar 27 at 20:08














No, I'm just trying to reproduce your behavior faithfully

– Kyle Delaney
Mar 28 at 16:49





No, I'm just trying to reproduce your behavior faithfully

– Kyle Delaney
Mar 28 at 16:49













If I have to guess I would say I used VSIX. Not sure, though. Looking forward for your analysis. Thanks in advance.

– Sebastian Zolg
Mar 28 at 16:51





If I have to guess I would say I used VSIX. Not sure, though. Looking forward for your analysis. Thanks in advance.

– Sebastian Zolg
Mar 28 at 16:51




2




2





I just created a new enterprise bot today and I'm afraid I can't reproduce your issue. MainDialog.CompleteAsync gets executed after EscalateDialog.SendPhone just as expected. Since you said you started the project 3 months ago, is it possible that you haven't updated to Bot Builder 4.3? While I couldn't find this particular bug in the GitHub repo, it still seems very possible that this was a bug in the SDK that's been fixed. Please check the versions of your NuGet packages and let me know what they are. I'm using 4.3.1.

– Kyle Delaney
Apr 9 at 0:35





I just created a new enterprise bot today and I'm afraid I can't reproduce your issue. MainDialog.CompleteAsync gets executed after EscalateDialog.SendPhone just as expected. Since you said you started the project 3 months ago, is it possible that you haven't updated to Bot Builder 4.3? While I couldn't find this particular bug in the GitHub repo, it still seems very possible that this was a bug in the SDK that's been fixed. Please check the versions of your NuGet packages and let me know what they are. I'm using 4.3.1.

– Kyle Delaney
Apr 9 at 0:35












1 Answer
1






active

oldest

votes


















1














As discussed in comments, this issue no longer occures in the latest enterprise bot template. I verified this myself today using version 4.3.0.171 of Enterprise Bot Template from marketplace.



If you're as me started with a previous version of the template and you want the same behaviour, then you have to change the RouterDialog.cs file.



Simply add the following lines of code in the OnContinueDialogAsync handler method:



...
case DialogTurnStatus.Empty:

await this.RouteAsync(innerDc);
// FIX: Waterfalls with no turns should Complete.
if (innerDc.Stack.Count == 0)
await CompleteAsync(innerDc);
break;

...


After knowing where the problem came from, I could find the related GitHub PR merged on January 30 2019.



Side by side comparision of the changed file:



code fix



Result after fix is applied:



result






share|improve this answer


























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377294%2fenterprise-bot-template-not-resuming-maindialog-in-single-step-waterfalldialog%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    As discussed in comments, this issue no longer occures in the latest enterprise bot template. I verified this myself today using version 4.3.0.171 of Enterprise Bot Template from marketplace.



    If you're as me started with a previous version of the template and you want the same behaviour, then you have to change the RouterDialog.cs file.



    Simply add the following lines of code in the OnContinueDialogAsync handler method:



    ...
    case DialogTurnStatus.Empty:

    await this.RouteAsync(innerDc);
    // FIX: Waterfalls with no turns should Complete.
    if (innerDc.Stack.Count == 0)
    await CompleteAsync(innerDc);
    break;

    ...


    After knowing where the problem came from, I could find the related GitHub PR merged on January 30 2019.



    Side by side comparision of the changed file:



    code fix



    Result after fix is applied:



    result






    share|improve this answer































      1














      As discussed in comments, this issue no longer occures in the latest enterprise bot template. I verified this myself today using version 4.3.0.171 of Enterprise Bot Template from marketplace.



      If you're as me started with a previous version of the template and you want the same behaviour, then you have to change the RouterDialog.cs file.



      Simply add the following lines of code in the OnContinueDialogAsync handler method:



      ...
      case DialogTurnStatus.Empty:

      await this.RouteAsync(innerDc);
      // FIX: Waterfalls with no turns should Complete.
      if (innerDc.Stack.Count == 0)
      await CompleteAsync(innerDc);
      break;

      ...


      After knowing where the problem came from, I could find the related GitHub PR merged on January 30 2019.



      Side by side comparision of the changed file:



      code fix



      Result after fix is applied:



      result






      share|improve this answer





























        1












        1








        1







        As discussed in comments, this issue no longer occures in the latest enterprise bot template. I verified this myself today using version 4.3.0.171 of Enterprise Bot Template from marketplace.



        If you're as me started with a previous version of the template and you want the same behaviour, then you have to change the RouterDialog.cs file.



        Simply add the following lines of code in the OnContinueDialogAsync handler method:



        ...
        case DialogTurnStatus.Empty:

        await this.RouteAsync(innerDc);
        // FIX: Waterfalls with no turns should Complete.
        if (innerDc.Stack.Count == 0)
        await CompleteAsync(innerDc);
        break;

        ...


        After knowing where the problem came from, I could find the related GitHub PR merged on January 30 2019.



        Side by side comparision of the changed file:



        code fix



        Result after fix is applied:



        result






        share|improve this answer















        As discussed in comments, this issue no longer occures in the latest enterprise bot template. I verified this myself today using version 4.3.0.171 of Enterprise Bot Template from marketplace.



        If you're as me started with a previous version of the template and you want the same behaviour, then you have to change the RouterDialog.cs file.



        Simply add the following lines of code in the OnContinueDialogAsync handler method:



        ...
        case DialogTurnStatus.Empty:

        await this.RouteAsync(innerDc);
        // FIX: Waterfalls with no turns should Complete.
        if (innerDc.Stack.Count == 0)
        await CompleteAsync(innerDc);
        break;

        ...


        After knowing where the problem came from, I could find the related GitHub PR merged on January 30 2019.



        Side by side comparision of the changed file:



        code fix



        Result after fix is applied:



        result







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 23 at 12:13

























        answered Apr 23 at 9:28









        Sebastian ZolgSebastian Zolg

        7324 silver badges21 bronze badges




        7324 silver badges21 bronze badges





















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377294%2fenterprise-bot-template-not-resuming-maindialog-in-single-step-waterfalldialog%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript