Replaced asynchronous instance creation methods with streamlined synchronous alternatives where applicable. Introduced `CreateAndCommitWorkflowInstanceAsync` for combined instantiation and persistence, along with a separate `CreateWorkflowInstance` method for non-committal instantiation. Refactored related code to improve readability, maintainability, and runtime performance.
Replaced explicit type initializations with concise target-typed `new()` expressions where applicable, improving code readability and aligning with updated C# conventions. Updated .editorconfig to enforce consistent use of `var` for type declarations.
Replaces static resolver state with an instance-level resolver in `CrossScopedReferenceHandler` to enhance flexibility and thread-safety. Refactors `JsonWorkflowStateSerializer` to use `GetOptions` for improved API consistency and clarity.
Replaced `PerCallReferenceHandlerWrapper` with `CrossScopedReferenceHandler` and optimized the resolver initialization using `AsyncLocal`. This simplifies the code and ensures a more efficient handling of reference resolution during serialization.
The `ApplyOptions` method now correctly calls the base implementation before applying custom configurations. This ensures that any base behavior is preserved, preventing potential issues with serialization options.
Replaced direct use of `CrossScopedReferenceHandler` with `PerCallReferenceHandlerWrapper` for improved abstraction and reusability. Updated `ApplyOptions` to leverage the new wrapper, simplifying reference resolver management. Commented out redundant code to streamline the implementation.
Updated the target framework from .NET 8 to .NET 9 for future compatibility and language improvements. Adjusted null handling in `WorkflowDefinitionImporter` for better readability and correctness. Added a cancellation token to `ReadToEndAsync` for improved async operation control.
- **Improves performance:** The converters and static properties are pre-configured when the class is initialized. Only the `ReferenceHandler` is refreshed per call, avoiding repeated configuration of common options like converters.
- **Thread-safe:** Since `_cachedOptions` is immutable, it can safely be reused across threads.
**Tradeoffs:** Small performance cost during cloning, but still much faster than fully recreating options each time.
Added a missing comma in the README link text for the Elsa 2 section to improve readability and align with proper punctuation standards. No functional changes were made.
Enhanced the workflow cancellation process by saving the updated workflow state using `IWorkflowInstanceManager`. Similar updates were applied to state import logic to ensure consistency in persisting workflow state changes.
Moved `CancelWorkflowsCommandHandler` to the shared runtime module. Updated related project references, features, and configurations accordingly. Improved `WorkflowInstance` actor to save state using `IWorkflowInstanceManager`.
Removed `ConfigureRecurringTasksScheduleStartupTask` and moved its functionality into `RecurringTaskScheduleManager`. Simplified recurring task configuration and streamlined dependencies, improving maintainability. Added retention policies to `Elsa.Server.Web`.
Added try-catch block to log failures when reading variables from storage, ensuring robust error handling. Also refined type checking for `ExpandoObject` deserialization in `ObjectConverter` to prevent invalid operations.
Updated `UseElsaMySql` method to use default `null` values instead of `default` and added a conditional compilation directive for `.NET 9.0`. Also introduced new package versions for targeting `.NET 8.0` and `.NET 9.0` to ensure compatibility and maintainability.
Ensure `WorkerManager` and `TypeTypeConverter` handle invalid inputs gracefully by throwing exceptions. This prevents potential runtime issues caused by null factory types or unresolved type strings.
Updated the `DatabaseProvider` setting in `appsettings.json` from MySQL to SQLite. This change likely simplifies development or testing by using a lightweight, file-based database.
Added support for primitive collections and parameterized collection translation in MySQL EF configurations. Removed redundant `EnablePrimitiveCollectionsSupport` calls in program configuration to centralize the behavior.
Add support for EF Core primitive collections in MySQL by specifying `EnablePrimitiveCollectionsSupport()` in the DbContext configuration. Updated the Docker Compose file to rename the MySQL volume and adjusted appsettings.json to include a MySQL connection string and set MySQL as the default database provider.
Added a check to avoid unnecessary operations when the removed list is empty in the ReplaceAsync method. This prevents potential redundant calls and ensures more efficient execution.
This update enables deserialization of JSON nodes into ExpandoObject via ObjectConverter. It improves type handling and interoperability with dynamic structures.
Updated to use `Http:BaseUrl` for backward compatibility with `Hosting:BaseUrl`. Simplified ApiUrl construction by removing redundant configuration keys and standardizing the behavior using `ApiPrefix`.
Updated to separate ApiUrl from BaseUrl in appsettings for clarity. Modified references in _Host.cshtml and Program.cs accordingly to streamline configuration and reduce potential for errors.
Switched the default database provider from PostgreSQL to SQLite in the appsettings.json configuration file. This change enables the application to use SQLite for its database operations.
Updated the `StringData` property to allow null values, improving flexibility and aligning with usage scenarios where the property may not always contain a value. This change ensures better handling of optional data.
Introduce a new integration test to verify workflow serialization functionality, ensuring that newly created workflow definitions can be serialized and deserialized correctly. Adjust default nullability for certain fields in `WorkflowDefinition` to improve consistency and prevent null reference issues. Minor argument update in `New` method of `WorkflowDefinitionPublisher`.
Reformatted the `Directory.Packages.props` file to improve readability and ensure consistent indentation. This change has no impact on functionality but enhances maintainability and code clarity.
Dropped .NET 6 support and upgraded projects to .NET 8 and .NET 9 frameworks. Updated several package dependencies to their latest stable or preview versions to ensure compatibility and leverage improvements.
Added 'published' to the release type triggers in the packages.yml file. This ensures workflows are triggered for both prereleased and published release events.
Added logic to cancel child activities during activity cancellation. Removed redundant bookmark removal logic in the `Fork` activity for better clarity and efficiency.
Removed unused workflow event handlers and simplified signal usage. Marked the flaky `DispatchAndWaitWorkflow_ShouldWaitForChildWorkflowToComplete` test for review and fixing. This improves maintainability and prepares for future test stability work.
The test 'DispatchAndWaitWorkflow_ShouldWaitForChildWorkflowToComplete' was marked as flaky and skipped to prevent instability in the suite. It should be revisited and fixed to ensure reliable execution.