BotFramework .NET SDK, v4
I understand that retry logic on InputDialog will be triggered when validation rules fails. Eg. User enters non-numeric value on NumberInput or validation expressions defined on dialog fails.
In my scenario, (on adaptive dialogs), user input needs to be validated against external API call and user should re enter value if validation fails. Question is, what is Bot Framework .NET SDK native way to implement retry and exit dialog once max retry count exceed with validation done via calling external API calls?
So far I am trying to implement this behaviour with Step 1. TextInput dialog with MaxTurnCount = 2 and AlwaysPrompt = true and a DefaultValueResponse Step 2. CodeAction, which sets a key on conversation state Step 3. IfCondition, checks conversation state and runs GoToAction
On this setup, DefaultValueResponse is not displayed even after 2 GoToAction execution.
As I understand, GoToAction creates new dialog and does not reuse previously created dialog. So turnCount variable stored on InputDialog reset each time a new dialog created.