I have a bot with waterfall dialogs, written using adaptive dialogs. After each TextInput the user should be able to go back and edit his submission. Is it possible to send again a specific activity from the bot even though the bot has progressed in the conversation flow? Also all the activities send after the TextInput which has to be edited have to be sent again, so basically the conversation flow should reset from the TextInput the user wants to edit.
1
votes
What have you tried so far? Can you edit some code into your question, along with links to any samples or documentation you're following?
- Kyle Delaney
I am using a declarative bot similar to this sample. I tried to use Interruptions on the TextInput dialog but it didn't work, because the dialog flow keeps progressing. I also tried to create a custom dialog that extends TextInput but still didn't work.
- ncr2
I have a lot of TextInput dialogs, one after another. I want to send the previous TextInput (to save another answer), and then continue with the dialog from that TextInput. Basically I need to rewind the dialog flow.
- ncr2
Is asingh's answer acceptable?
- Kyle Delaney
Yes, it helps, but I'd also like to go to a previous step from another waterfall dialog, if it's possible.
- ncr2
1 Answers
1
votes
You can do that using following code:
stepContext.ActiveDialog.State["stepIndex"] =(int)stepContext.ActiveDialog.State["stepIndex"] - 3;
return await IntroStepAsync(stepContext, cancellationToken);
Where IntroStepAsync is the step name in your dialog and -3 means I am at the third prompt and want to go back to the 3rd last prompt, if you want to go back to the previous step you have to put -1 and replace IntroStepAsync by your previous prompt's name.