Commit graph

5270 commits

Author SHA1 Message Date
Marius Vasile Vușcan 0832fda8ab
Exposed incidents in the Elsa.Api.Client 2025-02-06 12:19:26 +02:00
Marius Vasile Vușcan 771b21b0c1
Exposed HttpClientTimeout setting in ElsaClientBuilderOptions 2025-02-06 12:17:58 +02:00
Marius Vasile Vușcan 9703cf0ae5
Package updates 2025-01-29 16:34:51 +02:00
Sipke Schoorstra add1bcbf1c
Merge pull request #6353 from elsa-workflows/bug/primitive-array-serialization
Back-port PolymorphicObjectConverter from 3.3
2025-01-29 15:01:08 +01:00
Sipke Schoorstra b8f1cfdf6c Back-port PolymorphicObjectConverter from 3.3 2025-01-29 14:56:51 +01:00
MariusVuscanNx 646fb92535
Merge pull request #6290 from elsa-workflows/feature/blue-delete-fix
Added DeleteVariablesAsync method for the workflow context
2025-01-14 14:38:29 +02:00
Marius Vasile Vușcan 83b43f8daf
update 2025-01-14 12:30:37 +02:00
Marius Vasile Vușcan 7df058dd2a
Improvements 2025-01-14 12:23:21 +02:00
Marius Vasile Vușcan f27563a93f
Added DeleteVariablesAsync method for the workflow context 2025-01-13 16:48:24 +02:00
Sipke Schoorstra 485e6bfeef Skip outdated test for suspended workflow cancellation.
Marked the "SuspendedCancelTest" as outdated to prevent it from running. This test requires updates to align with recent changes and ensure its relevance. Skipping it avoids potential false negatives during testing.
2024-12-18 15:55:31 +01:00
Sipke Schoorstra fae191d466
Merge pull request #6226 from elsa-workflows/feat/execute-workflow-activity
Add support for waiting for child workflows in ExecuteWorkflow
2024-12-18 15:39:02 +01:00
Sipke Schoorstra fb70022e87 Add Variable parameter to StorageDriverContext
Updated `StorageDriverContext` to include a `Variable` parameter, ensuring more precise context handling for variable-related operations. Adjusted relevant method calls to pass the required `Variable` argument where necessary.
2024-12-18 15:37:38 +01:00
Sipke Schoorstra 8f8f8579a4 Add support for waiting for child workflows in ExecuteWorkflow
This update introduces the ability to optionally wait for child workflows to complete before finishing the ExecuteWorkflow activity. A bookmark mechanism is used to resume the activity when the child workflow completes. Additionally, a new handler was added to manage the resumption of these workflows upon completion events.
2024-12-18 15:05:46 +01:00
Sipke Schoorstra a2f76b8eba
Add output serialization and deserialization support (#6152)
Introduced `Output` message and related data serialization/deserialization methods in `ProtoOutputExtensions`. Updated `WorkflowExecutionResult` and impacted methods to include `Output` handling. Enhanced workflow runtime logic to manage and integrate output data.
2024-11-26 15:59:25 +01:00
Raymond den Haan 4cf797263f Update log level and comment for orphaned subscription removal 2024-11-26 09:49:27 +01:00
raymonddenhaan 7b8423ec25
Merge pull request #6147 from elsa-workflows/fix/32953
Update warning log message for missing orphaned subscriptions
2024-11-25 14:49:33 +01:00
Raymond den Haan 8270ebe10d Updated Refit to fix security vulnerability GHSA-3hxg-fxwm-8gf7 2024-11-25 12:52:37 +01:00
Raymond den Haan d49456b5b7 Update warning log message for orphaned subscriptions
Revised the log message to prevent people seeing it as an error and making it more clear this can be expected behavior.
2024-11-25 12:51:56 +01:00
Sipke Schoorstra a6bd386005
Add functionality to execute nested workflows (#6137)
Introduced a new `ExecuteWorkflow` activity that allows executing nested workflows. Added `ExecuteWorkflowResult` model to handle results and integrated component tests to verify nested workflow execution. Enhanced `IWorkflowBuilder` to support fluent methods for adding outputs.
2024-11-21 19:18:47 +01:00
Sipke Schoorstra 492b16bd24
Filter workflow summaries by latest version (#6132)
Ensure that only the latest version of each workflow definition is processed by grouping and selecting the highest version. This change helps prevent redundant updates and ensures data consistency.
2024-11-20 14:44:57 +01:00
Sipke Schoorstra c47157fd9f
Fix workflow definition finder (#6124)
Fixes that the workflow reference updater would collect child workflows from child workflows, instead of collecting only immediate children.
2024-11-18 19:05:36 +01:00
Sipke Schoorstra b6e653e151 Add cleanup step to workflow definition reload test
Added a cleanup step in the ReloadWorkflowTests to delete the workflow definition and its versions after the test runs. This ensures that the tests do not leave residual data, maintaining a clean state for subsequent tests.
2024-11-08 21:58:11 +01:00
Sipke Schoorstra 729370a203 Merge branch 'enh/update-consuming-workflows' into blueberry 2024-11-08 21:40:17 +01:00
Sipke Schoorstra 111fa10aab Remove unused dependency from ReloadWorkflowTests
Eliminated the IWorkflowDefinitionCacheManager dependency from the ReloadWorkflowTests constructor and fields. This cleanup helps streamline the code and maintainability by removing an unnecessary service.
2024-11-08 21:39:27 +01:00
Sipke Schoorstra e5e7211504 Add workflow definition cache manager to test setup
The IWorkflowDefinitionCacheManager has been added to the test class. This ensures proper cache management during workflow definition reload tests. Additionally, a cleanup step to delete the workflow definition and its versions has been included.
2024-11-08 21:39:01 +01:00
Sipke Schoorstra a0aa420a12
Keep Published Workflows Immutable by Updating Drafts Instead (#6106)
* Add workflow graph network builder and child workflow finder

Introduce IWorkflowGraphNetworkBuilder and IChildWorkflowFinder interfaces with their implementations to build and manage workflow graph networks. Additionally, register new services and handlers to support these functionalities in the Workflow Management feature.

* Remove unused workflow graph network builder

Deleted the unused `IWorkflowGraphNetworkBuilder` interface, its implementation, and related files. Updated affected classes to replace dependency on the removed builder with direct methods. Enhanced affected workflows tracking during publication.

* Optimize workflow update logic to skip redundant checks

Added condition to ensure only relevant activities are processed by verifying their version IDs. This reduces unnecessary computations and ensures the system skips already up-to-date workflow activities.

* Add workflow reference updater implementation

Introduced IWorkflowReferenceUpdater interface to manage workflow references updates. Implemented the corresponding service and integrated it into existing event handling logic. This improves maintainability and reduces code duplication by isolating the reference update logic.

* Set workflow activity version during update

Added a missing assignment of the workflow activity version in the `UpdateWorkflowDefinition` method. This ensures that the `Version` field is properly set when workflow definitions are updated.

* Remove UpdateReferencesInConsumingWorkflows method

Eliminated the UpdateReferencesInConsumingWorkflows method from IWorkflowDefinitionPublisher and its implementation from WorkflowDefinitionPublisher. The responsibility of updating workflow references is now transitioned to IWorkflowReferenceUpdater used in the `UpdateReferences` endpoint.

* Remove WorkflowGraphNetwork and WorkflowGraphNode models

These models were deleted as they are no longer needed in the system. The removal helps in reducing code clutter and improves maintainability by eliminating unused components.

* Refactor parameter naming in IWorkflowReferenceUpdater

Renamed 'definition' to 'referencedDefinition' for clarity in the IWorkflowReferenceUpdater contract and its implementation. This change makes it explicit that the parameter refers to the workflow definition being referenced, ensuring the code is more understandable and maintainable.

* Update WorkflowReferenceUpdater for clarity and accuracy

Renamed variables and updated comments for better clarity. The term "matchingWorkflowGraphs" was changed to "consumingWorkflowGraphs" to more accurately describe its purpose. Adjusted comment to clarify the materialization process of the draft version.

* Add IsReadonly filter to WorkflowDefinitionFilter

This ensures that only non-readonly workflow definitions are fetched. It enhances the accuracy of workflow updates by filtering out readonly versions.
2024-11-08 18:19:42 +01:00
Sipke Schoorstra e46fa84647 Add IsReadonly filter to WorkflowDefinitionFilter
This ensures that only non-readonly workflow definitions are fetched. It enhances the accuracy of workflow updates by filtering out readonly versions.
2024-11-08 18:18:47 +01:00
Sipke Schoorstra 6aa40143f3 Update WorkflowReferenceUpdater for clarity and accuracy
Renamed variables and updated comments for better clarity. The term "matchingWorkflowGraphs" was changed to "consumingWorkflowGraphs" to more accurately describe its purpose. Adjusted comment to clarify the materialization process of the draft version.
2024-11-08 18:13:59 +01:00
Sipke Schoorstra 6503612f7f Refactor parameter naming in IWorkflowReferenceUpdater
Renamed 'definition' to 'referencedDefinition' for clarity in the IWorkflowReferenceUpdater contract and its implementation. This change makes it explicit that the parameter refers to the workflow definition being referenced, ensuring the code is more understandable and maintainable.
2024-11-08 18:10:30 +01:00
Sipke Schoorstra 57cafd69a5 Remove WorkflowGraphNetwork and WorkflowGraphNode models
These models were deleted as they are no longer needed in the system. The removal helps in reducing code clutter and improves maintainability by eliminating unused components.
2024-11-08 18:07:59 +01:00
Sipke Schoorstra 8fe0147abd Remove UpdateReferencesInConsumingWorkflows method
Eliminated the UpdateReferencesInConsumingWorkflows method from IWorkflowDefinitionPublisher and its implementation from WorkflowDefinitionPublisher. The responsibility of updating workflow references is now transitioned to IWorkflowReferenceUpdater used in the `UpdateReferences` endpoint.
2024-11-08 18:00:21 +01:00
Sipke Schoorstra a7b0d5630d Set workflow activity version during update
Added a missing assignment of the workflow activity version in the `UpdateWorkflowDefinition` method. This ensures that the `Version` field is properly set when workflow definitions are updated.
2024-11-08 17:20:40 +01:00
Sipke Schoorstra cc86ee9f58 Add workflow reference updater implementation
Introduced IWorkflowReferenceUpdater interface to manage workflow references updates. Implemented the corresponding service and integrated it into existing event handling logic. This improves maintainability and reduces code duplication by isolating the reference update logic.
2024-11-08 17:16:21 +01:00
Sipke Schoorstra c7fa4468be Optimize workflow update logic to skip redundant checks
Added condition to ensure only relevant activities are processed by verifying their version IDs. This reduces unnecessary computations and ensures the system skips already up-to-date workflow activities.
2024-11-08 11:57:15 +01:00
Sipke Schoorstra 8c7a823374 Remove unused workflow graph network builder
Deleted the unused `IWorkflowGraphNetworkBuilder` interface, its implementation, and related files. Updated affected classes to replace dependency on the removed builder with direct methods. Enhanced affected workflows tracking during publication.
2024-11-08 11:45:25 +01:00
MariusVuscanNx 9c7ee16e96
Updated refit (#6098) 2024-11-06 15:04:28 +01:00
Sipke Schoorstra 311f59894e Add workflow graph network builder and child workflow finder
Introduce IWorkflowGraphNetworkBuilder and IChildWorkflowFinder interfaces with their implementations to build and manage workflow graph networks. Additionally, register new services and handlers to support these functionalities in the Workflow Management feature.
2024-11-06 11:58:13 +01:00
Sipke Schoorstra 6ed6c8a30e Merge remote-tracking branch 'origin/patch/3.2.x' into blueberry 2024-11-05 15:46:02 +01:00
Sipke Schoorstra b3c73e99ea Disable SignalR in Elsa Server
Updated `useSignalR` flag to false in `Program.cs` due to Elsa Studio's current inability to send authenticated requests to the SignalR hub. This change ensures better security and stability until the necessary update is implemented.
2024-10-31 19:59:42 +01:00
Sipke Schoorstra 91b7e0c800 Add authorization to WorkflowInstanceHub
This commit decorates the WorkflowInstanceHub class with the [Authorize] attribute to ensure that only authorized users can connect to the SignalR hub. This change improves the security of the workflow event notification system.
2024-10-31 19:53:26 +01:00
Sipke Schoorstra c3b6decf66 Update default version to 3.2.2 in workflows
Changed the fallback version from 3.2.1-preview to 3.2.2-preview in the GitHub Actions workflow configuration. This ensures that new preview versions are correctly labeled with the latest version number.
2024-10-25 22:49:49 +02:00
Sipke Schoorstra fefe36f49a
Include $schema when exporting workflow definition (#6056)
* Refactor AdditionalConvertersConfigurator constructor

Simplify AdditionalConvertersConfigurator by using constructor injection directly in the class declaration. Also, annotate the class with [UsedImplicitly] to improve code clarity and maintainability.

* Update workflow serialization to be asynchronous

Refactor the workflow definition serialization to use asynchronous operations, improving efficiency and handling cancellation tokens. This change ensures the schema is correctly included in the serialized output.
2024-10-25 14:51:27 +02:00
Sipke Schoorstra 52516aa0ff
Fix Bulk Dispatch Missing Input (#6052)
* Remove outdated sample workflows and activities

Deleted CompositeExample, SampleWorkflow, and SlowActivity classes as they are no longer needed. These deletions help clean up the codebase and maintain relevance in the code structure.

* Handle null WorkflowBuilderType in ClrWorkflowMaterializer

Introduce a fallback NotFoundWorkflowbuilder class when WorkflowBuilderType is null. This ensures the MaterializeAsync method functions even if the provided context lacks a specific workflow builder type.

* Add merging of itemDictionary to input

This change ensures that the itemDictionary's contents are also merged into the input dictionary, preventing possible data loss. It builds on existing logic by adding an additional merge operation to incorporate all necessary data.

* Add new workflows to BulkDispatchWorkflows and modify tests

Introduce `FruitWorkflow` and `MixFruitsWorkflow` for bulk dispatch scenarios. Refactor `BulkDispatchWorkflowsTests` to include new tests and rename signals for clarity. Optimize `BulkDispatchWorkflows` activity by removing redundant dictionary merge.
2024-10-23 16:06:28 +02:00
Sipke Schoorstra a0001d3891
Enhance error handling in PolymorphicObjectConverter (#6051)
Add null checks for `referenceResolver` in cases where `RefPropertyName` and `IdPropertyName` are being processed. This prevents potential null reference exceptions and ensures safer deserialization of objects.
2024-10-23 12:12:18 +02:00
Sipke Schoorstra b46d432579
Add JsonNode BSON serializer (#6043)
Introduce JsonNodeBsonConverter for BSON serialization of JsonNode objects. Update MongoDbFeature to register the new serializer, enhancing JSON handling within MongoDB serialization context.
2024-10-19 11:56:50 +02:00
Sipke Schoorstra a200412896 Update package versions to fix vulnerabilities
Upgrade various packages to their latest versions to address vulnerabilities and improve stability. This includes updates to Microsoft.Extensions, EntityFrameworkCore, and Npgsql among others.
2024-10-19 10:44:28 +02:00
Sipke Schoorstra 61f9e2a59a Add version override for System.Text.Json
This change overrides the version of System.Text.Json due to vulnerabilities found in dependencies referencing older versions. This ensures better security and reliability in performance tests.
2024-10-18 12:39:16 +02:00
Sipke Schoorstra f6eccde968 Switch to project references from package references
Replaced package references for various Elsa modules with direct project references. This change aims to streamline dependency management and avoid issues related to differing package versions. Updated the solution file and Directory.Build.props accordingly to reflect the new paths.
2024-10-18 10:54:23 +02:00
Sipke Schoorstra 299f165978 Refactor project paths in solution files
Updated the paths for multiple projects in the solution files to better organize modules under a common directory structure. Modified project references in `ElsaX.Web.Server.csproj` to match the new directory structure. Added a label to an item group for clarity in `Elsa.Server.Web.csproj`.
2024-10-14 09:48:32 +02:00
Sipke Schoorstra 1905918247 Update System.Text.Json package reference to use property variable
Switched from a hardcoded version to a property variable `$(SystemTextJsonVersion)` for the `System.Text.Json` package reference in multiple project files. This change centralizes version management and ensures consistency across all projects.
2024-10-12 12:27:54 +02:00