Botframework-composer: @ shorthand not working as expected in Composer

Created on 23 Jul 2020  Â·  3Comments  Â·  Source: microsoft/BotFramework-Composer

Describe the bug

@x is supposed to be refer to turn.recognized.entities.x, but not working as expected in composer.

if i explicitly set turn.recognized.entities.x = hello world, then print turn.recognized.entities.x it works fine, but @x will throw an error. like this

"....en-us.lg:Exception has been thrown by the target of an invocation. [SendActivity_QrEzdV] Error occurred when evaluating ‘-${SendActivity_QrEzdV()}’. "

Version

latest main

Browser

  • [x] Chrome

OS

  • Windows

To Reproduce

Create an echo bot, and add two steps in unknown intent trigger,
1 set property to turn.recognized.entities.x
2 send response with ${@x}

Expected behavior

expected @x works the same as turn.recognized.entities.x

Screenshots

image

the first send response works
the second didn't work

Bug

All 3 comments

Hi dong, according to the AtAtPathResolver.cs in botbuilder dotnet sdk, '@@' is the alias of 'turn.recognized.entities', so use '@@x'.

'@x‘ stands for 'turn.recognized.entities.x[0]' or 'turn.recognized.entities.x.first()'

Here are my test dialogs:
image

image

@zidaneymar is there anything we can do to make the error message clear?

@zidaneymar is there anything we can do to make the error message clear?

Yes, I think the error message is not intuitive, I'm not sure if lg has the ability to pop up the details in evaluating the expression. I will confirm with hongyang.

Was this page helpful?
0 / 5 - 0 ratings