Using Microsoft Bot Framework v4, I have 3 dialogs that create a loop. When I implement them as illustrated below, since Bot Framework v4 requires you to initialize each dialog in the constructor, the Bot errors out with a Stack overflow exception. I'm wondering if anyone has created a bot with this type of flow without exceptions.
Here are the 3 dialogs: Create a contact, Update a contact and search for a contact.
Search for a contact may not find a contact and so provides the ability to create a contact.
Update a contact allows for the user to search for a contact.
Create a contact will create a contact, then check if there is a duplicate, if there is, then allows you to update the contact instead of creating.
The circular reference is (Create a contact => Update a contact => Search for a contact => Create a contact).
The flow may not always require you to enter each piece of information, but the dialogs need to Add dialog in the constructor so you can call "BeginDialogAsync" if needed.
Any help on how to manage this flow would be greatly appreciated.