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.
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.
* 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>
Configures the application to use SQLite as the default database provider.
Removes the logger dependency from the EFCoreActivityExecutionStore, simplifying the constructor.
Refactored `TriggerStore` to implement pagination and ordering for `FindManyAsync` methods with support for tenant-agnostic filtering. Modified app settings to change database provider to SQL Server and adjusted logging levels to reduce verbosity. Fixed workflow cancellation service to better handle child instances tasks.
* Update SqlEvaluator expression keyword resolver for using variables. Changes from 'Variables.' to 'Variable.' to match other properties singular naming convention.
* Fix substring index for variable retrieval.
* Add logging to DefaultActivityExecutionMapper constructor
Introduced an ILogger dependency to DefaultActivityExecutionMapper and added a debug log statement in GetPersistableDictionary. This aids in tracking log persistence mode for improved debugging and state visibility.
* Simplify activity execution log mapping logic.
Replaced asynchronous mapping with synchronous mapping to simplify the logic flow. This change reduces task overhead and improves code clarity while maintaining functionality.
* Update activity execution mapping and comment out unused method
Replaced direct dictionary usage with a cloned dictionary to ensure data integrity in `DefaultActivityExecutionMapper`. Commented out an unused method in `ActivityExecutionExtensions` to suppress its execution for now.
* Add logging to ActivityExecutionLogStore for property tracking
Integrate ILogger to track and log details of activity execution records, specifically focusing on properties and their serialization. This enhancement improves debugging and provides better insights into the execution flow.
* Introduce Metadata field for activity execution handling
Replaces the use of Properties with Metadata across activity execution models and services for storing lightweight, persistent data. Updated serialization, database schema, and relevant APIs to support this change while ensuring backward compatibility. Adjusted logging and extension methods for Metadata integration.
* Reset V3.5 Runtime Migrations
* Add EF Core migrations for MySQL and SQL Server schema updates
Introduced migrations to support schema changes for MySQL and SQL Server. Changes include new columns for bookmarks and activity execution records, updates to existing columns, and creation of additional indexes. These updates aim to enhance database structure and query performance.
* Add support for metadata in workflow execution context
Introduce a `Metadata` property to `ActivityExecutionContextState` to enhance workflow state management. Updated `WorkflowStateExtractor` to handle metadata merging and preservation. Added an alias for `RetryAttemptRecordList` in `ExpressionOptions` for improved type handling.
* Remove logger dependency from DefaultActivityExecutionMapper
Eliminated the ILogger dependency and related logging calls from DefaultActivityExecutionMapper to simplify the class. This reduces unnecessary coupling and streamlines the activity execution mapping process.
Introduced new methods to enable ordered and paginated querying of triggers across various trigger store implementations. This includes the addition of `StoredTriggerOrder` to support custom ordering logic and updates to interfaces and stores to integrate this functionality.
Replaced direct implementation of `IPropertyUIHandler` with a new `PropertyUIHandlerBase` abstract class to simplify UI handler management and introduce a priority mechanism. Removed outdated `SampleWorkflow` and `SlowActivity` code to clean up the repository. Introduced a custom checklist options provider and registered it within the application services.
Integrated `designer.css` from `Elsa.Studio.Workflows.Designer` into the `_Host.cshtml` files to ensure proper styling for workflow designer components. This update enhances the appearance and functionality of the workflows designer across relevant web pages.
Improved handling of retry attempt records by leveraging a conversion helper method. This ensures type safety and simplifies the code for better readability and maintainability. Also includes minor formatting adjustments.
* Update default initializations and input parameters to `null`
Replaced `default!` with explicit `null` for input parameters and properties throughout various classes. Adjusted constructors' default values for consistency and readability. This change ensures better clarity and alignment with nullable reference types.
* Add Polly-based resilience integration for retry tracking
Introduce Polly diagnostics to log retry events in the execution context. Updated resilience strategy interfaces and implementations to support Polly's context and retry event tracking.
* Refactor resilience and retry handling, add flaky endpoint.
Removed custom Polly-based diagnostic listeners and observers in favor of a transient status code utility class. Introduced a mock "flaky" endpoint for testing failure scenarios and updated configuration for resilience strategies. Minor namespace fixes
* Add retry attempt recording to resilience feature
Introduce `IRetryAttemptRecorder` and its implementations to enable recording of retry attempts during activity execution. Updated `ResilientActivityInvoker` to persist retry attempts and modified `ResilienceFeature` to support configurable retry attempt recorders.
* Add retry attempt tracking and retrieval functionality
Introduced mechanisms to track and fetch retry attempts, including new interfaces, reader implementations, API endpoints, and related models. These enhancements improve resilience tracking and data access for activity execution across workflows.
* Add GetOutcome method to RetryAttempt model
Introduce a GetOutcome method to encapsulate logic for determining the retry attempt's outcome. It prioritizes the Result, falls back to the Exception message, or defaults to "Unknown" if neither is available. This improves clarity and reusability of the outcome evaluation.
* Add scoped registration for _retryAttemptReader
This change ensures that _retryAttemptReader is registered in the DI container as a scoped service.
* Refactor retry mechanism to support detailed retry metadata
Introduced a `CollectRetryDetails` method to `IResilientActivity` for enhanced retry data collection. Updated `RetryAttemptRecord` to include a `Details` dictionary for capturing metadata, replacing previous `Result` and `Exception` fields. These changes simplify the retry recording process and improve extensibility for tracking retry details across activities.
* Add support for capturing background activity properties
Introduced functionality to capture and persist background activity properties during workflow execution. This includes defining a key for properties, capturing them in middleware, and storing them in the workflow execution context. These changes ensure properties are handled consistently alongside other activity data.
* Add support for storing and propagating activity execution properties
Introduced a `Properties` dictionary to track additional metadata in activity execution records and stats, enabling richer diagnostics and tracing. Refactored resilience logic to improve retry handling and propagate retry-related flags in workflows. Enhanced database queries to map serialized properties for execution summaries.
* Add retry propagation for background activity execution
Introduced a mechanism to propagate the retry-attempted flag across activity execution contexts. Added a new notification `BackgroundActivityExecutionCompleted` and updated related middleware to send this notification. Enhanced resilience features to handle and propagate retry state effectively.
* Refactor default parameters and values to use 'null'.
Replaced 'default' with 'null' for optional parameters and values in `AddExecutionLogEntry`, improving clarity and ensuring semantic consistency with nullable types. No functional changes were introduced.
* Refactor flaky endpoint and enhance resilience support.
Replaced the "Flaky" endpoint with a more robust "SimulateResponseEndpoint" under a new module. Introduced a status code lookup utility and improved resilience strategies with configurable backoff types. Updated serialization to support enum conversions and enhanced caching behavior for response simulation.
* Update activity execution models with nullable properties
Replaced `default!` initializations with `null!` to ensure correct handling of nullable string properties in `ActivityExecutionRecord`. Added a new `Properties` dictionary to `ActivityExecutionRecordSummary` to store additional activity execution data. This enhances model flexibility and data extensibility.
* Add support for recording resilience strategy in context
Introduced a new method to store resilience strategy details in the activity execution context for enhanced diagnostics. Updated `ResilientActivityInvoker` to serialize and set the resilience strategy using this method, leveraging `JsonSerializer`.
* Remove redundant PropertyNamingPolicy assignment
The PropertyNamingPolicy was set to the default value (CamelCase), making the assignment unnecessary. This change simplifies the code while maintaining existing functionality.
* Set JSON property naming policy to camelCase
Updated JSON serialization settings to use camelCase naming for property names. This improves consistency with standard JSON naming conventions and ensures compatibility with camelCase-based APIs.
* Remove unused Endpoints folder reference from project file
The Endpoints folder reference in the project file was unnecessary and has been removed. This cleanup helps maintain a tidy and accurate project structure.
* Remove unused RetryAttemptFilter and add Polly packages
Removed the obsolete RetryAttemptFilter class as it was no longer in use. Added Polly and Polly.Extensions packages to the project to support resilience and fault-handling strategies. This update aligns with keeping dependencies relevant and reducing unused artifacts.
* Add resilience integration test for FlowSendHttpRequest (#6692)
* Refactor and fix resilience test cases for clarity and accuracy
Simplified imports, adjusted code structure, and corrected attempt indexing logic in resilience tests. These changes improve readability, maintainability, and ensure accurate validation of retry attempts in test scenarios.
Replaced hardcoded ElsaStudio version values with a centralized `ElsaStudioVersion` property. This ensures easier version management and reduces duplication across the project.
Integrate the ElsaIdentity service into the application to enhance identity management features. This change complements the login module and ensures a more cohesive and extensible authentication setup.
Allow derived classes to override the GetUIPropertiesAsync method by marking it as virtual. This change enhances flexibility and customization for implementations of DropDown and CheckList options providers.
Introduce a `RefreshOnChange` property for dynamic UI updates and a virtual method `GetUIPropertyAdditionalOptions` for adding custom options. These changes improve extensibility and enable developers to better control checklist behavior.
Introduced a `RefreshOnChange` property to `DropDownOptionsProviderBase`, enabling dynamic UI updates for dropdown options. Simplified `ConnectionOptionsProvider` by overriding `RefreshOnChange` and removing redundant code.
Updated default property values across activities to use `null!` instead of `default!`, ensuring clearer nullability intent. Also adjusted constructor parameter defaults to `null` for consistency.
Updates several package versions to their latest available releases.
This ensures that the project benefits from the latest features,
bug fixes, and security updates provided by the respective libraries.
Increase base_version to 3.4.1 and update branch filtering to match the new patch release naming convention. This ensures the workflow correctly handles the latest release process.
Added missing braces to improve readability and consistency in conditional statements for stimulus dispatch logic. Ensures better maintainability and alignment with coding standards.
The `WorkflowAsActivityInternal_ShouldHonorSettings_WhenExecuting` test is marked with `[Fact(Skip)]` due to intermittent failures. The issue appears unclear, despite the functionality working as expected in practice.
* Await HTTP resume callbacks
* Update HttpEndpoint.cs
* Update HttpEndpointActivityExecutionContextExtensions.cs
* Refactor to use `WaitForHttpRequestAsync` consistently.
Replaced `WaitForHttpRequest` with `WaitForHttpRequestAsync` across the codebase to align with asynchronous naming conventions. This change improves clarity and maintains consistency in method naming.
* Add 'codex/*' branch to workflow path filters
This update ensures that actions in the workflow are triggered for changes in branches following the 'codex/*' naming convention. It aligns the path filters with the branching strategy and improves CI/CD coverage.
The ReadLine activity was removed as it can cause hanging containers when awaiting user input. This change requires explicit opt-in for its usage, improving default workflow behavior and avoiding unintended issues.
This update ensures that actions in the workflow are triggered for changes in branches following the 'codex/*' naming convention. It aligns the path filters with the branching strategy and improves CI/CD coverage.
Replaced `WaitForHttpRequest` with `WaitForHttpRequestAsync` across the codebase to align with asynchronous naming conventions. This change improves clarity and maintains consistency in method naming.
Changed the ElsaStudioVersion to a new preview version and referenced it consistently in package definitions. This ensures centralized management of the version and supports the updated preview release.
Replaced direct query filter setup with a dedicated method for cleaner and more readable tenant ID filtering logic. Removed unnecessary dependencies and improved code consistency by aligning naming conventions and simplifying expressions.
* Refactor BookmarkQueueSignaler to use Channel for signaling.
Replaced TaskCompletionSource with a bounded Channel to improve concurrency control and simplify the code. This change ensures better handling of multiple producers while maintaining a single reader model.
* Refactor BookmarkQueueWorker to improve resilience and clarity
Replaced Debouncer with Throttler for rate limiting and added error handling to log exceptions and ensure the worker loop continues safely while allowing proper shutdown on cancellation.
* Handle missing workflow instance during bookmark resumption
Add exception handling for `WorkflowInstanceNotFoundException` to handle cases where the workflow instance does not exist. Log a debug message and return `ResumeBookmarkResult.NotFound()` when such instances are encountered. This ensures better error management and logging for bookmark resumption.
* Refactor default initializations and rename completion methods.
Replaced `default!` with `null!` for input properties to improve clarity and consistency. Renamed methods to better reflect their purpose, changing `CheckIfCompletedAsync` to `AttemptToCompleteAsync`. These changes enhance code readability and maintainability.
* Refactor to use specific exceptions for workflow errors
Replaced generic `InvalidOperationException` with `WorkflowInstanceNotFoundException` and `WorkflowGraphNotFoundException` for improved error context. This enhances clarity and enables more precise error handling.
* Change default value of WorkflowInstanceId to null
Updated the property `WorkflowInstanceId` to use `null!` instead of `default!` to better align with nullable reference type semantics. This ensures clarity and consistency in the codebase regarding expected default values.
* Add handling for WorkflowInstanceSaved in SignalBookmarkQueueWorker
Updated the SignalBookmarkQueueWorker to implement INotificationHandler for WorkflowInstanceSaved. This ensures that workflow instance save events now trigger the bookmark queue worker, improving event handling consistency.
* Update comment to clarify bookmark and workflow instance check
Expanded the comment to explain that the queue item is stored not only when a bookmark is missing but also when the associated workflow instance is not yet in the database. This improves clarity for future maintainers regarding queuing conditions.