botbuilder-dotnet icon indicating copy to clipboard operation
botbuilder-dotnet copied to clipboard

RepromptDialog event never seems to fire

Open lauren-mills opened this issue 3 years ago • 3 comments

Version

4.13.2

Describe the bug

When I interrupt a dialog mid-prompt with another dialog, then return to the first dialog, I would expect the RepromptDialog event to fire, so that I can provide a contextual response to the user like, "Let's finish that task you interrupted" or prompt to continue the first dialog or not. However, when the first dialog is resumed, the repromptDialog event never seems to fire.

lauren-mills avatar Jul 01 '21 21:07 lauren-mills

Hi @lauren-mills, We tried to reproduce this issue with no success. We updated the CoreBot sample to include the RepromptDialogAsync method when handling the interruption, and the bot worked as expected. We used version 4.13.2 and the latest 4.15.0, but it worked with both. image

Could you please provide a sample where we can see your implementation?

ceciliaavila avatar Dec 03 '21 19:12 ceciliaavila

This is an issue specifically in a Composer Bot since the composer bots rely on dialog events being fired in order for the RepromptDialog trigger to be fired, rather than using the repromptDialogAsync method directly as a code first bot can do. I can add a sample for this next week.

lauren-mills avatar Dec 04 '21 15:12 lauren-mills

Hi @lauren-mills, We were able to create a sample bot using composer, with the main dialog that's interrupted by a secondary dialog and then resumes to the main dialog, re-prompting the question without actually firing the Re-prompt event. Inspecting the SDK's code, we noticed that the main dialog is resumed after finishing with the secondary dialogs' endOfActions event. Then, it evaluates the state of the input (Missing, Valid, or Completed), and if it was interrupted or not, to execute the promptUserAsync method.

However, Composer allows emitting custom events. We can emit the built-in repromptDialog event as the last action in the secondary dialog, and the Re-prompt for input trigger gets fired.

We couldn't find any documentation to confirm if this is the intended way of working with the Re-prompt event, or it's just a workaround. image

Please, let us know your thoughts.

ceciliaavila avatar Dec 22 '21 14:12 ceciliaavila

Hi @tracyboehrer, we think this issue can be closed as we proposed an alternative for managing re-prompts and we had no activity since then (Dec 2021). Thanks.

ceciliaavila avatar Apr 20 '23 15:04 ceciliaavila