1
0
mirror of synced 2024-11-24 11:43:12 +01:00

Check for ConvergeMethodName while loading flows is incorrect

This commit is contained in:
Mark van Renswoude 2021-10-26 20:33:25 +02:00
parent aa9e13f914
commit 2dc30596ef

View File

@ -86,6 +86,7 @@ namespace Tapeti.Flow.Default
{ {
// We could check all the things that are required for a continuation or converge method, but this should suffice // We could check all the things that are required for a continuation or converge method, but this should suffice
// for the common scenario where you change code without realizing that it's signature has been persisted // for the common scenario where you change code without realizing that it's signature has been persisted
// ReSharper disable once InvertIf
if (validatedMethods.Add(metadata.MethodName)) if (validatedMethods.Add(metadata.MethodName))
{ {
var methodInfo = MethodSerializer.Deserialize(metadata.MethodName); var methodInfo = MethodSerializer.Deserialize(metadata.MethodName);
@ -97,6 +98,7 @@ namespace Tapeti.Flow.Default
throw new InvalidDataException($"Flow ID {flowId} references continuation method '{metadata.MethodName}' which no longer has a binding as a message handler (continuation Id = {continuationId})"); throw new InvalidDataException($"Flow ID {flowId} references continuation method '{metadata.MethodName}' which no longer has a binding as a message handler (continuation Id = {continuationId})");
} }
/* Disabled for now - the ConvergeMethodName does not include the assembly so we can't easily check it
if (string.IsNullOrEmpty(metadata.ConvergeMethodName) || !validatedMethods.Add(metadata.ConvergeMethodName)) if (string.IsNullOrEmpty(metadata.ConvergeMethodName) || !validatedMethods.Add(metadata.ConvergeMethodName))
return; return;
@ -105,6 +107,7 @@ namespace Tapeti.Flow.Default
throw new InvalidDataException($"Flow ID {flowId} references converge method '{metadata.ConvergeMethodName}' which no longer exists (continuation Id = {continuationId})"); throw new InvalidDataException($"Flow ID {flowId} references converge method '{metadata.ConvergeMethodName}' which no longer exists (continuation Id = {continuationId})");
// Converge methods are not message handlers themselves // Converge methods are not message handlers themselves
*/
} }