Commit graph

4968 commits

Author SHA1 Message Date
Marius Vasile Vușcan c2161d057a
Added missing functionalities from main as part of the blueberry merge 2025-03-12 13:34:57 +02:00
Sipke Schoorstra 414d18ee80
Refactor YugabyteDB connection configuration.
Removed unnecessary `With()` method in `UsePostgreSql` for YugabyteDB. This simplifies the configuration and ensures consistency across database providers.
2025-03-11 14:23:18 +01:00
Marius Vasile Vușcan 3007344236
Merge branch 'refs/heads/main' into blueberry
# Conflicts:
#	Directory.Packages.props
2025-03-11 12:41:07 +02:00
Sipke Schoorstra 5be82dd9ab
Add support for Citus and YugabyteDB integration
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.
2025-03-11 11:19:59 +01:00
Marius Vasile Vușcan 2d26b21774
Fixed from the master merge 2025-03-10 15:52:10 +02:00
Marius Vasile Vușcan c4048fad4d
Merge branch 'refs/heads/main' into blueberry
# Conflicts:
#	.github/workflows/packages.yml
#	Directory.Packages.props
#	samples/aspnet/Elsa.Samples.AspNet.EntityFrameworkCore.PostgresSql/Elsa.Samples.AspNet.EntityFrameworkCore.PostgresSql.csproj
#	src/Directory.Build.props
#	src/apps/Elsa.Server.LoadBalancer/Elsa.Server.LoadBalancer.csproj
#	src/apps/Elsa.ServerAndStudio.Web/Elsa.ServerAndStudio.Web.csproj
#	src/apps/Elsa.Studio.Web/Elsa.Studio.Web.csproj
#	src/apps/ElsaStudioWebAssembly/ElsaStudioWebAssembly.csproj
#	src/bundles/Elsa.Server.Web/Elsa.Server.Web.csproj
#	src/clients/Elsa.Api.Client/Elsa.Api.Client.csproj
#	src/clients/Elsa.Api.Client/Extensions/DependencyInjectionExtensions.cs
#	src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationPlan.cs
#	src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationPlanParams.cs
#	src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationWorkflowInstanceFilter.cs
#	src/clients/Elsa.Api.Client/Resources/Alterations/Responses/RunRequest.cs
#	src/modules/Elsa.Common/Elsa.Common.csproj
#	src/modules/Elsa.Dapper/Elsa.Dapper.csproj
#	src/modules/Elsa.Expressions/Elsa.Expressions.csproj
#	src/modules/Elsa.Http/Activities/SendHttpRequestBase.cs
#	src/modules/Elsa.Http/Elsa.Http.csproj
#	src/modules/Elsa.MassTransit.AzureServiceBus/Handlers/RemoveOrphanedSubscriptions.cs
#	src/modules/Elsa.MassTransit/Services/MassTransitWorkflowDispatcher.cs
#	src/modules/Elsa.ProtoActor/Mappers/WorkflowExecutionResultMapper.cs
#	src/modules/Elsa.ProtoActor/Proto/Shared.proto
#	src/modules/Elsa.ProtoActor/Proto/WorkflowInstance.Messages.proto
#	src/modules/Elsa.Quartz.EntityFrameworkCore.PostgreSql/Elsa.Quartz.EntityFrameworkCore.PostgreSql.csproj
#	src/modules/Elsa.Quartz/Elsa.Quartz.csproj
#	src/modules/Elsa.Workflows.Core/Contexts/StorageDriverContext.cs
#	src/modules/Elsa.Workflows.Runtime.ProtoActor/Extensions/ProtoOutputExtensions.cs
#	src/modules/Elsa.Workflows.Runtime/Activities/ExecuteWorkflow.cs
#	src/modules/Elsa.Workflows.Runtime/Features/WorkflowRuntimeFeature.cs
#	src/modules/Elsa.Workflows.Runtime/Handlers/ResumeExecuteWorkflowActivity.cs
#	src/modules/Elsa.Workflows.Runtime/HostedServices/WorkflowInboxCleanupHostedService.cs
#	src/modules/Elsa.Workflows.Runtime/Services/DefaultWorkflowRuntime.cs
#	test/component/Elsa.Workflows.ComponentTests/Scenarios/ExecuteWorkflows/ExecuteWorkflowsTests.cs
#	test/component/Elsa.Workflows.ComponentTests/Scenarios/ExecuteWorkflows/Workflows/MainWorkflow.cs
#	test/component/Elsa.Workflows.ComponentTests/Scenarios/ExecuteWorkflows/Workflows/SubroutineWorkflow.cs
#	test/integration/Elsa.Workflows.IntegrationTests/Scenarios/WorkflowCancellation/ProtoActorTests.cs
2025-03-10 15:13:26 +02:00
Sipke Schoorstra 82a1ae0126
Merge pull request #6481 from KnibbsyMan/bug/editor-autocomplete-issue
Bug - Update Scripting Activities To Resolve Auto Complete Issues
2025-03-10 08:58:03 +01:00
Sipke Schoorstra 7caaad5a8f
Merge pull request #6480 from bobhauser/6479-fix-flowjoin-waitany-with-backward-connection
Fixes issue with FlowJoin(WaitAny) where activities can be executed multiple times
2025-03-10 08:56:41 +01:00
Sipke Schoorstra 8dca671ae2
Merge pull request #6478 from elsa-workflows/bug/composite-activity-serialization
Fix serialization of composite activities
2025-03-10 08:54:42 +01:00
Sipke Schoorstra 744fdf6283
Merge pull request #6476 from elsa-workflows/enh/dynamic-variables
Add support for passing initial variables
2025-03-10 08:54:31 +01:00
Sipke Schoorstra 540365db70
Merge pull request #6467 from MatthijsKrempel/feature/configfix
Harmonized launchSettings to be inline with appSettings
2025-03-10 08:51:20 +01:00
Matt 13bc8eef8a Update scripting activities to set the DefaultSyntax to allow autocomplete to work correctly with new PR. 2025-03-09 19:47:46 +00:00
Bob Hauser 6a42857f22 Fixes issue with FlowJoin(WaitAny) where activities can be executed multiple times 2025-03-08 19:59:55 -05:00
Sipke Schoorstra d19fc6e976
Enable optional OpenTelemetry tracing configuration.
Added a feature flag (`useOtel`) to conditionally enable OpenTelemetry tracing. This allows developers to toggle tracing for debugging or testing without affecting the default behavior.
2025-03-08 22:03:13 +01:00
Sipke Schoorstra 1d7fd81b3e
Fix serialization of composite activities
Fixes that composite activities' Root property (by means of the `JsonIgnoreCompositeRootConverterFactory`) does not get serialized, just like the `WorkflowDefinitionActivity`.

