I'm trying to trigger multiple LUIS dialogs based on intent. But the problem I'm facing is once the child dialog is triggered it automatically triggers the callback method in the parent LUIS Dialog.
I've been following this post of SO which mentions the same problem, but am unable to replicate the same success.
Here is my code snippet for reference
[LuisIntent("ClaimStatus")]
public async Task ClaimStatus(IDialogContext context, IAwaitable<IMessageActivity> activity, LuisResult result)
{
string message = "";
message = "Sure, but first I would need to verify you.";
await context.PostAsync(message);
await context.Forward(new VerificationDialog(), VerificationDialogCompleted, context.Activity, CancellationToken.None);
}
private Task VerificationDialogCompleted(IDialogContext context, IAwaitable<object> result)
{
//var res = await result;
context.PostAsync("ProductsDialogCompleted" + result);
context.Wait(MessageReceived);
return Task.CompletedTask;
}
Code in child dialog
override public async Task StartAsync(IDialogContext context)
{
await context.PostAsync("Would you please tell me your Customer ID?");
context.Wait(MessageReceived);
}
[LuisIntent("None")]
private async Task None(IDialogContext context, IAwaitable<IMessageActivity> activity, LuisResult result)
{
context.Done(true);
}
EDIT1: I have also found a GitHub repo that shows dialogue stacks by the same author in SO but still the LUIS dialog stack is not working as expected.