Branch | Status | Recommended NuGet package version |
---|---|---|
master |
This package extends Bot Framework Composer with new actions for reading and writing items to the bots configured storage provider. Typically, items will be written to a memory based store when running locally and Cosmos DB when deployed to production. Items are standard JSON objects which, depending on the storage provider, may support concurrency via an eTag
property.
The following new components are included in this package:
Actions | Description |
---|---|
ReadStorageItem | Reads an item from storage. |
WriteStorageItem | Writes an item to storage. |
DeleteStorageItem | Deletes an item previously written to storage. |
A working sample application is also available.
This package can be installed from composers Package Manager screen. Just select the package from the list and click install.
Once installed you should find a new "Store items" menu off composers actions menu.
This action will attempt to read an existing item from storage. Configure an Item Key
and the Result Property
for where to store the retrieved item. You can optionally specify an Initial Item
to return should an item with the specified key not be found. If not specified then null
will be returned.
Your Item Key
can include the value from turn.activity.from.id
to scope the item to the current user and/or turn.activity.conversation.id
to scope the item to the current conversation.
This action writes an item to storage. For storage providers that support concurrency, an error
event will be raised if you attempt to save an existing object that's been changed by another conversation. Set eTag = *
if you wish to always overwrite the existing item.
This action will delete an existing item from storage.