Improve activity execution mapper's persistence logic

Update the logic in DefaultActivityExecutionMapper to handle 'Inherit' persistence mode correctly. Instead of returning 'Inherit' directly, now it will default to the mode specified by defaultMode(). This change ensures consistent handling of persistence strategies.
This commit is contained in:
Sipke Schoorstra 2024-11-28 19:41:01 +01:00
parent 341eeb471f
commit fba1a19be1

View file

@ -200,7 +200,8 @@ public class DefaultActivityExecutionMapper : IActivityExecutionMapper
return defaultMode();
var strategyContext = new LogPersistenceStrategyContext(cancellationToken);
return await strategy.GetPersistenceModeAsync(strategyContext);
var logMode = await strategy.GetPersistenceModeAsync(strategyContext);
return logMode == LogPersistenceMode.Inherit ? defaultMode() : logMode;
}
if (config.Expression == null)