Fixed bug where multiple activity registrations of the same type would cause duplicate key exception (#128)
* Fixed issue in ActivityResolver where multiple registrations of the same workflow type would cause dup key exception * Updated Sample12 to remove AddUserTaskActivities() call, as this is now done in AddElsa()
This commit is contained in:
parent
6e352ebed3
commit
7d4d0f919e
|
|
@ -18,7 +18,7 @@ namespace Elsa.Services
|
|||
() =>
|
||||
{
|
||||
var activities = activitiesFunc();
|
||||
return activities.Select(x => x.GetType()).ToDictionary(x => x.Name);
|
||||
return activities.Select(x => x.GetType()).Distinct().ToDictionary(x => x.Name);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Elsa.Activities.Console.Extensions;
|
||||
|
|
@ -48,7 +48,6 @@ namespace Sample12
|
|||
return new ServiceCollection()
|
||||
.AddElsa()
|
||||
.AddConsoleActivities()
|
||||
.AddUserTaskActivities()
|
||||
.AddWorkflow<UserTaskWorkflow>()
|
||||
.BuildServiceProvider();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue