Non-linear (cyclical) dialog flow in v4
This is a more general question regarding the v4 framework. Recently my team and I made the decision to migrate from v3 to v4 as we became aware that support for v3 would be ending soon. For the most part I didn't have too many issues with the migration until I began trying to implement luis
Now how the previous v3 bot worked is that a series of hard coded responses were checked by the bot (depending on where in the dialog we were). If none of these responses were matched than the bot would redirect to luis and luis would decide what to do next. Luis could then subsequently redirect the conversation back up the dialog flow (essentially above the original point in the tree for example). The created a cyclical dialog flow where any dialog could be accessed from anywhere in the dialog tree.
An issue with v4 is becoming very apparent and that is that this cyclical nature seems to be impossible. This is because an instance of each dialog class must be created when adding dialogs in the class constructors using the AddDialog method. If you have a root dialog that need to instantiate a Luis dialog instance, and that subsequent luis dialog needs to instantiate a root dialog instance (because it may occasionally need to redirect it there) then an obvious issue is that these two classes are going to continuously instantiate one another until a recursion limit is hit.
The only other option I can think of is to include an identical luis method in every class that extracts the entity and then redirects the conversation, essentially removing the luis dialog middle man altogether.
I believe this would only be a short term solution however and this conversation rigidity would always prove to be an issue when trying to develop this cyclical conversation structure.
Has anyone come across this issue before and managed to find a work-around? Or does anyone have any ideas? As it is I think we may have to scrap the v4 migration and stay with the v3 as the bot we have right now seems to complicated for v4
I figured out you don't have to add all the dialogs in the constructor as the example show. You can add them anywhere in a dialog
@OBrien1510 , we are facing similar situation . can you please elaborate your finding with example.