microsoft / BotFramework-Composer

Dialog creation and management for Microsoft Bot Framework Applications
https://docs.microsoft.com/en-us/composer/
MIT License
869 stars 369 forks source link

Property value does not persist outside of 'flow' block #553

Closed stevkan closed 4 years ago

stevkan commented 5 years ago

Setting a property value inside a flow block results in a 'common.lg:Error occurs when evaluating expression ‘user.age’: user.age is evaluated to null' error once the flow completes and the property value is referenced.

To replicate:

  1. Set an initial value to check against in a switch statement. In this test, as a dungeon crawler, the user has already chosen 'Dwarf' or 'Elf'. The property value used is {user.race}.
  2. Set a switch flow to check for 'Dwarf' or 'Elf' in {user.race}. For each case, set the property in the switch to {user.age} and output to integer. If {user.race} is matched, then send a 'send activity' stating max age of {user.race}.
  3. Then send a 'Prompt for a number' prompt. Set property to user.age and output format as integer.
  4. Outside of the flow block, set a 'send activity' that reports the chosen property value ({user.age}).
  5. Output is the above referenced error.

This occurs with either an if/else or a switch statement. I haven't checked a loop.

If I set the value in the normal dialog and don't use a 'flow' block, the value persists.

luhan2017 commented 5 years ago

@stevkan do you mean this? image

In the Prompt for a number I set Property to user.age. image

And in SendActivity, I output this -you are {user.race}, your age is {user.age}

image

I can't repro the issue you reported, could you provide more info? Thanks

vishwacsena commented 4 years ago

There have been numerous stability improvements to the SDK since this ticket was filed. I just verified that memory properties persist correctly even when mutated through a if-else or switch branch.

Closing as no repro.