From ab03b38e6c0bad0fc726bf36b3c253a249ebd0b1 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Wed, 19 Dec 2018 15:53:56 +0100 Subject: [PATCH] Fix for exception "Neither Store nor Delete are called for the state of the current flow" with parallel requests --- Tapeti.Flow/Default/FlowMessageMiddleware.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tapeti.Flow/Default/FlowMessageMiddleware.cs b/Tapeti.Flow/Default/FlowMessageMiddleware.cs index 394ae0b..0dbd1c7 100644 --- a/Tapeti.Flow/Default/FlowMessageMiddleware.cs +++ b/Tapeti.Flow/Default/FlowMessageMiddleware.cs @@ -25,6 +25,9 @@ namespace Tapeti.Flow.Default await CallConvergeMethod(context, flowContext.ContinuationMetadata.ConvergeMethodName, flowContext.ContinuationMetadata.ConvergeMethodSync); + else if (flowContext.FlowState.Continuations.Count > 0) + // This is a parallel flow waiting for other continuations, always store the state + await flowContext.Store(); } else await next();