Azure Bot Framework Program (Node.js) 的工作流程是什么?

whats the workflow of Azure Bot Framework Program (Node.js)?

i)用 Node.js 编写的 Azure Bot 框架程序的工作流程是什么?

ii)它是否总是包含一个 运行 通过的对话框?或者有没有其他方法 运行 我的程序没有对话框?

i)What's the workflow of an Azure Bot Framework Program that is written in Node.js?

一般来说,bot 应用程序需要 botbuilder sdk,而 node.js 中的这个 sdk 有点建立在 Expressjs 或 Restifyjs 中间件上。机器人的连接器需要侦听特定路由以捕获传入请求。

因为在机器人应用程序中需要 server.post('/api/messages', connector.listen());

如果您熟悉 Expressjs 或 Restifyjs,我们可以从 listen() 中了解一下中间件的包装。

在 bot 应用程序内部处理后,botbuilder sdk 将 post the response activity message via DirectLine Restful API to Bot Connector service, which will dispatch the activity to your channel. Refer to the postMessage() 源代码以获取更多详细信息。

ii)Does it always include a Dialog to run through? Or is there any other way to run my program without Dialogs?

是的,总是。