question

AdamLeffert-5988 avatar image
AdamLeffert-5988 asked ·

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

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-bot-service
3 comments
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I appreciate this new site. That said, the feature to add a question requires you to add tags. The set of tags is very limited and you can't add your own tags. For example, I couldn't find a tag for Microsoft Bot Framework.

0 Votes 0 · ·

Hi Adam,

Thanks for the feedback. I have updated the tag in the question so that it shows up at the right service forum.

1 Vote 1 · ·

Please follow Custom-dialogs demonstrates complex conversation flow using the Dialogs library. If possible could you please share the sample code that you are trying. We have forwarded to the bot framework team to check on this.


0 Votes 0 · ·

1 Answer

AdamLeffert-5988 avatar image
AdamLeffert-5988 answered ·

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

Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.