Upgraded Elsa Studio packages to version 3.5.0-preview.925 and updated page titles to reflect the new version. Added `Microsoft.AspNetCore.Components` dependency to `ElsaStudioWebAssembly.csproj` for improved component support. These changes ensure consistency and enhance application functionality.
Upgraded Elsa.Studio-related package versions from 3.4.0-preview.918 to 3.5.0-preview.922. This ensures the project uses the latest features and fixes available in the updated preview release.
Upgraded Elsa-related packages to version 3.4.0-preview.918 to include the latest features and improvements. Added the `Microsoft.AspNetCore.Components` package to align with other ASP.NET updates in the project.
* Enable DbContext pooling and refactor DI scopes
Added support for using DbContext pooling with a configurable option. Refactored to use scoped service providers for better isolation and lifecycle management. Updated persistence feature base to integrate sensitive data logging and warning configurations.
* Update package management and Elsa Studio version references
Centralized package versioning remains enabled, while unused package references and conditional groups for specific .NET targets are removed for simplification. Elsa Studio version is upgraded from 3.3.0-rc4 to 3.4.0-rc1.
* Simplify DbContextOptions setup logic
Removed conditional compilation and unused code to streamline the DbContextOptions configuration. This improves maintainability and ensures consistent behavior across frameworks. Sensitive data logging is no longer explicitly enabled here.
Added and updated multiple package references, including OpenTelemetry, Datadog.Trace.Bundle, and various Microsoft.Extensions libraries. This ensures compatibility with the latest dependencies and introduces enhanced features for resilience and tracing.
Upgraded multiple NuGet package dependencies to their latest versions to ensure compatibility, security, and improved functionality. These updates span across various libraries and frameworks used in the project.
Introduced Docker Compose configurations for Citus and YugabyteDB clusters and updated connection strings in `appsettings.json`. Modified `Program.cs` to enable Entity Framework Core support for both databases and updated the `SqlDatabaseProvider` enum accordingly. Adjusted the Docker Compose setup and bumped `Yarp.ReverseProxy` package version.
Bump the System.Linq.Dynamic.Core package to the latest preview version. This ensures compatibility with the latest features and fixes provided in the updated package. No other changes were made.
This commit removes the "Agents" configuration section, related API keys, services, and persistence logic across the codebase. Unused agent-related NuGet packages and code references were also eliminated to simplify the project and focus on core functionality.
Added the OpenTelemetry.Console Exporter (v1.11.1) to the project dependencies. This enables console-based telemetry exporting for improved observability and debugging.
Dropped support for .NET 6.0 and .NET 7.0 by removing multi-targeting configurations. Updated dependencies to use versions compatible with .NET 8.0, ensuring consistency across all projects. This simplifies maintenance and aligns with the latest .NET standards.
Introduced OpenTelemetry tracing with AlwaysOnSampler and console exporter, integrated into the Elsa framework. Added error handling capabilities via custom `IErrorSpanHandler` implementations. Updated project dependencies to include OpenTelemetry-related packages.
Upgraded the Oracle.EntityFrameworkCore package from version 8.23.70 to 9.23.60. This update ensures compatibility with newer features and resolves any potential issues fixed in the latest release. No changes were made to other package versions.
Updated various NuGet package dependencies to their latest available versions for improved stability, performance, and compatibility. The changes span multiple libraries, including Azure, FastEndpoints, and Microsoft.EntityFrameworkCore packages. This ensures the project remains up-to-date with the latest enhancements and bug fixes.
Replaced InputProxy with alternative implementations, adding flexibility to handle inputs. Introduced a JsonElementConverter to deepen JavaScript and JSON element integration. Enhanced testing and object conversion logic, improving type handling and support for complex JSON scenarios.
Added support for configuring Hangfire job storage per database provider, including PostgreSql, SQLite, and SQL Server. Introduced new methods for flexible Hangfire setup, while marking older APIs and storage configuration extensions as obsolete. Refactored related configurations for streamlined and centralized job scheduling logic.
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.
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.
Change WebhooksCore package version from 0.0.1-preview.17 to 0.0.1 to ensure use of the stable release. This update is intended to improve stability and readiness for production environments. Other package versions remain unchanged in this commit.
This commit introduces a schema registry functionality by adding interfaces and classes to manage schema registry definitions in the Elsa.Kafka module. It updates KafkaOptions to include schema registries and modifies classes to support schema registry configurations for producers and consumers. Additionally, it updates package references to include necessary dependencies for schema registry support.
* Work in progress: Add DefaultTenantService for tenant management
Introduce `DefaultTenantService` and its corresponding interface `ITenantService` to manage tenant operations such as finding, getting, and listing tenants. Update `MultitenantBackgroundService` to utilize `DefaultTenantService` for handling tenant lifecycle events. This enhancement standardizes tenant operations and improves the maintainability of the multitenancy feature.
* WIP
* Add multitenancy event handlers and task interfaces
Implemented new interfaces IBackgroundTaskStarter and ITaskExecutor to manage task lifecycle events efficiently. Introduced new classes such as RunBackgroundTasks, RunStartupTasks, and StartRecurringTasks for handling tenant activation and deactivation events. Modified TaskExecutor to implement these interfaces and adjusted tenant registration logic to invoke these new handlers.
* Refactor multitenancy and task management services.
Remove background and recurring task runners, and integrate tenant activation and deactivation into the multitenancy feature. Enable multitenancy in the server application and create a new service for tenant activation and deactivation. This refactor simplifies the management of tenant-specific tasks and enhances the modularity of the platform.
* Refactor background service to use startup tasks
Replaced hosted service implementation with startup tasks for executing multi-tenant tasks and EF Core migrations. Introduced `PriorityAttribute` to manage task execution order, ensuring migrations run before other services that require database access. This simplifies tenant activation with an ordered task execution and removes redundant classes.
* Refactor MultitenancyFeature service registrations
Reorganized service registrations for better clarity and maintainability. Changed the registration of some services to use factory delegates for retrieving existing services to ensure correct dependencies. This refactor improves the flexibility of the tenant lifecycle event handling.
* Update V3_3 migration files
* Add tenant management endpoints and enhance tenant handling
Implemented tenant management endpoints including Add, Get, List, and Update. Enhanced tenant handling by introducing configuration and store-based providers, and improved error logging for tenant updates. Adjusted various internal functionalities to better support multitenancy features through different persistence providers.
* Implement tenant deletion endpoint and refactor migration setup.
Introduce a new API endpoint to handle tenant deletions while providing appropriate responses based on successful or unsuccessful attempts. Refactor migration handling by replacing startup tasks with hosted services across various modules to streamline the migration execution process.
* Add and integrate ConfigurationJsonConverter
Introduce a `ConfigurationJsonConverter` to handle JSON serialization and deserialization of `IConfiguration` objects. This change centralizes configuration serialization logic, leading to cleaner and more maintainable code. Updated various parts of the codebase to use the new serialization utility, ensuring a consistent approach throughout the application.
* Refactor JSON conversion and update tenant endpoint.
Removed unused workflow references and streamlined JSON handling in `ConfigurationJsonConverter`. Simplified tenant ID handling by removing `IIdentityGenerator` and setting a default value for `UpdatedTenant.Id`.
* Add logging for cancelled recurring tasks
Integrated ILogger to log information when a recurring task is canceled due to an OperationCanceledException. This change enhances troubleshooting by providing clearer insights into task cancellations and their underlying reasons, improving maintainability and observability of the task execution process.
* Disable multitenancy support and adjust default Tenant ID.
Multitenancy is now disabled by setting 'useMultitenancy' to false in the configuration. Additionally, the default Tenant's ID has been changed from null to an empty string to prevent potential null reference issues.
* Remove MultitenantHostedService abstraction file
The MultitenantHostedService.cs file was removed as it is no longer necessary. Its responsibilities have likely been refactored or integrated into another service, indicating a simplification or restructuring of the multitenancy handling in the codebase.
* Rename PriorityAttribute to OrderAttribute for clarity.
This change improves the clarity of the code by renaming PriorityAttribute to OrderAttribute, reflecting its actual purpose. All occurrences of the attribute in the codebase have been updated accordingly to maintain consistency. This makes the intent of the code more understandable for future maintenance and development.
* Fix message key retrieval in ProduceMessage activity
Update the ProduceMessage activity to use GetOrDefault for retrieving the message key. This change ensures that a null key is used if no explicit key is provided or if the key is empty or whitespace, preventing potential errors during message production.
* Refactor multitenancy and scheduling services.
Removed DefaultTenantContextInitializer interface and class, refactored tenant activation/deactivation to use try-catch logging, and updated tenant context handling to use IDisposable for context push. New activities and workflows added in Elsa.Server.Web, and scheduling services enhanced to schedule jobs with explicit job keys and groups. Also, adjusted configurations to enable multitenancy, providing improved maintainability and flexibility.
* Remove Example1 activities and disable multitenancy
Deleted Example1Activity, Example1Workflow, and FirstActivity classes to clean up unused code and simplify the codebase. Disabled multitenancy by setting useMultitenancy to false, likely to streamline configuration and resource utilization.
* Fix and normalize URL path concatenation.
Ensure that the base URLs in both base path providers consistently end with a forward slash. This normalization prevents potential issues with endpoint routing and path concatenation, improving overall URL construction robustness.
Changed the default base URL in _Host.cshtml for local development. Upgraded Elsa.Studio package versions to 3.3.0-preview.630. Disabled Kafka usage in Program.cs.
* Add Kafka module with integration and example setup
Introduced the Kafka module providing consumer integration and activities into the project. This includes new classes for consumer handling, configuration, and activities. An example setup using Docker Compose is also added to facilitate development and testing.
* Refactor KafkaTransportMessage to inline Timestamp namespace
Simplify the namespace usage for the Timestamp type within the KafkaTransportMessage record. This change eliminates the need for a separate using directive for Timestamp, enhancing code readability and maintainability.
* Add support for handling Kafka transport messages
This commit introduces the capability to handle and trigger workflows based on Kafka transport messages. It adds a new handler, notifications, and updates the message stimulus to include correlating fields. Additionally, the Kafka consumers are now managed more modularly with updated startup tasks and mediator integration.
* Enable Kafka integration and fix Kafka options naming
Added support for Kafka integration in Elsa.Server.Web by setting up Kafka configurations in appsettings.json and updating Program.cs. Also, renamed `ConsumerConfigs` to `ConsumerDefinitions` in Kafka options for clarity.
* Add consumer definition enumeration and dropdown support
Introduced `IConsumerDefinitionEnumerator` for managing consumer definitions across providers and implemented in `ConsumerDefinitionEnumerator` class. Enhanced `KafkaFeature` to register these services and updated the `MessageReceived` activity to use a dropdown UI hint for consuming definitions. Improved `StartConsumersTask` by refactoring consumer definition retrieval logic.
* Add SendMessage activity and refine Kafka messaging
Introduce a new SendMessage activity for Kafka, enabling message publishing to specific topics. Refine KafkaTransportMessage model by removing headers and timestamp fields. Adjust the StimulusSender logic to streamline the bookmark queuing process and fix key-value pairing in dropdown options. Update appsettings for corrected Kafka bootstrap server and topic configurations.
* Add producer and topic management support
Introduced interfaces and implementations for managing producer and topic definitions along with their respective enumerators and list providers. Updated `SendMessage` activity to include producer selection and refactored consumer definition providers for better consistency.
* Refactor Kafka configuration property names
Renamed Kafka configuration properties for better consistency and readability across the codebase. Updated property names from `ProducerDefinitions` to `Producers`, `ConsumerDefinitions` to `Consumers`, and `TopicDefinitions` to `Topics`. Added missing input attribute in `SendMessage.cs` and registered additional handlers in `KafkaFeature.cs`.
* Add custom serializers for Kafka message handling
Introduced `DefaultSerializers` class for custom serialization and deserialization of Kafka messages. Updated `MessageReceived` and `SendMessage` activities to use these custom serializers, and modified `KafkaOptions` to include them.
* Fix ExpandoObject serialization method parameter
Changed the serialization type from `ExpandoObject` to the actual type of the object to ensure proper serialization. This ensures that derived types are correctly handled during the serialization process.
* Add Producer and Consumer workflows for Kafka
Introduced two new workflows: `ProducerWorkflow` and `ConsumerWorkflow` for handling Kafka messages. Updated `DefaultSerializers` to use camelCase property naming and modified `appsettings.json` to include `topic-2` and format entries.
* Add JSON serialization to log output in ConsumerWorkflow
This change enhances the log output by serializing messages to JSON format before writing them. The addition of System.Text.Json ensures that the message content is presented in a structured and standardized format in logs.
* Add correlation strategies and update Kafka features
Implemented HeaderCorrelationStrategy and NullCorrelationStrategy, and updated KafkaFeature to support customizable correlation strategies. Added correlation ID handling to Kafka transport messages and updated config and handlers accordingly.
* Add tenant accessor to ConsumerDefinitionWorkflowContextProvider
Integrated ITenantAccessor to the provider to support tenant-specific context loading. Updated the constructor and LoadAsync method to retrieve the tenant information and use it for context-specific operations.
* Switch to MySQL and disable Kafka
This commit changes the SQL database provider from SQLite to MySQL and disables Kafka use. It also includes necessary adjustments such as adding MySQL handling in configuration and connection setups, updating `docker-compose` to include MySQL services, and referencing MySQL projects in the `.csproj` file.
* Add UI property handlers to multiple features
This commit introduces various UI property handlers across several features such as Python, JavaScript, CSharp, and Workflow features to enhance user interface property handling. It also updates the property UI handler resolution logic to better manage cases where providers are not available. Furthermore, adjustments were made in the server configuration to switch database providers and enable Kafka.
* Refactor property UI handler retrieval logic
Modified the logic to fetch property UI handlers by preloading them into a list and then filtering. This change improves readability and potentially performance by reducing repetitive service provider calls.
* Incremental work on Kafka workers and predicate evaluation
* Merge BookmarkInvoker with BookmarkResumer
* Register IWorkerManager
* Change lifetime scope of WorkerManager to Singleton
* **Introduce topic subscription handling for Kafka workers**
Added `IWorkerTopicSubscriber` interface and its implementation for managing topic subscriptions. Enhanced workers to bind triggers and bookmarks dynamically based on existing data. Updated several classes and methods to support topic-based subscriptions and headers.
* Refactor trigger matching logic.
Extract trigger matching conditions into `IsMatchAsync` method for reuse. This enhances code maintainability and readability by reducing redundancy. The new `GetTopic` helper method isolates the topic retrieval logic.
* Add Name property to MassTransitActivityTypeProvider
This commit inserts the Name property in the returned object within the MassTransitActivityTypeProvider class. It ensures that the typeName is included, providing a clearer definition of the activity type.
* Add handling for deleted bookmarks and refactor bookmark removal
Added a new event handler for `BookmarksDeleted` to ensure removed bookmarks are processed correctly. Refactored the bookmark removal logic into a helper method to reduce code duplication and streamline the workflow.
* Switch to asynchronous bookmark queue processing
Refactored the `TriggerWorkflows` handler to use `IBookmarkQueue` instead of directly invoking the `IBookmarkResumer`. This change aims to improve scalability by queueing bookmark resumption requests, enabling better load distribution and async processing. Added necessary helpers and configuration options to support this functionality.
* Remove unused IBookmarkResumer dependency
Simplify the constructor by removing the unused IBookmarkResumer dependency. This cleanup reduces potential confusion and improves code maintainability without impacting functionality.
* Add support for local message processing
Introduced an `IsLocal` property to `MessageReceivedStimulus` for determining if the message event is local to a specific workflow instance. Updated `BookmarkBinding` and related handler methods to utilize `CorrelationId` for local event matching. Removed unused `CorrelatingFields` from `MessageReceived` activity.
* Add nullability checks to IWorker retrieval methods
Updated `GetWorker` methods to return nullable `IWorker` to handle cases where a worker might not exist. Modified code to include null checks and conditional operations to prevent potential null reference exceptions when accessing worker methods.
* Add filtering based on activity type name for triggers and bookmarks
This commit introduces filtering for triggers and bookmarks based on the `MessageReceived` activity type name. It also adds an option to mark messages as local in the `SendMessage` activity, where local messages are delivered to the current workflow instance only. These changes help enhance the management and targeted delivery of messages within the workflow framework.
* Add new Kafka topics and clean up producers config
New topics "topic-3" and "topic-4" were added to the Kafka settings. Unused topic references were removed from the producers configuration to simplify and improve clarity.
* Add predicate to KafkaConsumerActivity in ConsumerWorkflow
Introduced a predicate to the KafkaConsumerActivity using JavaScript expressions to filter messages based on OrderId. This ensures only relevant messages are processed in the workflow.
* Regenerate 3.3 EF Core migrations
* Refactor variable handling in API responses.
Updated `ApiResponseExtensions` to handle potential null issue flagged by ReSharper. Refactored `Endpoint.cs` in WorkflowInstances to use `ResolvedVariableModel` for better type safety and clarity.
* Add API endpoint to retrieve workflow variables
Introduce a new endpoint to get workflow instance variables in `IWorkflowInstancesApi`. Added `ResolvedVariable` model and adjusted `WorkflowInstances` endpoint to return a list of these variables.
* Add endpoint for updating workflow instance variables
Introduce a new API endpoint to update workflow instance variables using the DefaultWorkflowInstanceVariableWriter. Also creating the necessary interfaces and classes, and renaming existing ones for consistency.
* Add IWorkflowInstanceVariableManager interface and implementation
Introduce the IWorkflowInstanceVariableManager interface and its implementation, enabling variable management for workflow instances. Refactor existing endpoints to utilize this new manager, streamlining the variable retrieval and update processes.
Streamlined the used namespaces across multiple files by removing unnecessary imports. Added the Scrutor package to the project dependencies for dependency injection uses.
* Update dependencies and refactor MongoDB usages to IQueryable
Updated MongoDB-related methods to use IQueryable instead of IMongoQueryable for better compatibility and cleaner code. Additionally, upgraded several dependencies and packages to newer versions, ensuring enhanced security and performance.
* Remove TargetFramework from MongoDb project file
The TargetFramework property has been removed from Elsa.MongoDb.csproj. This change is likely to allow for a more flexible build configuration or to delegate framework specification to a higher-level configuration.
* Update package versions in _build.csproj
Upgraded Azure.Identity to 1.13.1, NuGet.Packaging to 6.11.1, and Microsoft.Identity.Client to 4.66.1. These updates address vulnerabilities and ensure compatibility with dependencies.
Upgrade various packages to their latest versions to address vulnerabilities and improve stability. This includes updates to Microsoft.Extensions, EntityFrameworkCore, and Npgsql among others.
* Add tenant awareness to bookmark handling and route resolution
Added tenant ID support across various components, including bookmark updates, route resolution, and middleware processing. This ensures that bookmark and route operations can now appropriately handle tenant-specific data, improving the system's multitenancy capabilities.
* Add Multitenant HTTP Routing feature to Tenants module
Introduced a new MultitenantHttpRoutingFeature class to the Elsa.Tenants.AspNetCore module, enhancing the tenant resolution capabilities. Moved RoutePrefixTenantResolver from Elsa.Http to Elsa.Tenants.AspNetCore and updated relevant project references and namespaces accordingly. This refactor improves modularity and separation of concerns between HTTP and tenancy features.
* Refactor route handling and tenant configuration
Removed redundant `RouteTableExtensions` and replaced with new route providers and updaters, enhancing flexibility and modularity. Introduced tenant-specific HTTP endpoint configurations for better customization and configuration management.
* Rename HttpEndpointBookmarkStimulus to HttpEndpointBookmarkPayload
Refactor various classes and methods to reflect the renaming from `HttpEndpointBookmarkStimulus` to `HttpEndpointBookmarkPayload`. Add and configure new extension methods for tenant route handling, update the route provider to support multi-tenancy, and adjust the tenants provider to bind configuration properly.
* Add HeaderTenantResolver and refactor Http namespace.
Introduce HeaderTenantResolver to resolve tenants via HTTP headers. Refactor multiple classes and interfaces to move from the Elsa.Http.Models namespace directly into Elsa.Http for clarity and consistency.
* Add Host-based tenant resolution
Implemented a HostTenantResolver to resolve tenants based on the request's host and updated tenant configurations with host information. Modified the tenant resolver pipeline and added the new host resolver to the service registrations.
* Add tenant-aware caching and accessor support
Enhanced caching by incorporating tenant identifiers into cache keys for more granular cache management. Introduced ITenantAccessor dependencies in various services to retrieve the current tenant information. This ensures that cache entries are correctly isolated per tenant.
* Reorder tenant resolvers for pipeline setup.
Reordered the tenant resolvers in the pipeline to prioritize HostTenantResolver before RoutePrefixTenantResolver. This ensures that tenant resolution is correctly aligned with host-based resolving before checking the route prefix.
* Remove unused imports
This commit eliminates redundant `using` directives across multiple files to streamline the codebase. This cleanup helps improve code readability and maintainability by removing unnecessary dependencies.
Replaced hardcoded version of System.Text.Json with a variable. Added Microsoft.AspNetCore.DataProtection.Abstractions package for the net8.0 target framework.
Updated the System.Text.Json package to version 8.0.5 across multiple projects to address security vulnerabilities and ensure consistency. Additionally, modified the Directory.Packages.props to reflect the new version and added necessary overrides in various csproj files.