* Refactor `ExpressionExecutionContextExtensions` to convert static methods into extension methods and remove unused imports.
* Refactor `ExpressionExecutionContextExtensions` to convert instance methods into extension methods.
Introduces a new unit test in `Elsa.JavaScript.IntegrationTests` to verify that the `newGuid()` function in the JavaScript evaluator correctly returns a `Guid` type.
Renames the `CancelAncestorActivatesAsync` method to `CancelAncestorActivitiesAsync` for clarity and makes it a proper async method, ensuring correct asynchronous execution.
This prevents potential issues when cancelling ancestor activities.
* Fix outbound connection processing logic
Corrected `completedActivityExcecutedByBackwardConnection` to `completedActivityExecutedByBackwardConnection`. Improved flowgraph outbound connection handling by separating visitation and processing logic, ensuring skipped connections are propagated consistently.
* Add tests for decision implicit join workflows
Introduce new integration tests to verify workflows with implicit joins on both decision outcomes. Added corresponding workflow definitions and updated the test project to ensure compatibility. Refactored connection visit logic for better readability and maintainability.
* Refactor trigger indexing logic and add tests for trigger persistence after workflow reload.
Streamlined conditional trigger indexing in `DefaultWorkflowDefinitionStorePopulator`. Introduced a test to validate trigger persistence across reloads after publishing a new workflow version.
* Fix outbound connection processing logic
Corrected `completedActivityExcecutedByBackwardConnection` to `completedActivityExecutedByBackwardConnection`. Improved flowgraph outbound connection handling by separating visitation and processing logic, ensuring skipped connections are propagated consistently.
* Add tests for decision implicit join workflows
Introduce new integration tests to verify workflows with implicit joins on both decision outcomes. Added corresponding workflow definitions and updated the test project to ensure compatibility. Refactored connection visit logic for better readability and maintainability.
* Resolves workflow execution bodiless requests issue.
Removed content length check when processing JSON requests, relying solely on content type validation. Added a null-check for deserialized requests to handle cases where the request body is missing or invalid, providing a specific error message.
* Refactor JSON request handling in PostEndpoint
Updated to get unit tests to pass.
* Bump workflow base version and branch references to `3.5.2`.
* Refactor flowchart tests and `Flowchart` activity for improved readability and consistency, alongside minor code cleanup.
* Adds comment for clarity.
Adds a comment to explain the continue statement within the flowchart execution logic.
This improves code readability and maintainability.
* Refactor flowchart test to remove unused cases, update switch behavior, and adjust expected output for improved consistency and clarity.
- Introduced `WorkflowStateCommitted` notification to encapsulate workflow execution context, state, and instance details.
- Updated `DefaultCommitStateHandler` to publish `WorkflowStateCommitted` via `IMediator`.
- Adjusted `DispatchWorkflowExtensions` to use `WorkflowStateCommitted` for workflow completion.
Updates KubernetesClient and Microsoft packages (#6917)
* Remove Proto.Cluster.Kubernetes dependency due to vulnerability
- Temporarily removed `Proto.Cluster.Kubernetes` package and provider integration because of a vulnerability in its dependency (https://avd.aquasec.com/nvd/2025/cve-2025-9708).
- Adjusted related cluster provider and remote configuration logic.
- Updated `PortAttribute` default parameter for clarity.
* Revert "Remove Proto.Cluster.Kubernetes dependency due to vulnerability"
This reverts commit 0720d970968e4f7338825407258b34ddffb1d2a4.
* Add KubernetesClient package and update MicrosoftVersion to 9.0.9
- Added `KubernetesClient` package to the project dependencies.
- Updated `MicrosoftVersion` to `9.0.9` in `Directory.Packages.props`.
Update Polly packages
- Bump Polly and Polly.Extensions package versions to 8.6.3.
Update `Microsoft.AspNetCore.Authorization` to use `MicrosoftVersion` property
Ensure Docker images ship CA trust and add TLS smoke tests (#6918)
Remove TlsSmoke project and related solution references
- Deleted `TlsSmoke` project files (`Program.cs` and `TlsSmoke.csproj`).
- Removed `TlsSmoke` project reference from the solution file (`Elsa.sln`).
Add comprehensive Copilot coding agent instructions for repository onboarding (#6920)
* Initial plan
* Add comprehensive .github/copilot-instructions.md with validated build instructions
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 ForEach tests, introduce asynchronous workflow runner and enhance workflow events. (#6926)
* Introduce asynchronous workflow runner and enhance workflow events.
- Added `AsyncWorkflowRunner` to enable asynchronous workflow execution and result tracking.
- Introduced new event arguments, such as `ActivityExecutedEventArgs` and `WorkflowStateCommittedEventArgs`.
- Expanded `WorkflowEvents` class to include `ActivityExecuted`, `ActivityExecutedLogUpdated`, and `WorkflowStateCommitted` events.
- Refactored event arguments into the `Elsa.Testing.Shared.EventArgs` namespace.
- Enhanced tests with `AsyncWorkflowRunner` and new event-driven workflow scenarios.
* Refactor event argument classes to unify namespace and simplify inheritance
* Add shared component DotSettings file to support namespace exclusions
Refactor `WaitAsync` call in `DispatchWorkflowsTests` to remove unnecessary generic type.
* Introduce asynchronous workflow runner and enhance workflow events.
- Added `AsyncWorkflowRunner` to enable asynchronous workflow execution and result tracking.
- Introduced new event arguments, such as `ActivityExecutedEventArgs` and `WorkflowStateCommittedEventArgs`.
- Expanded `WorkflowEvents` class to include `ActivityExecuted`, `ActivityExecutedLogUpdated`, and `WorkflowStateCommitted` events.
- Refactored event arguments into the `Elsa.Testing.Shared.EventArgs` namespace.
- Enhanced tests with `AsyncWorkflowRunner` and new event-driven workflow scenarios.
* Refactor event argument classes to unify namespace and simplify inheritance
* Add shared component DotSettings file to support namespace exclusions
* Remove Proto.Cluster.Kubernetes dependency due to vulnerability
- Temporarily removed `Proto.Cluster.Kubernetes` package and provider integration because of a vulnerability in its dependency (https://avd.aquasec.com/nvd/2025/cve-2025-9708).
- Adjusted related cluster provider and remote configuration logic.
- Updated `PortAttribute` default parameter for clarity.
* Revert "Remove Proto.Cluster.Kubernetes dependency due to vulnerability"
This reverts commit 0720d970968e4f7338825407258b34ddffb1d2a4.
* Add KubernetesClient package and update MicrosoftVersion to 9.0.9
- Added `KubernetesClient` package to the project dependencies.
- Updated `MicrosoftVersion` to `9.0.9` in `Directory.Packages.props`.
- Introduced `WorkflowStateCommitted` notification to encapsulate workflow execution context, state, and instance details.
- Updated `DefaultCommitStateHandler` to publish `WorkflowStateCommitted` via `IMediator`.
- Adjusted `DispatchWorkflowExtensions` to use `WorkflowStateCommitted` for workflow completion.
- Updated `HttpFeature` to include `SendHttpRequest` in `HttpClient` configuration delegate support.
- Added `[Port]` attributes to `FailedToConnect` and `Timeout` properties in `SendHttpRequest` activity.
- Simplified `ValueTask` return syntax in `SendHttpRequestActivityPortResolver`.
- Use `CancellationToken.None` to avoid canceling workflow execution when clients, like Blazor, terminate requests prematurely.
- Add comments for clarification on potential causes.
- Introduced `async` parameter to enable asynchronous workflow resumption.
- Refactored `ResumeBookmarkedWorkflowAsync` to handle both synchronous and asynchronous resumption via `IWorkflowResumer` and `IBookmarkQueue`.
- Updated dependency injection to include `IWorkflowResumer`.
- Adjusted `RenderEnumMember` to include a trailing comma in rendered enums.
- Excluded compiler-generated methods in `TypeDescriber`.
- Extended `VariableTypeDefinitionProvider` to handle `ManagementOptions` and refined variable type exclusion logic.
Introduced `InputEvaluationException` to encapsulate errors during input evaluation in `ActivityExecutionContextExtensions`. Refactored the input evaluation logic by adding a core evaluation method to improve error handling and clarity.
* Refactor `IndexTriggersAsync` to use `WorkflowDefinition` and update null assignment for serialization logic.
* Change default parameter value from `default` to `null` in `UseFluentStorageProvider` method signature.
* Add in-memory workflows provider and materializer for integration tests
Introduced `InMemoryWorkflowsProvider` and `InMemoryWorkflowMaterializer` to support integration testing scenarios for workflow definition population. Enhanced workflow handling with fluent method `WithId` for `WorkflowBuilder`. Updated event publishing and dependency injection logic.
* Remove extraneous whitespace in DefaultWorkflowDefinitionStorePopulator.
* Refine test class documentation for `WorkflowDefinitionStorePopulation` scenario.
* 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>