Botframework-solutions: Unable to properly end skill when user cancels out when skill is started from sub dialog in VA

Created on 1 Jun 2020  ·  16Comments  ·  Source: microsoft/botframework-solutions

What project is affected?

Virtual assistant

What language is this in?

TypeScript

What happens?

When you start a dialog, then start a skill from that dialog it does not get registered properly on the stack. When the user uses the "cancel" interrupt the skill never receives the end of conversation to reset.

What are the steps to reproduce this issue?

Create a VA and skill. start the skill from the "on boarding dialog of the VA. Try to cancel the skill using the interrupt and check if the skill receives the end of conversation

What were you expecting to happen?

Can you share any logs, error output, etc.?

Dialog stack from skill started in a sub dialog
[ { id: 'MainDialog',
state: { options: {}, values: [Object], stepIndex: 1 } },
{ id: 'TextPrompt', state: { options: [Object], state: {} } },
{ id: 'TransferDialog2',
state: { dialogs: [Object] },
version: '-43530585' } ]

dialog stack of skill started from main dialog
[ { id: 'MainDialog',
state: { options: {}, values: [Object], stepIndex: 2 } },
{ id: 'dlpskill', state: {} } ]

Any screenshots or additional context?

Needs Triage Bug

Most helpful comment

All 16 comments

Thanks @tomSauret847 for reporting this issue! As soon as we have any update we will back to you 😊.

Hi @tomSauret847! We were unsuccessful on trying to reproduce this issue.

We have some questions regarding your repro steps.

  • Are you using the [email protected]?
  • Are you triggering the Skill by sending the utterance during the onboardingDialog of the VA?
  • Have you updated the VA in order to forward the intent to the Skill? If so, what modifications have you done to it?
  • What do you mean with TransferDialog2? Is it a synonym to the onboardingDialog?

We noticed that there is a validation in the interruptDialog method of the VA's MainDialog, that only switches to another Skill if the current dialog belongs to a Skill.
In the case of onboardingDialog this returns false, hence it not being interrupted to start the Skill sample.

This is our environment:

We took the following steps to reproduce the issue:

  1. Deploy Virtual Assistant and Skill
  2. Connect the Virtual Assistant to the Skill
  3. Run both bots in Bot Emulator
  4. Send a Skill's utterance during the VA's onboardingDialog
  5. The Skill was not initialized as the onboardingDialog was not finished

image

Thanks!

Currently we have our live agent transfer set as a skill to be able to escalate to a a live agent if the bot cannot resolve the customers issue (TransferDialog2). We need to perform some validation to ensure that the customer is transferred to the correct chat queue which is why we have built that into a dialog similar to the onboarding dialog. I call the agenttransfer skill with the following code in the transferDialog.

    const identifiedSkill: IEnhancedBotFrameworkSkill | undefined = this.skillsConfig.skills.get('agenttransfer');
    if (identifiedSkill !== undefined) {
        await this.activeSkillProperty.set(sc.context, identifiedSkill);
        return sc.beginDialog('agenttransfer', skillDialogArgs);

The VA will start the skill and forward all the customers messages to the skill, but if the customer triggers the "Cancel dialog" interrupt the VA will not send the end of conversation to the skill to allow us to clean up and end the skill. You did reproduce the steps but did not cancel the skill in your reproduction. That is where our issue is in being able to receive the EOC in the skill to clean up the used resources and close them out.

I am using a TypeScript VA
TypeScript Skill
I have updated both based on the changes that were posted to the "next" branch of the repo to ensure they are up to date
The skill is being triggered and functioning properly, it just does not receive the EOC when the customer chooses to cancel out of all the active dialogs.

Thanks @tomSauret847 for all the information 😊.
We will continue to reproduce the issue, and we will let you know of any update.

@tomSauret847, we want to confirm with you that we correctly understood the issue.

Based on what you said in your last comment we will work on recreating the following scenario:

  1. Create a Virtual Assistant Sample
  2. Create a Skill Sample
  3. Modify the VA's onboardingDialog so it calls the Skill Sample. We will base our modifications on the shared snippet.
  4. Send cancel once that the Skill Sample has started
  5. Cancellation of the Skill Sample should fail

This is how understood that your workflow is. You have a Virtual Assistant with a TransferDialog2 dialog, which initializes the AgentTransfer Skill.
image

Thank you @VictorGrycuk That is the correct workflow of the scenario we are implementing. We can get the skill to work properly during the conversation, but when the customer cancels, the skill will not reset since it never receives the End Of Conversation.

Was this page helpful?
0 / 5 - 0 ratings