elsa-workflows / elsa-workflows/elsa-core
Failed to run workflow - Collection was modified; enumeration operation may not execute.
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
Rare one:
No repo steps other than a workflow instance trying to start as the website warmups
```
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.Dictionary`2.ValueCollection.Enumerator.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Elsa.Persistence.InMemory.InMemoryStore`1.FindManyAsync(ISpecification`1 specification, IOrderBy`1 orderBy, IPaging paging, CancellationToken cancellationToken)
at Open.Linq.AsyncExtensions.Extensions.ToList[TSource](Task`1 source)
at Elsa.Persistence.InMemory.InMemoryStore`1.DeleteManyAsync(ISpecification`1 specification, CancellationToken cancellationToken)
at Elsa.Services.Bookmarks.BookmarkIndexer.IndexBookmarksAsync(IEnumerable`1 workflowInstances, CancellationToken cancellationToken)
at Elsa.Services.Bookmarks.BookmarkIndexer.IndexBookmarksAsync(WorkflowInstance workflowInstance, CancellationToken cancellationToken)
at Elsa.Handlers.UpdateBookmarks.Handle(WorkflowInstanceSaved notification, CancellationToken cancellationToken)
at MediatR.Mediator.PublishCore(IEnumerable`1 allHandlers, INotification notification, CancellationToken cancellationToken)
at Elsa.Persistence.Decorators.EventPublishingWorkflowInstanceStore.SaveAsync(WorkflowInstance entity, CancellationToken cancellationToken)
at Elsa.Handlers.PersistWorkflow.SaveWorkflowAsync(WorkflowInstance workflowInstance, CancellationToken cancellationToken)
at Elsa.Handlers.PersistWorkflow.Handle(WorkflowExecutionPassCompleted notification, CancellationToken cancellationToken)
at MediatR.Mediator.PublishCore(IEnumerable`1 allHandlers, INotification notification, CancellationToken cancellationToken)
at Elsa.Services.Workflows.WorkflowRunner.RunCoreAsync(WorkflowExecutionContext workflowExecutionContext, ActivityOperation activityOperation, CancellationToken cancellationToken)
at Elsa.Services.Workflows.WorkflowRunner.RunAsync(WorkflowExecutionContext workflowExecutionContext, ActivityOperation activityOperation, CancellationToken cancellationToken)
```
Contributor guide
Assessment
This issue has not been assessed yet.