Composite activities added to a workflow should not include their children when being serialized.
2025-03-08 21:50:43 +01:00
Sipke Schoorstra 66123a7dc8
Add support for passing initial variables
Introduce the ability to pass variables into workflow invocations. Updates include adding variables to workflow execution options, requests, and scheduling logic. This enhancement allows dynamic variable management during workflow execution and instance creation.
2025-03-08 11:47:58 +01:00
Sipke Schoorstra cebf60de35
Add SetDynamicVariable method to support dynamic variable creation
This new method enables adding dynamic variables to the appropriate variable container if no predefined variable exists. It ensures flexibility in handling variables within the activity execution context while maintaining logical consistency. Minor formatting adjustments were also applied to improve code readability.
2025-03-08 11:08:21 +01:00
Sipke Schoorstra 9b5b6cd947
Patch ObjectConverter
Patched `ObjectConverter` from the main branch, fixing a serialization bug with the workflow instance variable storage driver.
2025-03-07 20:29:29 +01:00
Sipke Schoorstra a9eb326c5e
Update bulk delete endpoints and request model
Refactor the bulk delete endpoint to include a new primary route while deprecating the old one. Expand the request model to support workflow definition filters and adjust response instantiation for clarity. Update obsolete API route prefix guidance for consistency across modules.
2025-03-07 10:04:41 +01:00
Raymond den Haan 5a3be276e0 Update HTTP resiliency configuration
Removed outer timeout since it was not working in the current set-up
Reduced maximum retry attempts to reduce the maximum amount of time spent on the request
2025-03-06 12:04:02 +01:00
Raymond den Haan eb89f78632 Update retry configuration to retry up to 4 minutes 2025-03-05 14:52:30 +01:00
Matthijs Krempel 730a77a71a Harmonized launchSettings to be inline with appSettings 2025-03-04 11:48:06 +01:00
Sipke Schoorstra 44b61aa24e
Add HttpContextAccessor to service registration
HttpContextAccessor is now included in the service container to enable dependency injection for accessing HTTP context. This improves support for features that require context details during runtime.
2025-03-03 19:13:51 +01:00
Sipke Schoorstra f71fbd23c7
Simplify HttpRequestException handling in retry logic.
Replaced specific transient status code check for HttpRequestException with a more generalized handling approach. This ensures all HTTP exceptions are retried, improving robustness and simplifying the logic.
2025-03-03 16:47:06 +01:00
Sipke Schoorstra 7b4cb375de
Adjust timeout and backoff calculations in HTTP pipeline.
Updated comments to correct total delay and grace period calculations for clarity and accuracy. This ensures consistency in expected retry behavior and improves maintainability.
2025-03-03 11:05:16 +01:00
Sipke Schoorstra 96075cca99
Add reference to Polly retry documentation in comments
Added a link to the Polly retry strategy documentation for clarity and future reference within the resiliency pipeline builder code. This improves code maintainability and helps developers quickly access relevant information.
2025-03-03 10:55:13 +01:00
Sipke Schoorstra ed5649091d
Reduce retry attempts and adjust timeout configuration
Lowered MaxRetryAttempts from 6 to 4 and reduced the outer timeout to 60 seconds to align with the updated exponential backoff total of 32 seconds. These changes aim to improve efficiency and reduce unnecessary waiting time during transient failures.
2025-03-03 10:53:32 +01:00
Sipke Schoorstra 9d19db09cf
Increase retry attempts and adjust delay/backoff configuration.
Updated the retry logic by increasing the max retry attempts from 4 to 6 and reducing the delay per attempt to 1 second. Adjusted the outer timeout to accommodate the new backoff configuration, allowing for a longer retry grace period.
2025-03-03 10:34:55 +01:00
Sipke Schoorstra c777add558
Update retry logic and timeout settings for HTTP requests
Increased max retry attempts to 4, removed jitter, and adjusted delay and backoff settings for clearer and more predictable behavior. Extended outer timeout to align with retry duration and added 409 Conflict to transient errors. Simplified logic for identifying transient network failures.
2025-03-03 10:30:39 +01:00
Sipke Schoorstra 13d7e91e0d
Remove agent-related configurations and dependencies.
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.
2025-03-02 16:08:51 +01:00
Sipke Schoorstra 74a1c50f66
Remove Agents projects
Deleted Agents projects. These projects are being migrated to elsa-integrations.
2025-03-02 15:55:29 +01:00
Sipke Schoorstra 42ab1a8944
Merge branch 'main' into feat/4832 2025-03-02 14:50:21 +01:00
Bob Hauser 3371a2f6ab Based on default scheduling, DefaultBookmarkQueuePurger logs two low value information entries every 10 seconds. 2025-02-26 15:10:41 -05:00
Sipke Schoorstra 793bab0032
Add OpenTelemetry.Console Exporter package
Added the OpenTelemetry.Console Exporter (v1.11.1) to the project dependencies. This enables console-based telemetry exporting for improved observability and debugging.
2025-02-25 20:16:30 +01:00
Sipke Schoorstra 265254ec5b
Merge pull request #6427 from elsa-workflows/feat/otel-error-codes
Add OpenTelemetry error span handling infrastructure
2025-02-25 15:42:24 +01:00
Sipke Schoorstra f45388fbfc
Remove unnecessary whitespace in SendHttpRequestBase.cs
Cleaned up extra blank lines in the code to improve readability and maintain consistent formatting. These changes do not impact functionality or behavior of the code.
2025-02-24 22:32:32 +01:00
Sipke Schoorstra 6ba50020fe
Add HTTP resiliency support using Polly and pipeline builder
Introduce configurable resiliency mechanisms for HTTP requests, including retries, circuit breakers, and timeouts, leveraging Microsoft.Extensions.Resilience and Polly. Refactor `SendHttpRequestBase` to include an `EnableResiliency` input and encapsulate resiliency logic in a dedicated pipeline. Update project references to include necessary dependencies.
2025-02-24 22:30:56 +01:00
Sipke Schoorstra a24ca0435f
Refactor projects to target .NET 8.0 exclusively.
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.
2025-02-24 22:29:51 +01:00
Sipke Schoorstra 43157fb6d6
Remove Azure Service Bus integration and related tests
Deleted the entire Azure Service Bus module, including activities, configurations, tests, and supporting code. This removal eliminates features like message handling workflows, queue/topic providers, and unit testing utilities for Azure Service Bus.
2025-02-23 23:43:15 +01:00
Sipke Schoorstra 33d291cfcc
Add webhook configuration and support to Elsa Server
Integrated webhook sinks via appsettings.json for handling "Run Task" events. Enabled webhook functionality in the application pipeline and added the necessary project reference for Elsa.Webhooks. This enhances event-driven capabilities and improves extensibility.
2025-02-23 21:40:15 +01:00
Sipke Schoorstra 361b644a75
Refactor WebhooksFeature to streamline configuration.
Simplified the configuration of sinks, sources, and HTTP clients by using direct actions instead of service-level options. Updated Apply method to finalize configurations and added notification handlers for better extensibility. Improved code readability and maintainability by consolidating logic and removing unnecessary dependencies.
2025-02-23 21:38:43 +01:00
Sipke Schoorstra 7aabfb6d0b
Remove Elsa.OrchardCore module.
Deleted the entire Elsa.OrchardCore module, including all its associated activities, handlers, services, and extensions. This removes support for integrations with Orchard Core application instances.
2025-02-23 20:10:16 +01:00
Sipke Schoorstra b9e9459e94
Remove Telnyx module from the codebase
Eliminated all source files related to the Telnyx module, including activities, payloads, extensions, and models. This effectively deprecates Telnyx-related functionalities from the system in favor of the new Elsa.Integrations.Telnyx module in the [elsa-integrations](https://github.com/elsa-workflows/elsa-integrations) repo.
2025-02-23 14:47:19 +01:00
Sipke Schoorstra 78c6df152e
Refactor and clean up Connections API and Core components
Removed unused code, optimized imports, and updated method signatures for better null-safety and consistency. Consolidated redundant logic, improved error handling in endpoints, and applied modern syntax and practices across the Connections module.
2025-02-23 14:07:32 +01:00
Sipke Schoorstra e2ec2e47b4
Add Connections modules and update dependencies.
Added new Connections modules to the solution and updated project references to include necessary dependencies. Also modified DictionaryExtensions to return null as the default value instead of default. Removed an unused JavaScript helper import to streamline the code.
2025-02-23 13:46:59 +01:00
Sipke Schoorstra 271bc959bb
Merge branch 'main' into enh/Connections 2025-02-23 13:27:40 +01:00
Sipke Schoorstra ef1f5f5b3a
Merge pull request #6406 from bobhauser/update-flowchart-scheduling
Update flowchart activity scheduling, implicit join (and FlowJoin/WaitAll) now only waits for followed connections
2025-02-23 11:10:30 +01:00
Sipke Schoorstra 3a9ab2c9fa
Rename variable for clarity in heartbeat generator logic.
The variable `livenessThreshold` was renamed to `inactivityThreshold` to better reflect its purpose and improve code readability. This change ensures consistency with the surrounding context and enhances maintainability.
2025-02-22 21:27:15 +01:00
Sipke Schoorstra e64ee01cdd
Replace 'default' with 'null' for optional parameters
Updated method signatures to replace 'default' with 'null' for better clarity and explicit handling of optional parameters. Additionally, refined comments and variable naming to improve readability and accuracy.
2025-02-22 21:24:25 +01:00
Sipke Schoorstra 83744f1f17
Fix workflow execution context flag after activity execution
Previously, the `WorkflowExecutionContext.IsExecuting` flag was incorrectly set to `true` after an activity executed, causing potential logic inconsistencies. This change ensures the flag is correctly set to `false`, maintaining the expected workflow state.
2025-02-22 20:50:36 +01:00