botframework - replaceDialog() where the dialog is defind using dialog.matches -
i have integrated luis chatbot, , of dialogs defined using dialog.matches(). problem dialogs need redirected other dialogs, replacedialog
or begindialog
doesnt seem working dialogs defined using dialog.matches. example: consider following dialog
options.dialog.matches('startactivity', [ function(session) { })
how manually invoke other dialog? session.replacedialog('startactivity')
throws error.
error: dialog[*:startactivity] not found. @ session.replacedialog (d:\insight\ms-bot\src\api\node_modules\botbuilder\ lib\session.js:146:19) @ array.options.dialog.matches.regex (d:\insight\ms-bot\src\api\dialogs\mor tgage\mortgage-check-account-balance.dialog.js:7:26) @ object.waterfallaction [as mortgagecheckbalance] (d:\insight\ms-bot\src\a pi\node_modules\botbuilder\lib\dialogs\dialogaction.js:130:25) @ intentdialog.invokeintent (d:\insight\ms-bot\src\api\node_modules\botbuil der\lib\dialogs\intentdialog.js:264:44)
refer this issue on githib
the string pass matches() intent match not dialog name. need break waterfall out separate dialog so:
options.dialog.matches('startactivity', [ function (session) { session.begindialog('/startactivity'); } ]); bot.dialog('/startactivity', [ function (session) { }, function (session, results) { session.replacedialog('/startactivity'); } ]);
Comments
Post a Comment