botframework-sdk
botframework-sdk copied to clipboard
[Bug] FormFlow on LuisDialog not working after version 3.8.5
System Information (Required)
- SDK Language: .NET/C#
- SDK Version: 3.8.5
- Development Environment: LOCALHOST, AZURE_APP_SERVICE
Issue Description
Formflow on LuisDialog. It works on version 3.8.4, but not on 3.8.5.
Code Example
[Serializable]
public class FlightStatusLuisDialog : LuisDialog<object>
{
private const string PickDepartureDateEntityType = "date";
private const string PickDepartureEntityType = "itinerary::from";
private const string PickArrivalEntityType = "itinerary::to";
private const string PickFlightEntityType = "flight_no";
public FlightStatusLuisDialog(ILuisService luis) : base(luis)
{
}
[LuisIntent("")]
[LuisIntent("None")]
public async Task None(IDialogContext context, LuisResult result)
{
await context.PostAsync(Resources.Common.FlightStatusLuisDialog_NotUnderstood);
context.Wait(MessageReceived);
}
[LuisIntent("flight_status_search")]
[LuisIntent("itinerary_search")]
public async Task QueryLuis(IDialogContext context, LuisResult result)
{
var entities = new List<EntityRecommendation>();
SearchOptions searchOption = SearchOptions.ByRoute;
foreach (var entity in result.Entities)
{
switch (entity.Type)
{
case PickDepartureDateEntityType:
entities.Add(new EntityRecommendation(type: nameof(FlightStatusForm.DepartureDate)) { Entity = entity.Entity.Replace(" ", "") });
break;
case PickDepartureEntityType:
entities.Add(new EntityRecommendation(type: nameof(FlightStatusForm.Departure)) { Entity = entity.Entity.Replace(" ", "") });
break;
case PickArrivalEntityType:
entities.Add(new EntityRecommendation(type: nameof(FlightStatusForm.Arrival)) { Entity = entity.Entity.Replace(" ", "") });
break;
case PickFlightEntityType:
entities.Add(new EntityRecommendation(type: nameof(FlightStatusForm.Flight)) { Entity = entity.Entity.Replace(" ", "") });
searchOption = SearchOptions.ByFlight;
break;
default:
break;
}
}
if (entities.Count > 0)
{
entities.Add(new EntityRecommendation(type: nameof(FlightStatusForm.SearchOption)) { Entity = searchOption.ToString() });
}
var flightStatusForm = new FormDialog<FlightStatusForm>(new FlightStatusForm(), FlightStatusForm.BuildLocalizedForm, FormOptions.PromptInStart, entities);
context.Call(flightStatusForm, FlightStatusComplete);
}
private async Task FlightStatusComplete(IDialogContext context, IAwaitable<FlightStatusForm> result)
{
var searchQuery = await result;
....
}
}
Steps to Reproduce the Issue
- Connect the emulator
- Write Flight Status Question. (ex. Did you arrive from Incheon to Bangkok on July 19?)
- Receive LuisResult and Call FlightStatusForm
- FormCanceledException error occurred
Expected Behavior
FormFlow on LuisDialog
Actual Results

Is there any planned date to resolve this issue?
This bug has been fixed. Please refer to the attached code.
