Skip to content

Commit

Permalink
CB-28 Fix GraphTraversalService.TraverseAsync() Logic
Browse files Browse the repository at this point in the history
  • Loading branch information
izzat5233 committed Jan 6, 2025
1 parent 22fe314 commit fa607bc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ChatbotBuilderApi.Domain/Graphs/GraphTraversalService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@ public async Task<NodeId> TraverseAsync(NodeId interactionNodeId)
throw new DomainException(GraphDomainErrors.Graph.InteractionNodeNotFound);
}

var currentNodeId = GetSuccessor(interactionNodeId);
var currentNodeId = interactionNodeId;
var currentNode = interactionNode;
do
{
await ActivateNodeAsync(interactionNode);
await ActivateNodeAsync(currentNode);
currentNodeId = GetSuccessor(currentNodeId);
} while (Graph.NodesMap[currentNodeId] is not InteractionNode);
currentNode = Graph.NodesMap[currentNodeId];
} while (currentNode is not InteractionNode);

return currentNodeId;
}
Expand Down

0 comments on commit fa607bc

Please sign in to comment.