Commit graph

5287 commits

Author SHA1 Message Date
Sipke Schoorstra 7084675a5c Add 'enh/*' branch to GitHub Actions workflow
This update ensures that branches following the 'enh/*' naming convention are included in the workflow. It aligns with existing branch patterns like 'feature/*' to maintain consistency in automation coverage.
2025-02-17 19:04:42 +01:00
Sipke Schoorstra 0065811354 Add toggle for WorkflowInboxCleanupJob in WorkflowRuntimeFeature
Introduced methods to enable or disable the WorkflowInboxCleanupJob. Updated service configuration logic to conditionally register WorkflowInboxCleanupHostedService based on the toggle. This adds flexibility to control cleanup job behavior programmatically.
2025-02-17 19:04:10 +01:00
Sipke Schoorstra 6682b7f60f
Merge pull request #6392 from elsa-workflows/enh/bulk-query-cancel
Implement bulk cancellation using alterations and filters
2025-02-10 11:17:08 +01:00
Sipke Schoorstra bec0e559b2 Refactor RefitSettingsHelper for improved readability
Reformatted object initialization in CreateRefitSettings to improve structure and code clarity. Also cleaned up unnecessary whitespace for consistency and better readability.
2025-02-08 10:10:40 +01:00
Sipke Schoorstra bde7c0dbfe Restore support for custom JSON serializer configuration
Allow external configuration of JSON serializer settings by introducing an optional delegate. This enhances flexibility and enables customization based on specific use cases.
2025-02-08 10:10:17 +01:00
Sipke Schoorstra c0bf4b7f84 Add support for selecting all records with empty filters
Introduced a new property, `EmptyFilterSelectsAll`, to handle cases where empty filters should match all records. Updated logic in `WorkflowInstanceFinder` to respect this property, ensuring consistent behavior across the system. Removed redundant comments in the dry-run endpoint for cleaner code.
2025-02-08 10:07:07 +01:00
Sipke Schoorstra 578a15832c Update workflow cancellation logic
Replaced status checks with a call to `CanTransitionTo` for determining if a workflow can transition to the "Cancelled" state. This improves code readability and maintains consistent transition validation logic.
2025-02-08 09:51:26 +01:00
Sipke Schoorstra e719bd7c7d Remove alteration models and interfaces; refactor to use JsonObject.
This commit deletes all alteration-related models and the `IAlteration` interface in favor of using `JsonObject`. Adjustments were made to `AlterationPlan`, `AlterationPlanParams`, and `RunRequest` to replace `IAlteration` collections with `JsonObject`. Simplified the `RefitSettingsHelper` by eliminating polymorphism configuration for alterations.
2025-02-08 09:45:50 +01:00
Sipke Schoorstra 0e4a74bfba Add Cancel alteration type and handler for workflow cancellation
Introduced a new `Cancel` alteration type with its corresponding handler to allow workflow instance cancellations in alteration plans. Updated related services, serialization configurations, and activity metadata to support the new type. Improved JSON polymorphism handling to include the `Cancel` type.
2025-02-07 23:10:22 +01:00
Sipke Schoorstra 7cc638b86f Add filtering enhancements and clean up code inconsistencies
Introduced new filtering capabilities such as `Names`, `Statuses`, `SubStatuses`, and `SearchTerm` for workflow instance filters. Simplified object initialization syntax and removed unnecessary attributes, improving code readability. Added missing dependencies and API service registrations to ensure completeness.
2025-02-07 19:54:26 +01:00
Sipke Schoorstra 861fe40f66
Merge pull request #6370 from yinzara/feature/alterations-client-api
Added Alterations API to Client API library and updated server API co…
2025-02-07 12:56:57 +01:00
MariusVuscanNx 92626d4443
Merge pull request #6379 from elsa-workflows/feature/artifact
Updated deprecated artifacts
2025-02-06 16:32:05 +02:00
Marius Vasile Vușcan 29a8f4367d
Updated deprecated artifacts 2025-02-06 16:28:29 +02:00
MariusVuscanNx f4c2fdf316
Merge pull request #6378 from elsa-workflows/feature/artifact
Updated deprecated artifact
2025-02-06 16:13:52 +02:00
Marius Vasile Vușcan 9bd41f1f11
Updated deprecated artifact 2025-02-06 16:07:58 +02:00
Sipke Schoorstra dfc3bc4d2b
Merge pull request #6375 from elsa-workflows/feature/incidents
Exposed incidents in the Elsa.Api.Client
2025-02-06 12:04:48 +01:00
Marius Vasile Vușcan 23d37c060f
Removed unwanted code 2025-02-06 12:49:04 +02:00
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