elsa-core/src/modules/Elsa.Workflows.Management/Models
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
..
AffectedWorkflows.cs Keep Published Workflows Immutable by Updating Drafts Instead (#6106) 2024-11-08 18:19:42 +01:00
ImportWorkflowResult.cs Implemented workflow validation for httpendpoint path (#4181) 2023-07-14 19:19:41 +02:00
PublishWorkflowDefinitionResult.cs Keep Published Workflows Immutable by Updating Drafts Instead (#6106) 2024-11-08 18:19:42 +01:00
SaveWorkflowDefinitionRequest.cs Publish workflows imported programatically (#3958) 2023-04-27 14:52:07 +02:00
TimestampFilter.cs Enhanced Workflow Instance Filters (#4957) 2024-02-18 23:40:03 +01:00
UpdateWorkflowReferencesResult.cs Keep Published Workflows Immutable by Updating Drafts Instead (#6106) 2024-11-08 18:19:42 +01:00
VariableDescriptor.cs Implement types API endpoint (#3479) 2022-11-26 22:27:33 +01:00
WorkflowDefinitionModel.cs Rework Workflow Context Feature (#5861) 2024-08-06 22:36:24 +02:00
WorkflowDefinitionSummary.cs Global read-only and read-only workflows (#5406) 2024-05-27 10:06:39 +02:00
WorkflowInstanceId.cs Alterations with Queries (#5032) 2024-03-13 20:34:46 +01:00
WorkflowInstanceSummary.cs Add caching to workflow runtime and workflow management stores (#5174) 2024-04-10 11:51:40 +02:00
WorkflowValidationError.cs Implemented workflow validation for httpendpoint path (#4181) 2023-07-14 19:19:41 +02:00