Virtual Assistant & Skill
"botbuilder": "^4.11.0",
"botbuilder-ai": "^4.11.0",
"botbuilder-applicationinsights": "^4.11.0",
"botbuilder-azure": "^4.11.0",
"botbuilder-dialogs": "^4.11.0",
"botbuilder-lg": "^4.11.0",
Typescript
We have Virtual assistant and Skill projects. We have dialogs in skill and ability to connect to skill and do all the actions but once the dialog is closed at skill side, and give the utterance in the bot, in VA the new utterance is not going from the first step instead flow is starting from onContinueDialog and connecting to Skill.
On the skill side, once the dialog is completed the finalStep in MainDialog is calling, below is the function
private async finalStep(stepContext: WaterfallStepContext): Promise<DialogTurnResult> {
console.log('skill finalStep');
if (TurnContextEx.isSkill(stepContext.context)) {
const result = stepContext.result;
return await stepContext.endDialog(result);
} else {
return await stepContext.endDialog();
}
}
Create VA: https://microsoft.github.io/botframework-solutions/virtual-assistant/tutorials/create-assistant/typescript/3-create-project/
Create Skill: https://microsoft.github.io/botframework-solutions/skills/tutorials/create-skill/typescript/3-create-your-skill/
The new utterance should start from the first step in VA after the dialog is closed in Skill.
Thanks,
Sreekanth (Ecolab)
Adding to the ticket,
But, when I update the finalStep just before ending the dialog in the Skill MainDialog.ts file, the Virtual Assistant dialog also getting closed.
const EoCResponse: Activity = ActivityEx.createReply(stepContext.context.activity);
EoCResponse.type = ActivityTypes.EndOfConversation;
await stepContext.context.sendActivity(EoCResponse);
Please confirm these statements. If these are ok, I'll go ahead and use them.
Thanks,
Sreekanth
Thanks @SreekanthOAuth for reporting this issue, we will start working on this issue the next week. We will communicate all the updates here 馃槉.
Hi @SreekanthOAuth, sorry for the delay. This week we will start working on this issue, we will let you know any update here 馃槉.
Hi @SreekanthOAuth, we want to confirm with you that we understood the issue.
We have a few questions:
onContinueDialog. Is the scenario we described correct?We believe that this is by design. @lauren-mills, @darrenj could you please confirm this?
@VictorGrycuk - Please find the answers for each question
We have a few questions:
What you are saying is that after completing the skill's dialog, when the skill's dialog utterance is sent again to the assistant, instead of starting the assistant's waterfall steps again it is sent through the onContinueDialog. Is the scenario we described correct? - _[When the skill dialog is closed and the user is given a new utterance it should start the waterfall steps from the first step in VA]_
Do you expect the assistant's waterfall dialog to start over when the skill's dialog is completed? _[Yes]_
Does your snippet make the assistant's waterfall start over after the skill's dialog is completed? _[Yes]_
Thank you @SreekanthOAuth. We were able to reproduce the behaviour you describe, and we think it is by design. As you can see here, the onContinueDialog will always be executed at the start of a turn unless it's the first time that the dialog is run.
By applying this modification you are ending the current Sample Virtual Assistant dialog, so when the skill utterance is sent a second time, after both dialogs were ended, it will be onBeginDialog that is executed instead of onContinueDialog.
These were our repro steps:
run sample dialog onContinueDialog and onBoardingStep run sample dialog againonContinueDialog, before starting the skill. The breakpoint at onBoardingStep will not be activated.Closing given the response above, but feel free to reactivate if you have further questions or issues with the sample