* Ongoing MongoDB work
* Refactor MongoDB serializer configuration and improve type handling
- Added `BsonSerializerHelpers` for streamlined serializer registration with error handling.
- Introduced `ConfigureMongoDbSerializers` hosted service to centralize serializer setup.
- Enhanced `FlowScopeSerializer` to handle additional BSON types.
- Cleaned up and reorganized MongoDB feature implementations, removing redundant code and improving consistency.
* Remove `BsonSerializerHelpers` and update MongoDB serializer registration
- Deleted `BsonSerializerHelpers` as it was redundant.
- Updated `ConfigureMongoDbSerializers` to directly register serializers using `BsonSerializer`.
- Simplified `FlowScopeSerializer` null handling for improved readability.
* Switch persistence provider to Entity Framework Core in `Program.cs`.
* Update src/modules/Elsa.MongoDb/Serializers/FlowScopeSerializer.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Configures MongoDB services and options.
Configures MongoDB services, including client and database creation.
Registers default naming strategy and collection naming strategy.
Adds BsonClassMap configuration for KeyValuePair.
* Simplify null check in `FlowScopeSerializer`.
* Allow `FlowScopeSerializer` to handle nullable `FlowScope`.
* Registers FlowScope BSON class map
Registers the `FlowScope` class with BSON to enable proper serialization and deserialization of workflow scopes within MongoDB.
This ensures that workflow scopes, which are used to manage variables within a workflow, are correctly stored and retrieved from the database.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Converted `CheckList` and `CheckListItem` to records,
adding XML documentation for clarity. Updated properties
in `CheckListProps`, `RadioList`, and `RadioListItem`
with similar changes. Enhanced documentation in
`DropDownOptionsProviderBase` and modified
`RadioListOptionsProviderBase` to reflect new
functionality. Overall improvements for readability
and maintainability.
- Renamed `CheckList` to `RadioList` in `RadioListProps`.
- Updated `WorkflowsFeature` to include `RadioListUIHintHandler` and `StaticRadioListOptionsProvider`.
- Introduced `TestRadioList` class for executing radio list functionality.
- Created `RadioList` and `RadioListItem` classes for managing radio list items.
- Added `RadioListOptionsProviderBase` for custom radio list data logic.
- Implemented `StaticRadioListOptionsProvider` for static radio list options.
* Adds activity test-run endpoint
Adds an API endpoint to facilitate testing of individual activities within a workflow.
The endpoint allows developers to execute a specific activity within a given workflow definition.
Also ensures latest workflow definition is marked when publishing.
* Enables activity test run to return results
Updates the activity test run endpoint to return activity execution results such as outputs, outcomes, exceptions, and status.
This allows users to inspect the results of test runs for activities, providing valuable insights into their behavior.
* Add activity testing API integration and activity test UI support
Introduced `ITestsApi` and supporting models for activity testing in workflows. Updated the UI to support triggering and displaying activity test results, including handling outcomes, outputs, exceptions, and status. Additionally, updated dependency injection for the new API and adjusted the project references.
* Refactor workflow test endpoints and update method parameters
Updated the namespace and route for activity test endpoints from `TestRun` to `Tests/Activities`. Adjusted default parameter values in `WorkflowDefinitionHandle` method for improved consistency.
* Introduce `ActivityTestRunner` to streamline activity testing
Adds a new `IActivityTestRunner` interface and its implementation, simplifying the execution of individual workflow activities for testing purposes. Updates dependencies and refactors activity test endpoints to use the new service.
* Update `ActivityTestRunner` to support variable test values
Enhanced the `ActivityTestRunner` to include functionality for injecting test-specific variable values when executing workflow activities. Added a helper method `GetVariableTestValues` to retrieve and deserialize test variable data from custom properties.
* Update `Tests/Activities` endpoint to include `ActivityState`
Refactored the response model to replace `Outcomes` with `ActivityState` and `Payload`, ensuring more detailed activity execution results.
* Add draft saving and saved notifications for workflow definitions
* Add draft saving notification handling in cache evictions
Integrates handling for `WorkflowDefinitionDraftSaving` and `WorkflowDefinitionDraftSaved` events within the workflow cache eviction service, ensuring definitions are properly evicted.
* Refactor `ConfigureLiquidEngine` to simplify variable enumeration logic
* Remove redundant `<returns>` tag from `ByDefinitionVersionId` method XML documentation
* Refactor `Tests/Activities` endpoint documentation and constructor
Updated XML documentation to clarify endpoint responsibilities and adjusted constructor by removing an unused dependency (`IIdentityGenerator`).
Refactors the background alteration job dispatcher to use a service scope
to resolve the alteration job runner. This ensures that the runner
is resolved within a scope, allowing it to utilize scoped services.
- Introduced `HealActivity` alteration type for resolving faulted activity states.
- Added `HealActivityHandler` to manage execution of `HealActivity`.
- Enhanced `WorkflowExecutionContextExtensions` with `FindActivityExecutionContexts` method for locating activity execution contexts based on provided handles.
- Updated `AlterationHandlerContext` to enable custom commit actions during `Succeed` calls.
- Registered `HealActivity` and its handler in alteration services.
- Upgraded `ElsaStudioVersion` to `3.5.0-preview.1092`.
Reordered query operations to ensure consistent execution of `OrderBy` before `Paginate`, improving clarity and maintaining the expected query behavior.
Standardize package version references by renaming `Microsoft` to `MicrosoftVersion` and introducing `ResilienceVersion`. Adjust all relevant package declarations to use the updated property names.
* Update package versions in Directory.Packages.props
Upgraded multiple package dependencies to latest versions, ensuring compatibility, security, and access to the newest features.
* Refactor mediator pipeline to support tenant context propagation
- Introduced `TenantPropagatingMiddleware` to handle tenant context propagation during command execution.
- Added `SetupMediatorPipelines` hosted service for configuring mediator pipelines.
- Enhanced `CommandPipeline` and builder to allow middleware insertion, removal, and reordering.
- Updated `CommandContext` and related components to support headers for tenant context handling.
- Improved logging and refactored `BackgroundWorkflowDispatcher` to include tenant headers during command dispatch.
* Fix typos in XML documentation and improve middleware extension clarity
- Corrected duplicated slashes in XML doc comments in `ICommandSender.cs`.
- Refined phrasing in `MiddlewareExtensions.cs` to clarify method parameters and improve readability.
* Update src/common/Elsa.Mediator/Middleware/Command/Components/CommandLoggingMiddleware.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Reduce default logging verbosity in appsettings.json
* Commit workflow state during alteration execution
Added `ICommitStateHandler` dependency and implemented workflow state commitment in `DefaultAlterationRunner` to ensure state persistence during alteration execution.
* Refactor query composition to ensure consistent ordering and pagination logic.
Reordered method calls for `OrderBy` and `Paginate` across multiple stores to enhance readability and maintain consistent execution. Simplified redundant query operations for improved clarity and performance.
* Updates Elsa Studio version to 3.4.0
Updates the Elsa Studio version to the stable release.
Removes the preview tag from the version number.
* Move `ElsaStudioVersion` property to `Directory.Packages.props` for centralized management.
* Update package versions
Updated multiple package versions to their latest release, including `Polly`, `Elastic.Clients.Elasticsearch`, `System.Text.Json`, and others.
* Remove duplicate package entry
* Fix case mismatch in package name for SQL Server migration dependency.
* Add `Proto.Cluster.AzureContainerApps` package version to dependencies
* Update Directory.Packages.props
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Introduced a "Clear Test Value" button in the EditVariableTestValueDialog to allow clearing variable test values. Extended the WorkflowDefinition logic to handle clearing variable test values and updated related UI elements for consistency.
Introduced new properties in `TestActivityResponse` to better manage activity state and payload. Updated the test run UI to display detailed status, state, outcomes, and outputs using separate data panels. Refactored backend logic to improve data organization and ensure a clear separation of responsibility within the `UpdateDataModels` method.
Introduced a dialog to edit test values for workflow variables. Enhanced the workflow definition to support storing and retrieving variable test values. Updated the UI to display and manage test values with clear visual cues.
Introduced `ITestsApi` and supporting models for activity testing in workflows. Updated the UI to support triggering and displaying activity test results, including handling outcomes, outputs, exceptions, and status. Additionally, updated dependency injection for the new API and adjusted the project references.
Updates the activity test run endpoint to return activity execution results such as outputs, outcomes, exceptions, and status.
This allows users to inspect the results of test runs for activities, providing valuable insights into their behavior.
Adds an API endpoint to facilitate testing of individual activities within a workflow.
The endpoint allows developers to execute a specific activity within a given workflow definition.
Also ensures latest workflow definition is marked when publishing.
Converted `CheckList` and `CheckListItem` to records,
adding XML documentation for clarity. Updated properties
in `CheckListProps`, `RadioList`, and `RadioListItem`
with similar changes. Enhanced documentation in
`DropDownOptionsProviderBase` and modified
`RadioListOptionsProviderBase` to reflect new
functionality. Overall improvements for readability
and maintainability.
Configures the application to use SQLite as the default database provider.
Removes the logger dependency from the EFCoreActivityExecutionStore, simplifying the constructor.