elsa-core/src/modules/Elsa.Workflows.Runtime/Contracts
Sipke Schoorstra c549f49dfb
Fix race condition when sending same stimuli (#6895)
* Introduce `WorkflowResumer` service and deprecate `BookmarkResumer`.

- Adds `IWorkflowResumer` and its implementation for workflow resumption.
- Marks `BookmarkResumer` and related interfaces as obsolete.
- Refactors dependent services to use `WorkflowResumer`.
- Enhances `ResumeBookmarkRequest` to include `ActivityInstanceId`.
- Updates logging and queue handling logic to align with the new resumption approach.

* Update lock key prefix in `WorkflowResumer` for consistency with service naming.

* Add exception handling for distributed lock acquisition in `WorkflowResumer`

- Wrap distributed lock logic with `try-catch` to handle `TimeoutException`.
- Improve error message when lock acquisition fails due to timeout.
- Preserve existing workflow resumption behavior and logging.

* Update src/modules/Elsa.Workflows.Runtime/Filters/BookmarkFilter.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Optimize `BookmarkFilter` hashing logic for improved performance and readability.

* Merge remote-tracking branch 'origin/enh/locked-bookmark-resumption-2' into enh/locked-bookmark-resumption-2

* Remove unused variable and redundant line breaks for cleaner code.

* Clean up logging configuration by removing unused debug log levels.

* Update src/modules/Elsa.Workflows.Runtime/Services/WorkflowResumer.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Handle collections in `BookmarkFilter` hashing to ensure determinism and improve compatibility.

* Refactor `BookmarkFilter` hashing logic for clarity and consistency.

* Improve `TimeoutException` handling with a more descriptive message in `WorkflowResumer`.

* Update src/modules/Elsa.Workflows.Runtime/Filters/BookmarkFilter.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Simplify `BookmarkFilter` by utilizing `using` directives and refining type references.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-11 22:30:25 +02:00
..
IActivityExecutionManager.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IActivityExecutionStatsService.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IActivityExecutionStore.cs Merge remote-tracking branch 'origin/patch/3.2.x' 2024-07-24 22:33:36 +02:00
IActivityExecutonMapper.cs Introduce activity execution record capturing and serialization improvements (#6800) 2025-07-16 18:05:32 +02:00
IBackgroundActivityInvoker.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IBackgroundActivityScheduler.cs Introduce job unscheduling functionality 2024-12-05 19:25:16 +01:00
IBookmarkBoundWorkflowService.cs Fix race condition when sending same stimuli (#6895) 2025-09-11 22:30:25 +02:00
IBookmarkManager.cs Fix all broken summary xml docs (#6123) 2024-11-18 13:41:27 +01:00
IBookmarkPersister.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IBookmarkQueue.cs Add Bookmark Queue and Restore Background Activity Execution (#5758) 2024-07-15 22:37:14 +02:00
IBookmarkQueueProcessor.cs Add Bookmark Queue and Restore Background Activity Execution (#5758) 2024-07-15 22:37:14 +02:00
IBookmarkQueuePurger.cs Add bookmark queue purger functionality (#6080) 2024-10-31 09:09:05 +01:00
IBookmarkQueueSignaler.cs Fix race condition and add rate limiting to bookmark queue processing (#6187) 2024-12-07 17:34:10 +01:00
IBookmarkQueueStore.cs Fix all broken summary xml docs (#6123) 2024-11-18 13:41:27 +01:00
IBookmarkQueueWorker.cs Add Bookmark Queue and Restore Background Activity Execution (#5758) 2024-07-15 22:37:14 +02:00
IBookmarkResumer.cs Fix race condition when sending same stimuli (#6895) 2025-09-11 22:30:25 +02:00
IBookmarksPersistedHandler.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IBookmarkStore.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IBookmarkUpdater.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IEventPublisher.cs Fix race condition in Distributed Workflow Runtime during same-workflow event publishing (#6538) 2025-03-31 18:11:27 +02:00
ILogRecordExtractor.cs Fix all broken summary xml docs (#6123) 2024-11-18 13:41:27 +01:00
ILogRecordSink.cs Fix all broken summary xml docs (#6123) 2024-11-18 13:41:27 +01:00
ILogRecordStore.cs Add AddManyAsync method to activity execution stores 2025-02-17 11:32:34 +01:00
IRegistriesPopulator.cs Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
IStimulusDispatcher.cs Fix race condition in Distributed Workflow Runtime during same-workflow event publishing (#6538) 2025-03-31 18:11:27 +02:00
IStimulusSender.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
ITaskDispatcher.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
ITaskReporter.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
ITriggerBoundWorkflowService.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
ITriggerIndexer.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
ITriggerInvoker.cs Add Elsa.Kafka Module for Kafka Integration with Message Sending and Receiving Activities (#6108) 2024-11-18 13:42:54 +01:00
ITriggerStore.cs Add support for ordered and paginated trigger retrieval 2025-05-26 21:15:54 +02:00
IWorkflowActivationStrategyEvaluator.cs Add workflow activation and startup services. (#6076) 2024-10-30 22:51:14 +01:00
IWorkflowCanceler.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IWorkflowCancellationDispatcher.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IWorkflowCancellationService.cs Add workflow cancellation notifications (#6075) 2024-10-30 19:46:36 +01:00
IWorkflowClient.cs Incremental work on restoring previous workflow runtime API surface for backward compatibility 2025-01-28 00:11:25 +01:00
IWorkflowDefinitionRefresher.cs Fix all broken summary xml docs (#6123) 2024-11-18 13:41:27 +01:00
IWorkflowDefinitionsReloader.cs Fix all broken summary xml docs (#6123) 2024-11-18 13:41:27 +01:00
IWorkflowDefinitionStorePopulator.cs Remove IWorkflowExecutionContextStore and related classes 2024-07-18 18:57:42 +02:00
IWorkflowDispatcher.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IWorkflowExecutionLogStore.cs Merge remote-tracking branch 'origin/patch/3.2.x' 2024-07-24 22:33:36 +02:00
IWorkflowHost.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IWorkflowHostFactory.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IWorkflowInbox.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IWorkflowInvoker.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IWorkflowMatcher.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IWorkflowRegister.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
IWorkflowRestarter.cs Add workflow restart functionality for handling interruptions 2025-02-22 15:10:52 +01:00
IWorkflowResumer.cs Fix race condition when sending same stimuli (#6895) 2025-09-11 22:30:25 +02:00
IWorkflowRuntime.cs Incremental work on restoring previous workflow runtime API surface for backward compatibility 2025-01-28 00:11:25 +01:00
IWorkflowsProvider.cs Multitenancy (#5159) 2024-06-10 21:30:53 +02:00
IWorkflowStarter.cs Add workflow restart functionality for handling interruptions 2025-02-22 15:10:52 +01:00