botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Handle multiple response from the fromflow

Open Sams4u opened this issue 10 years ago • 3 comments

I have a formflow which has one Field with 4 choices. Problem is if the user clicks multiple buttons quickly the formflow object will be returned multiple times. How to handle this. I want to wait for the bot to respond once user clicks a button. Any solution?

Sams4u avatar Jul 28 '16 16:07 Sams4u

You would need some method to serialize posts to your bot, so that each action could be handled as a atomic transaction. You might consider using some sort of external locking (e.g. optimistic concurrency through etag of state service, or ASP.NET exclusive session state locks, etc).

willportnoy avatar Aug 01 '16 16:08 willportnoy

If possible can you help me with some sample code? Also since the field options are enums and when the user clicks it, chat window shows corresponding number. Is there a way to show text instead of value?

Sams4u avatar Aug 02 '16 05:08 Sams4u

The next release out soon will show the text as the message rather than the number.

chrimc62 avatar Aug 10 '16 00:08 chrimc62