elsa-core/src/modules
Sipke Schoorstra b577279321
Improves tenant task management with dependencies (#7174)
* Consolidate tenant task lifecycle logic into `TenantTaskManager` and remove obsolete task event handlers (`RunStartupTasks`, `RunBackgroundTasks`, `StartRecurringTasks`). Introduce `TopologicalTaskSorter` for dependency-based task execution.

* Handles multiple tasks of the same type

Updates the topological task sorter to handle multiple tasks of the same type.

Previously, the sorter assumed a one-to-one mapping between task types and task instances, which caused issues when multiple tasks of the same type were present.
Now, it groups tasks by type and adds them to the result in the correct order.

* Add unit tests for `TopologicalTaskSorter`

Introduce `Elsa.Common.UnitTests` project with comprehensive test coverage for `TopologicalTaskSorter`, including dependency resolution, circular dependency handling, and task ordering scenarios. Update `Elsa.sln` to include the new test project.

* Update src/modules/Elsa.Common/Multitenancy/EventHandlers/TenantTaskManager.cs

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

* Unwrap background task continuation in `TenantTaskManager` to ensure proper task execution tracking.

* Update src/modules/Elsa.Common/Helpers/TopologicalTaskSorter.cs

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

* Refactor `TryGet` method to prioritize memory register lookup and update `Output` constructor to use `MemoryBlockReference`.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-29 20:49:24 +01:00
..
Elsa
Elsa.Alterations Addresses warnings and enforces null safety (#7050) 2025-11-12 15:53:23 +01:00
Elsa.Alterations.Core Addresses warnings and enforces null safety (#7050) 2025-11-12 15:53:23 +01:00
Elsa.Caching
Elsa.Common Improves tenant task management with dependencies (#7174) 2025-12-29 20:49:24 +01:00
Elsa.Dsl.ElsaScript Add Elsa Script DSL (#7076) 2025-11-25 19:57:50 +01:00
Elsa.Expressions Improves workflow deletion and task scheduling (#7088) 2025-11-21 20:58:38 +01:00
Elsa.Expressions.CSharp Allow C# Script to use dot notation with ExpandoObject (JSON variables) (#6689) 2025-05-25 12:26:59 +02:00
Elsa.Expressions.JavaScript Upgrade projects to target .NET 10, add conditional System.Linq.Async dependencies for compatibility with earlier frameworks, and update project files for consistency across the solution. (#7062) 2025-11-21 20:55:30 +01:00
Elsa.Expressions.JavaScript.Libraries Rename Scripts to Expressions. 2025-05-20 12:52:19 +01:00
Elsa.Expressions.Liquid Addresses warnings and enforces null safety (#7051) 2025-11-12 16:56:31 +01:00
Elsa.Expressions.Python Apply changes that will not be resolved by merge conflict resolution. 2025-05-22 00:17:15 +01:00
Elsa.Hosting.Management
Elsa.Http Adds activity host registration support (#7172) 2025-12-27 20:52:52 +01:00
Elsa.Identity Addresses warnings and enforces null safety (#7050) 2025-11-12 15:53:23 +01:00
Elsa.KeyValues
Elsa.Labels Restore EF Core persistence layer (#6931) 2025-09-27 20:39:18 +02:00
Elsa.Persistence.EFCore Fix Race Condition Causing Duplicate Trigger Registration in Multi-Engine Environments + Add Concurrency Tests to Prevent Regression (#7131) 2025-12-05 09:17:14 +01:00
Elsa.Persistence.EFCore.Common Fix Race Condition Causing Duplicate Trigger Registration in Multi-Engine Environments + Add Concurrency Tests to Prevent Regression (#7131) 2025-12-05 09:17:14 +01:00
Elsa.Persistence.EFCore.MySql Added logic to search for workflow-as-activities based on DefinitionId (not only versionId) (#7149) 2025-12-17 23:23:49 +01:00
Elsa.Persistence.EFCore.Oracle Remove unused target frameworks from EF Core persistence project files 2025-12-13 21:32:47 +01:00
Elsa.Persistence.EFCore.PostgreSql Remove unused target frameworks from EF Core persistence project files 2025-12-13 21:32:47 +01:00
Elsa.Persistence.EFCore.Sqlite Remove unused target frameworks from EF Core persistence project files 2025-12-13 21:32:47 +01:00
Elsa.Persistence.EFCore.SqlServer Remove unused target frameworks from EF Core persistence project files 2025-12-13 21:32:47 +01:00
Elsa.Resilience Enhances distributed lock handling with resilience (#7161) 2025-12-29 19:53:48 +01:00
Elsa.Resilience.Core Enhances distributed lock handling with resilience (#7161) 2025-12-29 19:53:48 +01:00
Elsa.SasTokens Add back SasToken project. 2025-05-23 01:09:59 +01:00
Elsa.Scheduling Merge remote-tracking branch 'origin/develop/3.6.0' 2025-11-27 21:41:59 +01:00
Elsa.Tenants Improves tenant task management with dependencies (#7174) 2025-12-29 20:49:24 +01:00
Elsa.Tenants.AspNetCore Update all dependencies to new projects. 2025-05-21 00:20:13 +01:00
Elsa.WorkflowProviders.BlobStorage Added logic to search for workflow-as-activities based on DefinitionId (not only versionId) (#7149) 2025-12-17 23:23:49 +01:00
Elsa.WorkflowProviders.BlobStorage.ElsaScript Add Elsa Script DSL (#7076) 2025-11-25 19:57:50 +01:00
Elsa.Workflows.Api Adds ILoggerFactory support to converters (#7153) 2025-12-19 21:54:20 +01:00
Elsa.Workflows.Core Improves tenant task management with dependencies (#7174) 2025-12-29 20:49:24 +01:00
Elsa.Workflows.Management Adds activity host registration support (#7172) 2025-12-27 20:52:52 +01:00
Elsa.Workflows.Runtime Merge remote-tracking branch 'origin/main' into release/3.6.0 2025-12-29 19:57:50 +01:00
Elsa.Workflows.Runtime.Distributed Enhances distributed lock handling with resilience (#7161) 2025-12-29 19:53:48 +01:00