Next steps in the waterfall dialog flow are not getting called while using Action.Submit in Adaptive cards of Microsoft bot framework SDK V4 (Only when integrated with Microsoft teams)
This is nodejs code in Microsoft framework SDK v4. The problem exists only when integrated with Microsoft teams.
I have tried this in web chat and chat emulator. Action.Submit is calling the next steps on the waterfall dialog flow.
** Bot Code in NodeJS **
async endConversation(stepContext){
console.log("on endConversation")
await stepContext.context.sendActivity({
attachments: [CardFactory.adaptiveCard(RatingCard)]
});
return await stepContext.prompt(TEXT_PROMPT, { prompt: '' });
}
async feedback(stepContext){
console.log("on feedback == "+stepContext.result)
}
** Adaptive Card json **
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"size": "medium",
"weight": "bolder",
"color": "accent",
"text": "Rate your experience!"
},
{
"type": "TextBlock",
"separator": true,
"text": "Please rate your experience! Your feedback is very appreciated and will help improve your experience in the future. ",
"wrap": true
},
{
"type": "ColumnSet",
"spacing": "Medium",
"columns": [
{
"type": "Column",
"selectAction": {
"type": "Action.Submit",
"data": "bad"
},
"items": [
{
"type": "Image",
"horizontalAlignment": "Center",
"url": "https://upload.wikimedia.org/wikipedia/commons/e/ed/StarRatingGraphic.jpg",
"size": "auto"
},
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"text": "Bad"
}
],
"width": "auto"
},
{
"type": "Column",
"selectAction": {
"type": "Action.Submit",
"data": "ok"
},
"items": [
{
"type": "Image",
"horizontalAlignment": "Center",
"url": "https://upload.wikimedia.org/wikipedia/commons/e/ed/StarRatingGraphic.jpg",
"size": "auto"
},
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"text": "Ok"
}
],
"width": "auto"
},
{
"type": "Column",
"selectAction": {
"type": "Action.Submit",
"data": "good"
},
"items": [
{
"type": "Image",
"horizontalAlignment": "Center",
"url": "https://upload.wikimedia.org/wikipedia/commons/e/ed/StarRatingGraphic.jpg",
"size": "auto"
},
{
"type": "TextBlock",
"horizontalAlignment": "Center",
"text": "Good"
}
],
"width": "auto"
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}
Expected :
async method feedback is the next step on the flow which should be called when the user clicks on a star image in adaptive cards.
Actual :
The next step is not getting called. But its going to onMessage method in ActivityHandler base class.
The Interface Looks like