Markkknk
Markkknk

Reputation: 416

Migration to custom BotState service - checklist?

After the announcement, that the out-of-the-box bot state management will be deprecated, we have implemented our own bot state service using following documentation:

Therefore, we can summarize the migration process into following steps:

  1. Setup Azure Cosmos DB which will be used to store the bot state data.
  2. Update the Conversation IoC container to include the DocumentDbBotDataStore registrations.
  3. Ensure, that StateClient type is no longer used since it uses the default out-of-the-box bot state storage. Use the ConversationData, PrivateConversationData and UserData from the IDialogContext instead.

After we have implemented above steps we can see that the bot state data is now correctly being stored within our own Cosmos DB. Also, the Bot Channel Emulator no longer reports warnings related to the bot state.

My question is, whether there are other steps which we need to take to ensure, that there wont be any behind the scenes calls to the default deprecated bot state service. Is there something else, which is not too obvious but needs to be considered?

Upvotes: 2

Views: 188

Answers (1)

Eric Dahlvang
Eric Dahlvang

Reputation: 8292

It looks like you've covered everything. There are no "behind the scenes calls to the default deprecated bot state service" in the sdk. If you are not using activity.GetStateClient(), and you've properly implemented an IBotDataStore. You're done.

This document describes how to use the DocumentDbBotDataStore from Microsoft.Bot.Builder.Azure https://github.com/Microsoft/BotBuilder-Azure

Upvotes: 1

Related Questions