Commit graph

6864 commits

Author SHA1 Message Date
Heku 0d308cee6e
Code cleanup and typo fix (#7393)
* Drop IsExternalInit.cs

* Fixed a wrong cref namespace in comment

* Mark IWorkflowHost obsoleted too

* Remove Source Link package reference

Starting with .NET 8, Source Link for GitHub is included in the .NET SDK and enabled by default.

https://github.com/dotnet/sourcelink?tab=readme-ov-file#using-source-link-in-net-projects
2026-04-14 15:17:26 +02:00
Sipke Schoorstra 6e870d9861
Enhance CONTRIBUTING.md with feature request guidelines
Added a section on feature requests and prioritization criteria to guide contributors.
2026-04-14 11:37:12 +02:00
Avinesh Singh 60767c4724
Isolate background workflow dispatches from caller's cancellation token (#7291)
* Isolate background workflow dispatches from caller's cancellation token

When dispatching multiple child workflows, early child completions cancel the parent activity's token while dispatches are still in progress. This creates a race condition where remaining dispatches fail with OperationCanceledException.

* Make BackgroundWorkflowDispatcher & BackgroundStimulusDispatcher caller Cts-independent
2026-04-14 10:55:38 +02:00
Sipke Schoorstra 1d3c00a01f
Update print statement to say 'Goodbye World' 2026-03-14 10:47:01 +01:00
Copilot 794a35dd76
refactor: extract shared shell reload response models and address review feedback (#7355)
* feat: add specification and quality checklist for Shell Reload API endpoints

* feat: implement Shell Reload API endpoints and associated documentation

* feat: enhance Shell Reload API documentation and add tasks for implementation phases

* feat: implement Shell Reload API features with endpoints, interface contracts, models, and component tests

* feat: update Shell Reload API responses and tests to reflect changes in error handling and response structure

* Fix shell reload follow-up review issues (#7354)

* Initial plan

* Address shell reload review feedback

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Dispose shell reload semaphore

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Harden shell reload follow-up fixes

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Update src/modules/Elsa.Workflows.Api/Endpoints/Shells/Reload/Endpoint.cs

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Potential fix for pull request finding 'Missed opportunity to use Where'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Update src/modules/Elsa.Workflows.Api/Endpoints/Shells/Reload/Endpoint.cs

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

* Initial plan

* Extract shared ShellsResponseModels.cs to eliminate Response/ShellResponse duplication and null! vs default! inconsistency

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Merge origin/main - resolve add/add conflicts in shell reload endpoints (fix missing trailing newline)

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-09 09:17:28 +01:00
Sipke Schoorstra 21e982c2c6
Add shell reload API endpoints and client support (#7353)
* feat: add specification and quality checklist for Shell Reload API endpoints

* feat: implement Shell Reload API endpoints and associated documentation

* feat: enhance Shell Reload API documentation and add tasks for implementation phases

* feat: implement Shell Reload API features with endpoints, interface contracts, models, and component tests

* feat: update Shell Reload API responses and tests to reflect changes in error handling and response structure

* Fix shell reload follow-up review issues (#7354)

* Initial plan

* Address shell reload review feedback

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Dispose shell reload semaphore

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Harden shell reload follow-up fixes

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Update src/modules/Elsa.Workflows.Api/Endpoints/Shells/Reload/Endpoint.cs

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Potential fix for pull request finding 'Missed opportunity to use Where'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Update src/modules/Elsa.Workflows.Api/Endpoints/Shells/Reload/Endpoint.cs

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

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-09 08:37:11 +01:00
Sipke Schoorstra ea8f326f9e
docs: ratify constitution v1.0.0 (7 principles from codebase analysis) 2026-03-08 15:49:20 +01:00
Sipke Schoorstra 58b5d77cb1
Merge remote-tracking branch 'origin/release/3.6.0' 2026-03-08 15:20:36 +01:00
Sipke Schoorstra fddfcfc064
Update Feedz badge in README.md 2026-03-07 11:48:45 +01:00
Sipke Schoorstra 06711378af
Merge remote-tracking branch 'origin/main' 2026-03-07 11:42:37 +01:00
Sipke Schoorstra 4859954256
Add waves video 2026-03-07 11:42:31 +01:00
Copilot 7d32d95932
Add release notes for Elsa 3.6.0 (#7348)
* Initial plan

* Add release notes for Elsa 3.6.0

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2026-03-05 13:57:21 +01:00
Copilot 9d1bf99950
doc: add Elsa 3.6.0 release notes as doc/changelogs/3.6.0.md (#7347)
* Initial plan

* doc: add 3.6.0 release notes to doc/changelogs/3.6.0.md

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
2026-03-05 13:41:40 +01:00
Sipke Schoorstra 2da800649b
Document output location for release notes
Added guidelines for saving release notes in the repository.
2026-03-05 13:22:40 +01:00
Sipke Schoorstra d4b69be44b
Refactor inbound connection handling to schedule outbound activity before canceling remaining activities (#7340)
* Refactor inbound connection handling to schedule outbound activity before canceling remaining activities

* Add regression test for WaitAny join schedule-before-cancel ordering (#7341)

* Initial plan

* Add integration test for WaitAny join with blocking branch (schedule-before-cancel regression test)

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
2026-03-02 19:53:10 +01:00
Copilot 71438596f3
Fix ActivityNodeId column truncation for deeply nested workflows (#7338)
* Initial plan

* Increase ActivityNodeId column max length from 450 to 1024 to fix truncation for deeply nested workflows

Add HasMaxLength(1024) for ActivityNodeId on ActivityExecutionRecord and
WorkflowExecutionLogRecord entities. Create V3_7 migrations for all 5
database providers (SqlServer, MySql, PostgreSql, Sqlite, Oracle).

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Use NVARCHAR(MAX) and equivalent unlimited column types for ActivityNodeId

Update V3_6 migrations to change ActivityNodeId from fixed-length columns
to unlimited types: nvarchar(max) for SQL Server, longtext for MySQL,
NCLOB for Oracle. PostgreSQL (text) and SQLite (TEXT) already used
unlimited types. Drop ActivityNodeId indexes on both ActivityExecutionRecords
and WorkflowExecutionLogRecords tables since unlimited columns cannot be
indexed. Remove HasIndex for ActivityNodeId from Configurations.cs.

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Add IF EXISTS guards to DropIndex calls in V3_6 migrations for all providers

Replace bare migrationBuilder.DropIndex() calls with provider-specific
conditional DDL to prevent errors when indexes have already been dropped:
- SQL Server: IF EXISTS (SELECT * FROM sys.indexes ...) pattern
- PostgreSQL: DROP INDEX IF EXISTS (native support)
- SQLite: DROP INDEX IF EXISTS (native support)
- MySQL: information_schema.statistics check with PREPARE/EXECUTE
- Oracle: PL/SQL BEGIN...EXCEPTION WHEN OTHERS (SQLCODE -1418)

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Add comment explaining Oracle error code -1418 in migration

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
2026-03-02 15:24:20 +01:00
Sipke Schoorstra f362d44d08
Remove CShells projects from solution file 2026-02-28 21:21:01 +01:00
Sipke Schoorstra ef953e6996
Merge branch 'release/3.6.0' 2026-02-28 21:18:22 +01:00
Sipke Schoorstra 11fec1c85d
Add shell middleware, call‑stack tracking, and workflow reference graph APIs (#7333)
* refactor(deps): use local CShells project refs

Replace CShells NuGet package references with direct project references to the local CShells source to enable developing and testing against local changes and simplify build integration across modules.

* Handle assembly load errors in feature discovery

Added error handling for assembly load failures in feature discovery to improve resilience. Also updated configuration for identity token options and removed unused service bus consumer dependencies. Simplified project structure by moving and cleaning up `Directory.Build.targets` files.

* Refactor configuration and service extension methods.

Moved `ShellSettingsExtensions` and `ShellConfiguration` to `CShells.Abstractions` for better modularity. Added new `ServiceCollectionFeatureExtensions` to improve options registration. Updated appsettings and references to support these changes.

* Introduce ManagementServiceCollectionExtensions to streamline activity and variable registration

Added `ManagementServiceCollectionExtensions` for registering Elsa activity types and variable descriptors, providing a modular and shell-feature-compatible approach to configuration. Updated relevant features to utilize these new extension methods, enhancing code modularity and reducing redundancy.

* Add resilience strategy registration to HTTP feature

Introduced `ResilienceServiceCollectionExtensions` to register resilience strategies within the `Elsa.Resilience.Core` module. Updated `HttpFeature` to incorporate resilience strategies, enhancing HTTP-related resilience configuration leveraging the new extension methods.

* Add new configuration options to JavaScriptFeature

Implemented multiple properties in `JavaScriptFeature` to enhance JavaScript execution: `AllowClrAccess`, `AllowConfigurationAccess`, `ScriptCacheTimeout`, `DisableWrappers`, and `DisableVariableCopying`. These additions enable more flexible and secure configuration of the Jint JavaScript engine.

* refactor(workflows): unify graph caching

Resolve workflow definitions first and store graphs under stable per-version-ID cache keys so different lookup paths share entries.
Centralize cache creation and change-token registration to remove duplicated caching logic.
Skip materializer-unavailable definitions to avoid caching null graphs and simplify flow.

* refactor(tests): centralize default IDs and materializer setup

Introduce constants for default definition and version IDs, and materializer name. Refactor tests to use these constants, streamline graph and definition resolution, and improve cache key creation by sharing logic across tests. Extend tests to check scenarios with unavailable materializers, ensuring caching only occurs for valid cases.

* extend(tests): enhance cache key verification in AutoUpdateTests

Added checks for both workflow definition and version cache keys in AutoUpdateTests to ensure comprehensive cache validation, improving test reliability and coverage.

* refactor(projects): update CShells project paths and solution configuration

Revised project reference paths in `Elsa.ModularServer.Web.csproj` for CShells projects and updated `Elsa.sln` to include new CShells projects, streamlining project organization and build configuration.

* Add `IWorkflowReferenceGraphBuilder` to `WorkflowManagementFeature`; rename `ResilienceShellFeature` to `ResilienceFeature`.

* Refactor `HttpFeature` to use `IMiddlewareShellFeature`, include `HttpWorkflowsMiddleware`, and update `HttpActivityOptions` defaults.

* Add `AddTypeAlias` and `AddVariableTypeAndAlias` extension methods to service collections

- Introduced `AddTypeAlias<T>` method in `ServiceCollectionExtensions.cs` for adding type aliases.
- Added `AddVariableTypeAndAlias<T>` method in `ManagementServiceCollectionExtensions.cs` to add variable types with aliases.

* Update CShells package versions to 0.0.11 and replace ProjectReferences with PackageReferences in project files
2026-02-28 21:16:04 +01:00
Sipke Schoorstra 6f53c26f24
Fix serialization logic in WorkflowTriggerEqualityComparer: avoid type discriminator injection. 2026-02-25 20:24:29 +01:00
Sipke Schoorstra 7e2829ddcd
Preserve metadata for unknown activities (#7323)
* Extract and copy metadata when activity type is not found in `ActivityJsonConverter`.

* Improve `ActivityJsonConverter`: Correct metadata extraction to read from NotFoundActivity wrapper.

* Reposition activity description and display text assignment to follow metadata extraction in `ActivityJsonConverter`.

* Update src/modules/Elsa.Workflows.Core/Serialization/Converters/ActivityJsonConverter.cs

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-25 20:03:04 +01:00
lukhipolito-nexxbiz 5816f6e3be
Fixing workflow reload logic (#7324)
* Made two changes:

1. TriggerScheduler was returning a null for a payload, which would cause NullReferenceException, and this would break the populator which prevented other workflow definitions from being imported/published correctly.

2. The reloader was only executing a part of the actual loading logic, meaning that workflow definitions used as activities were not correcly resolved to the expected versions

* Update src/modules/Elsa.Scheduling/Services/DefaultTriggerScheduler.cs

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: j03y-nxxbz <joey.barten@nexxbiz.io>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-25 19:14:08 +01:00
Sipke Schoorstra a7e064abb0
Add idempotency tests for trigger indexing and fix serialization mismatch in WorkflowTriggerEqualityComparer (#7320)
* Add idempotency tests for trigger indexing and fix serialization mismatch in WorkflowTriggerEqualityComparer

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Refactor `WorkflowTriggerEqualityComparerTests`: streamline trigger creation with helper methods and extract serializer options to static fields for clarity.

* Enhance `WorkflowTriggerEqualityComparer`: add converters for enum, TimeSpan, and polymorphic objects in serializer options.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-25 14:39:23 +01:00
Sipke Schoorstra a79d6a257e
Update Directory.Packages.props with FastEndpoints versions for .NET 8 and .NET 10 compatibility. 2026-02-24 20:51:09 +01:00
Sipke Schoorstra 56ad8990e4
Merge branch 'fix/trigger-indexing-idempotency' 2026-02-24 15:30:54 +01:00
Sipke Schoorstra c27bbd4ec2
Adds activity execution call stack support (#7271)
* Adds activity execution call stack support

Implements a call stack mechanism to track the execution chain, enabling visibility into the invocation hierarchy.

Introduces new fields to scheduling models and runtime contexts to store call stack information.

Includes EF Core migrations for various database providers to support new columns in `ActivityExecutionRecords`.

Provides an API to query and reconstruct the call stack for a given activity execution.

* Refactor: Replace `PagedCallStackResult` with `Page<T>` for execution chain pagination

* Remove ambient scheduling scope logic and related methods

Simplifies scheduling logic by removing ambient scope mechanisms, refactoring scheduling context handling, and updating affected classes accordingly.

* Add `GetCallStackAsync` to `IActivityExecutionsApi` for querying activity execution call stack

* Add new properties to `ActivityExecutionRecord` for scheduling and execution tracking

Introduce fields for aggregated fault count, scheduling context, workflow instance details, and call stack depth to enhance execution monitoring and debugging capabilities.

* Add call stack visualization for activity executions

Introduced components and models to display a call stack for activity executions in the Workflow Instance Viewer. This includes UI elements for call stack rendering, error handling, and data integration with activity execution records.

* Remove obsolete ambient scheduling properties from WorkflowExecutionContext

* Fix infinite loop issues in activity execution chain traversal

Added cycle detection using a `HashSet` to prevent infinite loops when traversing activity execution chains in multiple storage implementations. Updated unit tests to validate correct handling of circular references and chain traversal.

* Refactor activity execution chain retrieval logic

Centralized the `GetExecutionChainAsync` method into an extension class to streamline and unify its implementation across stores. Removed redundant implementations from individual stores and updated interfaces to utilize the new extension method. This reduces code duplication and simplifies future maintenance.

* Add CallStackDepth property to activity contexts

Integrated the `CallStackDepth` property into `ActivityExecutionContext`, `ActivityExecutionContextState`, and related classes to track and manage the call stack depth of activity executions. Removed obsolete depth calculation logic to streamline the process.

* Add unit tests for call stack depth calculations and persistence

- Add `WorkflowExecutionContextTests` to verify correct calculation of call stack depth during activity execution.
- Add `WorkflowStateExtractorTests` to ensure call stack depth is preserved during state extraction and application.

* Update src/modules/Elsa.Workflows.Api/Endpoints/ActivityExecutions/GetCallStack/Endpoint.cs

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

* Update src/modules/Elsa.Workflows.Api/Endpoints/ActivityExecutions/GetCallStack/Endpoint.cs

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

* Enhance activity execution handling with ID filter and task completion logic

- Implement `ActivityExecutionRecordFilter` for precise query matching by ID.
- Add await logic for task completion in command handler middleware.

* Add missing indexes for call stack columns in V3_7 migrations (#7250)

* Initial plan

* Add missing indexes for call stack columns in all provider migrations

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Optimize migrations by creating columns with correct indexable types

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Add unit tests for ActivityExecutionStoreExtensions

- Introduce tests for `GetExecutionChainAsync` covering scenarios of empty results, single records, multi-level chain traversal, workflow boundary constraints, pagination, and circular references.

* Refactor tests for `ActivityExecutionStoreExtensions`

- Replace mock setup with `CreateStore` helper for clean and clear test arrangements.
- Remove unused imports and clean up test setup for improved readability and maintenance.

* Remove unused imports from ActivityExecutionLogStore in Elsa.Persistence.EFCore module.

* Removes obsolete planning document

Removes the activity execution call stack planning document
as the feature has been implemented.

* Remove DefaultActivityExecutionMapperTests

- Deleted `DefaultActivityExecutionMapperTests.cs` as the test class is no longer in use and redundant.

* Address review feedback: Fix corrupted test, Oracle migrations, and call stack depth calculation (#7272)

* Initial plan

* Fix corrupted DefaultActivityExecutionMapperTests.cs test file

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Fix Oracle migration snapshot to use NCLOB for large text fields

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Optimize GetExecutionChainAsync to avoid loading all workflow instance records

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Fix CallStackDepth calculation to support cross-workflow invocations

- Add SchedulingCallStackDepth to ActivityInvocationOptions
- Update WorkflowExecutionContext to use provided depth when scheduling context not found
- Remove problematic test that reveals pre-existing bug with duplicate contexts

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Improve documentation for CallStackDepth calculation

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Add WorkflowStateExtractor to ActivityTestFixture services

* Refactor `DefaultActivityExecutionMapperTests` with `ActivityTestFixture` and add project reference for shared testing utilities.

* Propagate SchedulingCallStackDepth through cross-workflow invocation chain (#7273)

* Initial plan

* Add SchedulingCallStackDepth propagation through cross-workflow invocation chain

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Add unit tests for CallStackDepth propagation across workflow boundaries

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Initial plan (#7274)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* Reduce NVARCHAR2 column sizes in Oracle migrations to optimize storage and improve performance.

* Change column types to NCLOB for large text fields in Oracle migrations to enhance data storage capacity.

* Update GitHub Actions to use .NET 10.x and refactor setup classes for consistency

* Improve test project detection in GitHub Actions by handling non-csproj files and updating project sorting mechanism.

* Enhance GitHub Actions to display .NET environment info and enforce .NET 10 toolchain for test execution.

* Update GitHub Actions to use .NET SDK 10.0.1xx and enforce its usage for builds and tests.

* Refine GitHub Actions workflow by narrowing test project search to the `test/unit` directory and removing unnecessary script checks.

* Remove redundant build step from GitHub Actions workflow.

* Enhance GitHub Actions workflow by adding multiple test directories and handling ignored failed sources in .NET restore.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
2026-02-24 15:23:59 +01:00
Sipke Schoorstra 401611fc4f
Enhance WorkflowTriggerEqualityComparer: add converters for enum, TimeSpan, and polymorphic objects in serializer options. 2026-02-24 15:19:26 +01:00
Sipke Schoorstra 45614f8ca1
Refactor WorkflowTriggerEqualityComparerTests: streamline trigger creation with helper methods and extract serializer options to static fields for clarity. 2026-02-24 15:11:13 +01:00
Sipke Schoorstra 51d3f70b42
Add idempotency tests for trigger indexing and fix serialization mismatch in WorkflowTriggerEqualityComparer
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-24 15:05:58 +01:00
lukhipolito-nexxbiz 689f19f2f2
Distributed locks to prevent multiple pods executing Reload and Refresh (#7311)
* Distributed locks to prevent multiple pods executing Reload and Refresh

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

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

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

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

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

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Moving distributed lock decorators to proper folder

* Adding logging for missing lock

* Fixing logger use in distributed classes

* Update src/modules/Elsa.Workflows.Runtime/Distributed/WorkflowDefinitionsReloaderDistributedLocking.cs

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* Update src/modules/Elsa.Workflows.Runtime/Distributed/WorkflowDefinitionsRefresherDistributedLocking.cs

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* Update src/modules/Elsa.Workflows.Runtime/Distributed/WorkflowDefinitionsRefresherDistributedLocking.cs

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* Update src/modules/Elsa.Workflows.Runtime/Distributed/WorkflowDefinitionsReloaderDistributedLocking.cs

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* Update src/modules/Elsa.Workflows.Runtime/Distributed/WorkflowDefinitionsRefresherDistributedLocking.cs

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* Update src/modules/Elsa.Workflows.Runtime/Distributed/WorkflowDefinitionsReloaderDistributedLocking.cs

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* Moving and renaming for clearer purpose

* Fixing build after file moves

* Addressing workflow refresher empty query leaking distributed lock logic

* Add status to WorkflowRefresherResponse model for in progress operation

* Removing typo, fixing build

* Update src/modules/Elsa.Workflows.Runtime.Distributed/Services/DistributedWorkflowDefinitionsRefresher.cs

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* Refactor `RefreshWorkflowDefinitionsAsync` for lock acquisition logic simplification.

---------

Co-authored-by: lucas.hipolito <lukhipolito@yahoo.com.br>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2026-02-23 20:56:15 +01:00
Sipke Schoorstra 2250e25e5c
Handle null JsonElement in GetSectionAsJson to return null if section is missing. 2026-02-23 14:45:15 +01:00
Copilot 856f7b40b4
Fix cross-tenant cache collision in CachingWorkflowDefinitionService (#7318)
* Initial plan

* Fix cross-tenant cache collision in WorkflowDefinitionCacheManager

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
2026-02-23 14:11:02 +01:00
Sipke Schoorstra 25575e65af
Improve GetDownloadedFileNameOrDefault: Support parsing Content-Disposition header for filename extraction. 2026-02-21 20:15:48 +01:00
Sipke Schoorstra 2781de9e98
Ensure ContentHeaders null check before accessing headers in GetDownloadedFileNameOrDefault. 2026-02-21 16:34:55 +01:00
Sipke Schoorstra 4412f4fd09
Refactor ConcurrentTriggerIndexingTests: simplify concurrency logic and remove redundant methods. 2026-02-21 16:13:33 +01:00
Sipke Schoorstra 081e4ccac0
Track workflow execution in AppComponentTest to prevent premature disposal. 2026-02-21 15:57:46 +01:00
Sipke Schoorstra d5efd38dcc
Handle JsonException without rethrowing in HttpEndpoint.cs. 2026-02-21 15:57:39 +01:00
Sipke Schoorstra 87122082fd
Set fixed timestamp in ZIP exports to ensure deterministic outputs. 2026-02-21 15:28:51 +01:00
Sipke Schoorstra 0a2e99ad42
Expose consumers API and recursive export option (#7309)
* Initial plan

* Add consumers API endpoint and enhance export with IncludeConsumingWorkflows option

- New endpoint: GET /workflow-definitions/{definitionId}/consumers
- Export request model: added IncludeConsumingWorkflows boolean property
- Export endpoint: recursive consumer discovery and inclusion in exports

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Address greptile-apps feedback: fix double-fetch, remove redundant HashSet, add version comment, remove unused params

- Extract WriteZipResponseAsync helper to avoid double-fetching definitions from DB
- Remove redundant existingDefinitionIds HashSet in IncludeConsumersAsync
- Add XML doc comment documenting that consumers are resolved at VersionOptions.Latest
- Remove unused constructor parameters (workflowDefinitionService, variableDefinitionMapper)

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Address greptile-apps round 2: 404 for unknown definitions, deterministic ZIP response, parallel BFS

- Consumers endpoint now returns 404 when the definition ID doesn't exist
- Single-workflow export always returns ZIP when includeConsumingWorkflows=true
- BFS traversal processes each frontier level concurrently via Task.WhenAll

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Implement workflow reference graph feature

- Added `IWorkflowReferenceGraphBuilder` interface for building complete graphs of workflow references.
- Created `WorkflowReferenceGraph` and `WorkflowReferenceEdge` models.
- Implemented `WorkflowReferenceGraphBuilder` service for recursive graph building.
- Replaced previous workflow reference query logic with the new graph-based approach in consumers.

* Refactor workflow consumers to utilize recursive graph-based approach for retrieving consumer definitions.

* Enhance workflow export by adding support for including consuming workflows and update nullable default values across endpoints and models.

* Add WorkflowReferenceGraphOptions for depth and definition limit configuration

- Introduced `WorkflowReferenceGraphOptions` to configure max depth and definition limits for reference graph building.
- Updated `WorkflowManagementFeature` to support configuring these options.
- Enhanced `WorkflowReferenceGraphBuilder` to respect configuration limits during graph construction process.

* Refactor `WorkflowReferenceGraphBuilder` to utilize target-typed new expressions for cleaner code.

* Add Workflow Reference Graph tests and scenarios

Introduced JSON files for parent-child-grandchild workflow hierarchy tests and implemented unit tests for `WorkflowReferenceGraphBuilder`. Also added component tests for workflow export and consumers endpoint validation. Updated project configuration for workflow JSON to always copy to output directory.

* Include DefinitionId in exported workflow definition filenames for uniqueness.

* Remove unused models and constants from `WorkflowReferenceGraphTests`.

* Refactor `WorkflowReferenceGraphBuilderTests`: streamline test setup with `SetupGraph`, replace repeated assertions with helper methods.

* Deterministic ZIP export and 404 test coverage for consumers endpoint (#7312)

* Initial plan

* Fix deterministic ZIP export and add 404 test for consumers endpoint

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
2026-02-20 17:40:47 +01:00
Sipke Schoorstra 3722c18114
Convert CShells project references to package references in Workflows and Identity modules. 2026-02-19 22:10:02 +01:00
Sipke Schoorstra c51164f698
Switch CShells project references to package references and update to version 0.0.9. 2026-02-19 21:53:57 +01:00
Sipke Schoorstra fc870a6de9
Add files via upload 2026-02-18 18:58:54 +01:00
Sipke Schoorstra df8fe2b33b
Enhance contributing guidelines for clarity and process
Expanded contributing guidelines to emphasize clarity, discipline, and maintainability. Added sections on pull requests, bug reporting, and development workflow.
2026-02-18 18:51:42 +01:00
Sipke Schoorstra 4bead76115
Update WorkflowTestFixture to use tenant activation and bump package dependencies
- Integrated tenant activation in `WorkflowTestFixture` to improve multitenancy support.
- Updated various package dependencies to latest versions for compatibility and performance improvements.
2026-02-16 21:36:02 +01:00
Sipke Schoorstra af1f1b9ec0
Add integration tests for enumerables with projection to arrays (#7290)
* Add integration tests for enumerables with projection to arrays

Introduce integration tests to verify the conversion of a Select-projected IEnumerable to an array using JavaScript execution. This includes creating new test cases, activities, and workflows to ensure the end-to-end process behaves as expected. Also refined type inference in `ExpressionExecutionContextExtensions` for projection operators.

* Remove unused newline in EnumerableProjectionTests
2026-02-16 14:09:51 +01:00
Sipke Schoorstra f5505d66c9
Add Notification Dispatch When Workflow Definitions Are Reloaded (#7293)
* Enhance `DefaultRegistriesPopulator`: add notification support for workflow definition reloads.

* Add unit tests for `DefaultRegistriesPopulator` to verify workflow definition reload notifications.
2026-02-16 11:14:10 +01:00
Sipke Schoorstra 1b09538a13
Introduce role and user management services (#7297)
* Introduce role and user management services

- Add `CreateRoleResult` and `CreateUserResult` models for managing creation results.
- Implement `IRoleManager` and `IUserManager` interfaces and their service classes.
- Configure dependency injection for role and user managers.
- Refactor endpoints to use new manager interfaces.

* Remove IRoleStore dependency from Create endpoint
2026-02-15 18:50:11 +01:00
Sipke Schoorstra c99a594eb3
Update identity configuration and CORS settings
Revised appsettings.json to include a new "FastEndpoints" configuration block and updated CORS allowed origins. Modified IdentityFeature to bind IdentityTokenOptions directly to configuration for better integration.
2026-02-14 20:22:17 +01:00
Sipke Schoorstra aa2c9e7909
Merge remote-tracking branch 'origin/main' 2026-02-14 16:43:20 +01:00
Sipke Schoorstra 743c963dfb
Introduce Combined Persistence Shell Features
- Implemented `CombinedPersistenceShellFeatureBase` for unified configuration of EF Core persistence components.
- Added `SharedPersistenceSettings` for shared configuration across multiple persistence shell features.
- Updated shell features for SQL Server, MySQL, PostgreSQL, SQLite, and Oracle to use a unified persistence approach.
- Refactored `PersistenceShellFeatureBase` to enable fallback to shared settings.
2026-02-13 22:11:11 +01:00