From de8c692f48fcb1822d29b5bd6fc06532e738583f Mon Sep 17 00:00:00 2001
From: sagargolu <79979623+sagargolu@users.noreply.github.com>
Date: Tue, 20 May 2025 23:12:34 +0530
Subject: [PATCH] fix: code fixed to allow loading all the descriptors in the
UI (#6648)
---
.../Elsa.Workflows.Core/Services/ActivityRegistry.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/modules/Elsa.Workflows.Core/Services/ActivityRegistry.cs b/src/modules/Elsa.Workflows.Core/Services/ActivityRegistry.cs
index b0bceac32..282d07be3 100644
--- a/src/modules/Elsa.Workflows.Core/Services/ActivityRegistry.cs
+++ b/src/modules/Elsa.Workflows.Core/Services/ActivityRegistry.cs
@@ -24,7 +24,7 @@ public class ActivityRegistry(IActivityDescriber activityDescriber, IEnumerable<
}
///
- public IEnumerable ListAll() => _activityDescriptors.Values.DistinctBy(x => x.TypeName);
+ public IEnumerable ListAll() => _activityDescriptors.Values;
///
public IEnumerable ListByProvider(Type providerType) => _providedActivityDescriptors.TryGetValue(providerType, out var descriptors) ? descriptors : ArraySegment.Empty;
@@ -123,13 +123,13 @@ public class ActivityRegistry(IActivityDescriber activityDescriber, IEnumerable<
foreach (var modifier in modifiers)
modifier.Modify(descriptor);
- // If the descriptor already exists, replace it. But log a warning.
+ // If the descriptor already exists, replace it. But log a warning.
if (activityDescriptors.TryGetValue((descriptor.TypeName, descriptor.Version), out var existingDescriptor))
{
- // Remove the existing descriptor from the providerDescriptors collection.
+ // Remove the existing descriptor from the providerDescriptors collection.
providerDescriptors.Remove(existingDescriptor);
- // Log a warning.
+ // Log a warning.
logger.LogWarning("Activity descriptor {ActivityType} v{ActivityVersion} was already registered. Replacing with new descriptor", descriptor.TypeName, descriptor.Version);
}