Commit graph

6166 commits

Author SHA1 Message Date
Copilot b9697a9e28
Fix Liquid expressions not working in sub-workflows (workflow-as-activity) (#6678)
* Initial plan for issue

* Fix Liquid expressions not working in sub-workflows

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>
2025-05-24 21:45:28 +02:00
Copilot 144edc3a85
Fix Content-Type header charset auto-appending in HTTP requests (#6676)
* Initial plan for issue

* Implement RawStringContent for fixing charset issue

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>
2025-05-24 21:39:31 +02:00
Copilot 830a04f325
Fix missing DefaultValue for OuterBoundInclusive property in For activity (#6680)
* Initial plan for issue

* Add DefaultValue=true to OuterBoundInclusive InputAttribute

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>
2025-05-24 21:32:46 +02:00
Matt a0b1b299c7
Merge pull request #6673 from elsa-workflows/task/move-sastokens-to-core
Add back SasToken project.
2025-05-23 15:16:57 +01:00
Matt 1ecbf5e93d Add back SasToken project. 2025-05-23 01:09:59 +01:00
Matt 609f33e790
Merge pull request #6664 from KnibbsyMan/task/move-modules-to-extensions
Realign Core and Extension Repos.
2025-05-22 11:42:45 +01:00
Matt 6b88698200 Merge 'Main' in and resolves conflicts. 2025-05-22 00:46:15 +01:00
Matt ca5340557d Apply changes that will not be resolved by merge conflict resolution. 2025-05-22 00:17:15 +01:00
Sipke Schoorstra f4ad11eb0f
Merge remote-tracking branch 'origin/develop/3.5.0' 2025-05-21 11:32:58 +02:00
Sipke Schoorstra cf01846b9d
Merge remote-tracking branch 'origin/patch/3.4.1' into develop/3.5.0 2025-05-21 11:32:21 +02:00
Sipke Schoorstra 366284aed1
Updates package versions
Updates several package versions to their latest available releases.

This ensures that the project benefits from the latest features,
bug fixes, and security updates provided by the respective libraries.
2025-05-21 11:31:58 +02:00
Sipke Schoorstra c5d312f04c
Update workflow for version 3.4.1 release tracking
Increase base_version to 3.4.1 and update branch filtering to match the new patch release naming convention. This ensures the workflow correctly handles the latest release process.
2025-05-21 11:28:39 +02:00
Sipke Schoorstra 1923a0f7f8
Fix conditional logic in stimulus dispatch handlers
Added missing braces to improve readability and consistency in conditional statements for stimulus dispatch logic. Ensures better maintainability and alignment with coding standards.
2025-05-21 11:27:28 +02:00
Chandrasekar Vijayakumar 9f212e8b57
Enhanced SasTokensFeature to support sharing protected keys via shared drive, Redis cache, and other mechanisms (#6665)
* Modified POST execute API to show body in Swagger and resolved type-casting error in GET execute API

Modified the POST execute API to display the body in Swagger documentation and resolved the type-casting error in the GET execute API

* Added IExecutionRequest interface defines a contract for Request classes

* Moved the serialization logic into request classes

* Add missing import and reformat ActivityHandle property

Included the Elsa.Workflows.Models import in Models.cs to fix missing reference. Removed redundant ActivityHandle assignment in EndpointBase.cs to improve clarity and reduce redundancy.

* Added support to retrieve the workflow details(i.e.,  WorkflowDefinitionId, WorkflowDefinitionVersionId, WorkflowDefinitionVersion, WorkflowInstanceId) through Liquid script

* Enhanced SasTokensFeature to support sharing protected keys via shared drive, Redis cache, and other mechanisms

---------

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2025-05-21 10:24:27 +02:00
Sipke Schoorstra 01d286b386
Refactor serialization tests and remove unused dependencies
Updated object initialization in serialization tests for consistency and renamed `async void` methods to `async Task`. Removed unused `ISystemClock` dependency from OpenTelemetry middleware constructors to simplify implementation.
2025-05-21 10:18:17 +02:00
Sipke Schoorstra e10c95f4e2
Update package versions in Directory.Packages.props
Upgraded multiple dependencies to their latest versions for improved functionality, security, and compatibility. This includes updates to Azure.Identity, Cronos, FastEndpoints, and various Microsoft.Extensions packages, among others.
2025-05-21 10:18:06 +02:00
Sipke Schoorstra 5de795d844
Update ElsaStudioVersion to 3.6.0-preview.1029
Bumps the ElsaStudioVersion from 3.5.0-preview.1019 to 3.6.0-preview.1029 in Directory.Build.props. Ensures the project uses the latest preview version of the Elsa Studio package.
2025-05-21 09:57:35 +02:00
Sipke Schoorstra 6d414a79db
Merge remote-tracking branch 'origin/develop/3.5.0' 2025-05-21 09:55:35 +02:00
Sipke Schoorstra ed6a20fd25
Merge remote-tracking branch 'origin/rc/3.4.0' into develop/3.5.0 2025-05-21 09:53:32 +02:00
Matt 10348c5ea3 Update all dependencies to new projects. 2025-05-21 00:20:13 +01:00
Sipke Schoorstra 787b3ed8eb
Refactor default field initializations to use null instead of default!.
This update ensures consistency and improves clarity in specifying nullable types and default values. Replaced `default!` with `null` in various activity classes and properties to better align with modern C# nullable reference type practices.
2025-05-20 20:26:57 +02:00
jeanbaptistedalle c9bdcd5a84
Create trigger payload validation, refacto HttpEndpoint validator and create Cron validator (#6641) 2025-05-20 19:52:43 +02:00
Max Brooks 9cbf75115f
View suspended workflow in studio fix (#6646)
* Refactor ActivityRegistry to populate all activities in workflow editor page

- Modify ListAll to return distinct activity descriptors.
- Update RegisterAsync to call Add with correct parameters.
- Refactor RefreshDescriptorsAsync for better collection usage.
- Split Add method into two overloads for clarity.
- Improve logging for replacing existing activity descriptors.

* Add FuncExpressionValueConverter for JSON serialization

Implemented FuncExpressionValueConverter to handle serialization
and deserialization of Func<ExpressionExecutionContext,
ValueTask<object>> types, ensuring delegates are not serialized
and cannot be rehydrated from JSON. Updated multiple serializers
including ApiSerializer, BookmarkPayloadSerializer,
JsonActivitySerializer, JsonPayloadSerializer,
JsonWorkflowStateSerializer, and SafeSerializer to utilize
the new converter in their JSON serialization options.

* fix broken studio when when viewing suspended workflows

* fix for tests

---------

Co-authored-by: Max Brooks <Max@compyl.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2025-05-20 19:47:15 +02:00
sagargolu de8c692f48
fix: code fixed to allow loading all the descriptors in the UI (#6648) 2025-05-20 19:42:34 +02:00
Matt a563a138b9 Move Runtimes from Core to Extensions. 2025-05-20 14:00:49 +01:00
Matt 0f6fbb8542 Move Alterations and MongoDb Test projects to Extensions. 2025-05-20 13:34:35 +01:00
Matt 044be5c09a Rename Scripts to Expressions. 2025-05-20 12:52:19 +01:00
Matt 74e9bfc7ce Return Http and Scripting from Extensions. 2025-05-20 12:38:24 +01:00
Matt 10f92bf16b Return Caching to Core. 2025-05-20 12:11:27 +01:00
Sipke Schoorstra 1c2326ed80
feat(runtime): optional workflow output (#6659) 2025-05-20 11:57:29 +02:00
Sipke Schoorstra 065626dda3
feat(masstransit): add service bus configuration hook (#6658) 2025-05-20 11:53:20 +02:00
Sipke Schoorstra 50ed45d51d
Dispose FileSystemWatcher on stop (#6657) 2025-05-20 11:53:08 +02:00
Sipke Schoorstra b19236f7e6
Fix SetVariable test (#6656) 2025-05-20 11:52:57 +02:00
Sipke Schoorstra 9c64e2e3d9
Fix duplicate words in XML comments (#6655) 2025-05-20 11:52:23 +02:00
Sipke Schoorstra 85ff0d7abc
Fix spelling in hosted service log messages (#6654) 2025-05-20 11:52:05 +02:00
Sipke Schoorstra ab59ebc12f
Skip flaky test in InputOutputLoggingTests.
The `WorkflowAsActivityInternal_ShouldHonorSettings_WhenExecuting` test is marked with `[Fact(Skip)]` due to intermittent failures. The issue appears unclear, despite the functionality working as expected in practice.
2025-05-20 11:41:00 +02:00
Sipke Schoorstra 96369c256e
Merge branch 'codex/fix-bug-in-waitforhttprequest-callback-handling' into develop/3.5.0 2025-05-20 11:35:12 +02:00
Sipke Schoorstra 562d91bd55
Fix async callback awaiting in HTTP endpoint (#6660)
* Await HTTP resume callbacks

* Update HttpEndpoint.cs

* Update HttpEndpointActivityExecutionContextExtensions.cs

* Refactor to use `WaitForHttpRequestAsync` consistently.

Replaced `WaitForHttpRequest` with `WaitForHttpRequestAsync` across the codebase to align with asynchronous naming conventions. This change improves clarity and maintains consistency in method naming.

* Add 'codex/*' branch to workflow path filters

This update ensures that actions in the workflow are triggered for changes in branches following the 'codex/*' naming convention. It aligns the path filters with the branching strategy and improves CI/CD coverage.
2025-05-20 11:24:23 +02:00
Sipke Schoorstra 807722f91e Remove ReadLine activity from automatic registration
The ReadLine activity was removed as it can cause hanging containers when awaiting user input. This change requires explicit opt-in for its usage, improving default workflow behavior and avoiding unintended issues.
2025-05-20 10:45:55 +02:00
Matt c423b324f9 Remove Dropins from Core. 2025-05-20 00:37:03 +01:00
Matt e56826e387 Remove All projects from Core that have moved to Extensions. 2025-05-20 00:33:12 +01:00
Sipke Schoorstra 81943317f3
Add 'codex/*' branch to workflow path filters
This update ensures that actions in the workflow are triggered for changes in branches following the 'codex/*' naming convention. It aligns the path filters with the branching strategy and improves CI/CD coverage.
2025-05-19 22:11:08 +02:00
Sipke Schoorstra 23622b5679
Refactor to use WaitForHttpRequestAsync consistently.
Replaced `WaitForHttpRequest` with `WaitForHttpRequestAsync` across the codebase to align with asynchronous naming conventions. This change improves clarity and maintains consistency in method naming.
2025-05-19 22:07:30 +02:00
Sipke Schoorstra 6ee74f4c73
Update HttpEndpointActivityExecutionContextExtensions.cs 2025-05-19 22:03:20 +02:00
Sipke Schoorstra 301dea4c44
Update HttpEndpoint.cs 2025-05-19 22:02:49 +02:00
Sipke Schoorstra 4f092ee5e4 Await HTTP resume callbacks 2025-05-19 22:01:20 +02:00
Sipke Schoorstra 0769b6ded2
Update ElsaStudio package version to 3.4.0-preview.1025
Changed the ElsaStudioVersion to a new preview version and referenced it consistently in package definitions. This ensures centralized management of the version and supports the updated preview release.
2025-05-16 22:16:36 +02:00
Sipke Schoorstra 237b22bf0f
Fix tenant ID handling and query filtering logic.
Replaced direct query filter setup with a dedicated method for cleaner and more readable tenant ID filtering logic. Removed unnecessary dependencies and improved code consistency by aligning naming conventions and simplifying expressions.
2025-05-16 21:57:49 +02:00
Sipke Schoorstra 2dcd852833
Enhances workflow runtime resilience and signaling (#6643)
* Refactor BookmarkQueueSignaler to use Channel for signaling.

Replaced TaskCompletionSource with a bounded Channel to improve concurrency control and simplify the code. This change ensures better handling of multiple producers while maintaining a single reader model.

* Refactor BookmarkQueueWorker to improve resilience and clarity

Replaced Debouncer with Throttler for rate limiting and added error handling to log exceptions and ensure the worker loop continues safely while allowing proper shutdown on cancellation.

* Handle missing workflow instance during bookmark resumption

Add exception handling for `WorkflowInstanceNotFoundException` to handle cases where the workflow instance does not exist. Log a debug message and return `ResumeBookmarkResult.NotFound()` when such instances are encountered. This ensures better error management and logging for bookmark resumption.

* Refactor default initializations and rename completion methods.

Replaced `default!` with `null!` for input properties to improve clarity and consistency. Renamed methods to better reflect their purpose, changing `CheckIfCompletedAsync` to `AttemptToCompleteAsync`. These changes enhance code readability and maintainability.

* Refactor to use specific exceptions for workflow errors

Replaced generic `InvalidOperationException` with `WorkflowInstanceNotFoundException` and `WorkflowGraphNotFoundException` for improved error context. This enhances clarity and enables more precise error handling.

* Change default value of WorkflowInstanceId to null

Updated the property `WorkflowInstanceId` to use `null!` instead of `default!` to better align with nullable reference type semantics. This ensures clarity and consistency in the codebase regarding expected default values.

* Add handling for WorkflowInstanceSaved in SignalBookmarkQueueWorker

Updated the SignalBookmarkQueueWorker to implement INotificationHandler for WorkflowInstanceSaved. This ensures that workflow instance save events now trigger the bookmark queue worker, improving event handling consistency.

* Update comment to clarify bookmark and workflow instance check

Expanded the comment to explain that the queue item is stored not only when a bookmark is missing but also when the associated workflow instance is not yet in the database. This improves clarity for future maintainers regarding queuing conditions.
2025-05-13 13:51:47 +02:00
Sipke Schoorstra 45f79c3ffe
Remove unused imports from Program.cs
This commit cleans up Program.cs by removing several unused using directives. The removal helps improve code readability and eliminates unnecessary references, ensuring a leaner and more maintainable codebase.
2025-05-12 14:24:50 +02:00