Merge remote-tracking branch 'origin/patch/3.4.2' into develop/3.5.0

# Conflicts:
#	.github/workflows/packages.yml
#	src/modules/Elsa.MongoDb/Features/MongoDbFeature.cs
This commit is contained in:
Sipke Schoorstra 2025-07-04 10:03:35 +02:00
commit 876c76e443
No known key found for this signature in database
GPG key ID: 5C10502B28A4268F

View file

@ -1,3 +1,4 @@
using Elsa.Extensions;
using Elsa.Workflows.Management.Entities;
using Elsa.Workflows.State;
@ -8,6 +9,12 @@ namespace Elsa.Workflows.Management.Mappers;
/// </summary>
public class WorkflowStateMapper
{
/// <summary>
/// [Obsolete] The property key name used to store the workflow instance name.
/// </summary>
[Obsolete("This constant is obsolete and retained only for backward compatibility. Avoid using it in new code.")]
private const string WorkflowInstanceNameKey = "WorkflowInstanceName";
/// <summary>
/// Maps a workflow state to a workflow instance.
/// </summary>
@ -43,6 +50,10 @@ public class WorkflowStateMapper
target.UpdatedAt = source.UpdatedAt;
target.FinishedAt = source.FinishedAt;
target.WorkflowState = source;
// Keep for backward compatibility with workflow instances created before the introduction of the Name property.
if (source.Properties.TryGetValue<string>(WorkflowInstanceNameKey, out var name))
target.Name = name;
}
/// <summary>