BotFramework-Composer icon indicating copy to clipboard operation
BotFramework-Composer copied to clipboard

Sending a delay message deletes all recently set values

Open duncan-at-hicksons opened this issue 2 years ago • 2 comments

Describe the bug

If you set a user- or conversation-scope property and send a delay message but the user types anyway, the recently set property gets deleted.

Version

Version: 2.1.2 Electron: 8.2.4 Chrome: 80.0.3987.165 NodeJS: 12.13.0 V8: 8.0.426.27-electron.0

Browser

  • [ x] Electron distribution
  • [ ] Chrome
  • [ ] Safari
  • [ ] Firefox
  • [ ] Edge

OS

  • [ ] macOS
  • [x ] Windows
  • [ ] Ubuntu

To Reproduce

Steps to reproduce the behavior:

  1. Go to EchoBot
  2. Set user.value to true and conversation.value to 'whatever'
  3. Send a message to echo these back, ensuring they were set. They get set.
  4. Add a long delay message like
[Activity
    Value = ${30000}
    Type = ${"delay"}
]
  1. Start EchoBot and type something before delay has ended
  2. Inspect to see that conversation.value and user.value were once set but no longer exist

Expected behavior

I would expect a delay message to have no impact on set variables. Note that:

  • user must type before the delay has ended for the issue to arise
  • putting the delay message in another dialog and calling that dialog shows the same problem
  • removing the delay message resolves the problem
  • weirdly, putting the delay in EchoBot's 'UnknownIntent' trigger resolves the problem

Screenshots

1 2 3

Additional context

It is a particular problem when there are longer running processes and you want to, say, prevent/catch user input during that time.

duncan-at-hicksons avatar Aug 09 '23 23:08 duncan-at-hicksons

@duncan-at-hicksons I am unable to reproduce the issue with the steps given. Can you please share a minimal reproducible sample bot of the issue?

dmvtech avatar Nov 08 '23 19:11 dmvtech

EchoBot.zip Thanks for looking at this Dana. Looking again now, I may have slightly misdescribed the problem. The issue is that all variables only temporarily get deleted/made invisible, for exactly the duration of the delay. It still causes the same problems for managing long-running processes however. I've attached the bot where I reproduce the issue. Below is my experience of it. screen shot of emulator 'hi' text that illustrates the issue image 30s timeline image contents of user and conversation scopes in bot trace after typing 'hi' image same scopes after 30s delay is finished image

duncan-at-hicksons avatar Nov 09 '23 07:11 duncan-at-hicksons