Closed sfratini closed 6 years ago
Well, I "solved" it by adding a second step in the requestConfim dialog and ending the child dialogs with {success:true}. This is my second step:
function(session, results){
if (results.success){
session.replaceDialog("requestConfirm");
} else {
session.endDialogWithResult({error: true});
}
}
It seems an overkill, having a step just for this but so far it works. I'd love some feedback about the solution tho. Thanks
Was experiencing the same problem as @sfratini as it ended the entire dialog stack when ending child dialog. Did a similar workaround by adding an extra empty waterfall step at the end of the parent dialogue.
Did not work:
parent{
beginDialog('child')
}
child{
endDialog()
}
Works:
parent[
{
beginDialog('child')
},
()=>{}
]
child{
endDialog()
}
Pretty ugly fix.
It looks like you've found a valid workaround. v4 of the sdk handles this scenario better: https://github.com/Microsoft/BotBuilder-js
The Microsoft Bot Framework team prefers that how to questions be submitted on Stack Overflow. The official Bot Framework Github repo is the preferred platform for submitting bug fixes and feature requests.
Bot Info
Issue Description
I am trying to understand the concept or flow of what happens in the last step. I have a waterfall dialog that in the last step, begins a new dialog that request the user to confirm their choices. They can choose to cancel, confirm or modify. Confirm and cancel works fine.
In order to modify, I begin a new dialog, ask the user what they want to modify and then I want to show the confirmation promt again. The problem is that the whole stack seems to be ending all the dialogs in a waterfall. I understand this might be related to the fact I am starting a new dialog in my last step of the dialog, however I don't see how to avoid this.
Code Example
You can see in this log that as soon as I end the child dialog, the two parents also end:
Expected Behavior
I would like to receive the result/information from the child dialog in the parent, so I can decide what to do before ending the dialog.
Code Examples
This is my requestConfirm dialog. When I click on the modify action callback, I have a regex recognizer that catches this and begins a new dialog. This is all a one step dialog because I found it easier to handle.