Bot Framework v4, .Net Core 2.2, C#, can waterfall dialog step code see the global dialog stack?

AdamLeffert-5988 71 Reputation points
2020-06-07T12:40:49.9+00:00

Writing a Microsoft Bot Framework v4 app in C#, .Net Core 2.2.

I want to implement a "where am i" command whose code examines the dialog stack and reports back to the user where they are in the conversation.

I'm using Waterfall dialogs with nested calls to BeginDialogAsync.

My waterfall step code can read WaterfallStepContext.Stack, but that's the local stack, for the current waterfall.

Is there an object available to waterfall step code that can see the global stack, with all current dialogs in the stack?

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
737 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AdamLeffert-5988 71 Reputation points
    2020-06-17T11:03:17.61+00:00

    You haven't answered my question.

    I've spent many months creating bots. They work. I've read the MS doc. It's very good.

    Rather than pointing me to dozens of pages of documentation on many topics, please find someone who knows the answer to my question.

    The dialog stack is a concept which is clearly defined in the doc. I am using waterfall dialogs, also clearly defined.

    If I write code in a waterfall step method, that code can read the local dialog stack, i.e. the stack of that one specific waterfall, by reading the Stack property of the step context parameter.

    My question is: If my code needs to read the global dialog stack, where does this code go (in which handler) and which property does that code read?

    The global dialog stack, as defined in the doc, is the stack of all dialogs. Waterfall A calls BeginDialogAsync on Waterfall B. Both Waterfall A and B would be on the global dialog stack.

    My issue is as described above. I don't have sample code, because my question is asking which single line of code in which handler do I need to write?

    Thanks in advance,

    Adam

    0 comments No comments