Welcome to the Bot Framework SDK for JavaScript repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using JavaScript.
v3 has a dialog version middleware which is useful for you adding a major.minor version to your bots conversational system. This version number gets stamped on every conversation state object an anytime the conversations major versions no longer match the state will be automatically deleted and the user will be sent a message saying "A system update has occurred and we need to start over." Why do you need to do that?
If you deploy a major update to your bot you run the risk of users getting into a stuck state due to the fact their current conversation state no longer reflects the structure of the bot that was just deployed. In some cases this can result in your bot throwing an exception which is actual a good thing because we'll catch that and automatically deleted the conversation state. The more difficult scenario is that instead of throwing an exception you can end up trapping the user in an infinite loop that they can't get out of. Given the user a way to always say "goodbye" and force a conversation state deletion is one way to get them out but incrementing your bots major version number is a more automatic way of doing this and prevent the user just having to know they can say "goodbye".
I can't say enough how critical a feature this is so while it could be done as a sample its probably best as a piece of middleware that we encourage all developers to always include in their bot somewhere after the ConversationStateStore middleware.
v3 has a dialog version middleware which is useful for you adding a major.minor version to your bots conversational system. This version number gets stamped on every conversation state object an anytime the conversations major versions no longer match the state will be automatically deleted and the user will be sent a message saying "A system update has occurred and we need to start over." Why do you need to do that?
If you deploy a major update to your bot you run the risk of users getting into a stuck state due to the fact their current conversation state no longer reflects the structure of the bot that was just deployed. In some cases this can result in your bot throwing an exception which is actual a good thing because we'll catch that and automatically deleted the conversation state. The more difficult scenario is that instead of throwing an exception you can end up trapping the user in an infinite loop that they can't get out of. Given the user a way to always say "goodbye" and force a conversation state deletion is one way to get them out but incrementing your bots major version number is a more automatic way of doing this and prevent the user just having to know they can say "goodbye".
I can't say enough how critical a feature this is so while it could be done as a sample its probably best as a piece of middleware that we encourage all developers to always include in their bot somewhere after the ConversationStateStore middleware.