elsa-core/src/modules
Sipke Schoorstra 9aa239719d
Add IResilienceStrategy Abstraction with Category Matching and Expression-Based Configuration (#6637)
* Add resilience module with core interfaces and services

Introduced a new `Elsa.Resilience` module and its core components to support resilient services and activities. This includes resilience strategies, providers, and attributes, along with integration into the existing HTTP module for enhanced fault tolerance. Added solution and project references for proper dependency management.

* Add resilience strategy framework with HTTP strategy support

Introduced a resilience strategy architecture, including a configurable `HttpResilienceStrategy` with retry capabilities, strategy serialization, and integration with existing modules. Enhanced ResilienceFeature to support registration of strategy types and updated application configuration to enable resilience strategies. This change ensures more robust and fault-tolerant HTTP request handling.

* Add JSON serialization support for resilience configuration

Introduced `ConfigurationExtensions` to enable JSON serialization of configuration sections. Updated resilience strategies to utilize the new extension methods and adjusted JSON serialization logic to support polymorphism with `$type` discriminator. Minor modifications were made to support deserialization and property mutability.

* Add resilience strategy support to workflows and API clients

Introduced resilience strategy configuration, serialization, and execution support across workflows and API clients. Added new APIs, models, and services to enhance fault tolerance capabilities for activities and HTTP interactions.

* Refactor resilience services for improved modularity.

Replaced `IResilienceService` with new modular interfaces (`IResilienceStrategyCatalog`, `IResilienceStrategyConfigEvaluator`, `IResilientActivityInvoker`) and corresponding implementations. Enhanced maintainability by simplifying components and responsibilities, ensuring better separation of concerns.

* Rename methods in ResilienceStrategyCatalog for clarity

Updated method names in `ResilienceStrategyCatalog` and its interfaces for better readability and alignment with naming conventions. Replaced `GetAllStrategiesAsync` with `ListAsync` and `GetStrategyAsync` with `GetAsync` across the codebase.

* Refactor resilience handling in HTTP activities.

Replaced `ResilienceCategory` property with `ResilienceCategoryAttribute` for a cleaner implementation. Updated `IResilientActivity` to simplify its interface and adjusted related modifications accordingly. Introduced `IResilientActivityInvoker` to enhance resilience strategy execution.

* Add support for additional resilience and scripting features

Extended resilience strategy handling with serialization support, added `HttpResilienceStrategy` type in JavaScript handler, and refined object conversion logic for interfaces. Minor adjustments to `Expression` class properties for consistency.

* Remove `UseResilience` call from Program.cs

This call was redundant and no longer necessary for the application. Its removal simplifies the code and ensures only required middleware is used.

* Remove commented-out JSON converter code in serializer setup

Cleaned up unused and commented-out converter initialization code in `ResilienceStrategySerializer`. This improves readability and removes unnecessary clutter from the file.

* Fix typo in method names from 'Resiliency' to 'Resilience'

Renamed methods to maintain consistency in naming conventions across the codebase. This change ensures clarity and alignment with established terminology.

* Refactor namespace for ConfigurationResilienceStrategySource

Updated the namespace of ConfigurationResilienceStrategySource to "StrategySources" for better alignment with naming conventions and structure. Removed an unused namespace reference in ResilienceFeature for cleanup.

* Mark EnableResiliency as obsolete in SendHttpRequestBase.

The EnableResiliency property is now marked with the [Obsolete] attribute. Developers are encouraged to use the common Resilience Strategy setting instead for managing HTTP request resiliency. This change ensures better consistency and alignment with the broader resilience strategy.

* Restrict ResilienceCategoryAttribute to class targets only

Removed support for using ResilienceCategoryAttribute on properties. This change enforces a stricter and more focused usage of the attribute, ensuring it applies only to class-level declarations.

* Add documentation for IResilientActivityInvoker interface

Include summaries and parameter descriptions for the `InvokeAsync` method. This improves code clarity and helps developers understand the functionality and usage of the resilient activity invocation process.

* Fix logical operator precedence in type comparison check

Parentheses were added to ensure correct evaluation of conditions when checking type compatibility. This prevents potential logical errors when determining the target type in object conversions.

* Add support for resilience source identification

Introduce the `ResilienceSourceNameAttribute` to allow naming of resilience sources. Updated `ResilienceStrategyCatalog` to utilize the attribute for prefixing strategy IDs, improving source identification and traceability. Applied the attribute to `ConfigurationResilienceStrategySource` as an example.

* Revert "Add support for resilience source identification"

This reverts commit 19b4e7121d6330b5de4f692b78da4c1e4a2d1f67.

* Reapply "Add support for resilience source identification"

This reverts commit 8bcba9d040c4eb247077aec6d90dc02817adcbd5.

* Revert "Reapply "Add support for resilience source identification""

This reverts commit ee04d35e7930956c752dda3ed150ca34a535e66c.
2025-05-12 10:09:04 +02:00
..
Elsa Refactor code for improved clarity and modern syntax 2025-02-15 00:12:52 +01:00
Elsa.Alterations Fix infinitely waiting Alterations Workflow (#6561) 2025-04-05 10:37:05 +02:00
Elsa.Alterations.Core Merge branch 'refs/heads/main' into blueberry 2025-03-10 15:13:26 +02:00
Elsa.Alterations.MassTransit
Elsa.Caching
Elsa.Caching.Distributed
Elsa.Caching.Distributed.MassTransit
Elsa.Caching.Distributed.ProtoActor
Elsa.Common Add IResilienceStrategy Abstraction with Category Matching and Expression-Based Configuration (#6637) 2025-05-12 10:09:04 +02:00
Elsa.Connections.Api Refactor and clean up Connections API and Core components 2025-02-23 14:07:32 +01:00
Elsa.Connections.Core Implement internal state activity persistence and logging mechanisms (#6601) 2025-04-18 14:29:18 +02:00
Elsa.Connections.Models Refactor and clean up Connections API and Core components 2025-02-23 14:07:32 +01:00
Elsa.Connections.Persistence Refactor and clean up Connections API and Core components 2025-02-23 14:07:32 +01:00
Elsa.Connections.Persistence.EntityFrameworkCore Refactor and clean up Connections API and Core components 2025-02-23 14:07:32 +01:00
Elsa.Connections.Persistence.EntityFrameworkCore.Sqlite ConfigurePermisssions 2025-02-12 23:56:10 +01:00
Elsa.CSharp Merge branch 'main' into enh/workflowinstance-name 2025-03-14 23:03:33 +01:00
Elsa.Dapper Merge remote-tracking branch 'origin/rc/3.4.0' into develop/3.5.0 2025-04-28 19:06:20 +02:00
Elsa.Dapper.Migrations Refactor Fault Propagation and Simplify Bookmark Management (#6545) 2025-04-10 15:01:49 +02:00
Elsa.Dsl
Elsa.Elasticsearch Add Workflow Heartbeat Middleware and update methods 2025-02-22 16:05:36 +01:00
Elsa.Email Add support for ExpandoObject attachments in email sending 2025-01-29 11:24:13 +01:00
Elsa.EntityFrameworkCore Merge remote-tracking branch 'origin/rc/3.4.0' into develop/3.5.0 2025-04-28 19:06:20 +02:00
Elsa.EntityFrameworkCore.Common Merge remote-tracking branch 'origin/rc/3.4.0' 2025-04-16 08:41:04 +02:00
Elsa.EntityFrameworkCore.MySql Refactor Fault Propagation and Simplify Bookmark Management (#6545) 2025-04-10 15:01:49 +02:00
Elsa.EntityFrameworkCore.Oracle Refactor Fault Propagation and Simplify Bookmark Management (#6545) 2025-04-10 15:01:49 +02:00
Elsa.EntityFrameworkCore.PostgreSql Refactor Fault Propagation and Simplify Bookmark Management (#6545) 2025-04-10 15:01:49 +02:00
Elsa.EntityFrameworkCore.Sqlite Refactor Fault Propagation and Simplify Bookmark Management (#6545) 2025-04-10 15:01:49 +02:00
Elsa.EntityFrameworkCore.SqlServer Refactor Fault Propagation and Simplify Bookmark Management (#6545) 2025-04-10 15:01:49 +02:00
Elsa.Environments
Elsa.Expressions Add IResilienceStrategy Abstraction with Category Matching and Expression-Based Configuration (#6637) 2025-05-12 10:09:04 +02:00
Elsa.FileStorage
Elsa.Hangfire Add obsolete ExecuteAsync overloads for job classes 2025-02-07 12:48:30 +01:00
Elsa.Hosting.Management
Elsa.Http Add IResilienceStrategy Abstraction with Category Matching and Expression-Based Configuration (#6637) 2025-05-12 10:09:04 +02:00
Elsa.Identity Add HttpContextAccessor to service registration 2025-03-03 19:13:51 +01:00
Elsa.JavaScript Make input variable names case-insensitive in dictionary (#6590) 2025-04-15 09:51:42 +02:00
Elsa.JavaScript.Libraries
Elsa.Kafka Support for Writing Custom Trigger Activities Using Existing Trigger Infrastructure (#6527) 2025-03-21 23:16:56 +01:00
Elsa.KeyValues
Elsa.Labels
Elsa.Liquid
Elsa.MassTransit Fix MessageReceived not setting Result (#6562) 2025-04-10 15:02:39 +02:00
Elsa.MassTransit.AzureServiceBus Added minor changes to MassTransitFeature to start using MassTransitOptions as the source for the prefetch count as the new source for this information is in the base MassTransitOptions. Created a new ConfigureTransportBus in both RabbitMQ and Azure Service Bus to support the context in the configuration action. Marked the old ConfigureServiceBus to persuade migration over to the contextual action. Currently, it will run the legacy action first and then the new contextual action second. The Elsa.Server.Web was also updated to use the new ConfigureTransportBus. 2025-02-15 13:04:45 -06:00
Elsa.MassTransit.RabbitMq Added minor changes to MassTransitFeature to start using MassTransitOptions as the source for the prefetch count as the new source for this information is in the base MassTransitOptions. Created a new ConfigureTransportBus in both RabbitMQ and Azure Service Bus to support the context in the configuration action. Marked the old ConfigureServiceBus to persuade migration over to the contextual action. Currently, it will run the legacy action first and then the new contextual action second. The Elsa.Server.Web was also updated to use the new ConfigureTransportBus. 2025-02-15 13:04:45 -06:00
Elsa.MongoDb Update package versions and enable MongoDB diagnostics (#6635) 2025-05-07 12:31:21 +02:00
Elsa.OpenTelemetry Refactor OpenTelemetry error handling implementation (#6621) 2025-05-07 10:59:44 +02:00
Elsa.ProtoActor.Core
Elsa.Python Update scripting activities to set the DefaultSyntax to allow autocomplete to work correctly with new PR. 2025-03-09 19:47:46 +00:00
Elsa.Quartz Add support for passing initial variables 2025-03-08 11:47:58 +01:00
Elsa.Quartz.EntityFrameworkCore.MySql
Elsa.Quartz.EntityFrameworkCore.PostgreSql Merge branch 'refs/heads/main' into blueberry 2025-03-10 15:13:26 +02:00
Elsa.Quartz.EntityFrameworkCore.Sqlite
Elsa.Quartz.EntityFrameworkCore.SqlServer
Elsa.Resilience Add IResilienceStrategy Abstraction with Category Matching and Expression-Based Configuration (#6637) 2025-05-12 10:09:04 +02:00
Elsa.Resilience.Core Add IResilienceStrategy Abstraction with Category Matching and Expression-Based Configuration (#6637) 2025-05-12 10:09:04 +02:00
Elsa.Retention Catch exceptions and log instead of crashing (#6477) 2025-03-18 19:27:04 +01:00
Elsa.SasTokens
Elsa.Scheduling Merge remote-tracking branch 'origin/rc/3.4.0' into develop/3.5.0 2025-04-28 19:06:20 +02:00
Elsa.Secrets.Api
Elsa.Secrets.Core
Elsa.Secrets.Management
Elsa.Secrets.Models
Elsa.Secrets.Persistence.EntityFrameworkCore
Elsa.Secrets.Persistence.EntityFrameworkCore.PostgreSql
Elsa.Secrets.Persistence.EntityFrameworkCore.Sqlite
Elsa.Secrets.Persistence.EntityFrameworkCore.SqlServer
Elsa.Secrets.Scripting
Elsa.Sql Updates error handling to allow null values to be passed to the query. Errors are now thrown for when no matching properties are found. 2025-03-16 16:42:32 +00:00
Elsa.Sql.MySql Simplify SqlEvaluator implementation and tidy code. 2025-03-16 00:44:35 +00:00
Elsa.Sql.PostgreSql Simplify SQL client implementations to reduce repetitive code. 2025-03-15 01:51:42 +00:00
Elsa.Sql.Sqlite Simplify SqlEvaluator implementation and tidy code. 2025-03-16 00:44:35 +00:00
Elsa.Sql.SqlServer Simplify SqlEvaluator implementation and tidy code. 2025-03-16 00:44:35 +00:00
Elsa.Tenants
Elsa.Tenants.AspNetCore Add customizable tenant header support for HTTP routing 2025-02-09 08:24:55 +01:00
Elsa.Webhooks Refactor WebhooksFeature to streamline configuration. 2025-02-23 21:38:43 +01:00
Elsa.WorkflowContexts
Elsa.WorkflowProviders.BlobStorage
Elsa.Workflows.Api Merge remote-tracking branch 'origin/rc/3.4.0' into develop/3.5.0 2025-04-28 19:06:20 +02:00
Elsa.Workflows.Core Add IResilienceStrategy Abstraction with Category Matching and Expression-Based Configuration (#6637) 2025-05-12 10:09:04 +02:00
Elsa.Workflows.Management Add IResilienceStrategy Abstraction with Category Matching and Expression-Based Configuration (#6637) 2025-05-12 10:09:04 +02:00
Elsa.Workflows.Runtime Merge remote-tracking branch 'origin/rc/3.4.0' into develop/3.5.0 2025-04-28 19:06:20 +02:00
Elsa.Workflows.Runtime.Distributed Refactor workflow instance creation and execution logic. (#6586) 2025-04-14 11:57:14 +02:00
Elsa.Workflows.Runtime.ProtoActor Extended the incidents data to include the activityNodeId (#6570) (#6572) 2025-04-10 14:10:56 +02:00