botbuilder-dotnet
botbuilder-dotnet copied to clipboard
RepromptDialog event never seems to fire
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.
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.
Could you please provide a sample where we can see your implementation?
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.
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.
Please, let us know your thoughts.
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.