Commit graph

6237 commits

Author SHA1 Message Date
Sipke Schoorstra 181038fb71
Merge pull request #6435 from elsa-workflows/feat/4832
Add workflow restart functionality for handling interruptions
2025-03-02 14:58:33 +01:00
Sipke Schoorstra 42ab1a8944
Merge branch 'main' into feat/4832 2025-03-02 14:50:21 +01:00
Sipke Schoorstra 2aab2e0147
Merge pull request #6452 from bobhauser/stop-default-bookmark-queue-purger-log-spamming
Stop DefaultBookmarkQueuePurger log spamming
2025-03-02 14:48:53 +01:00
KnibbsyMan 08b8a46190 Remove unnecessary code comments and code tidy. 2025-03-02 12:37:36 +00:00
Sipke Schoorstra 0ceeb801e7
Add support for naming workflow instances during execution
This update introduces a `Name` property to workflow execution requests, allowing workflows to be named when started. The changes ensure the `Name` is propagated through the relevant services and endpoints, improving tracking and identification of workflow instances.
2025-03-02 11:28:56 +01:00
Sipke Schoorstra 27fe72d123
Add WorkflowInstanceName property to Globals
Introduces a new property, `WorkflowInstanceName`, to access and modify the name of the current workflow instance. Also simplifies object initialization by using target-typed new expressions. Annotates the `Globals` class with `[UsedImplicitly]` to improve code analysis.
2025-03-02 11:24:21 +01:00
Sipke Schoorstra 549b4709d0
Add functions to get and set workflow instance name
Introduce `getWorkflowInstanceName` and `setWorkflowInstanceName` functions to the scripting engine. This enables retrieving and updating the workflow instance name dynamically during script execution. Additionally, the related function definitions have been added to the provider.
2025-03-02 11:22:03 +01:00
Sipke Schoorstra 046b88f5d2
Improved support for named workflow instances
Introduced the ability to set and persist custom names for workflow instances. Updated relevant classes, services, and tests to ensure proper handling of the `Name` property.
2025-03-02 11:17:18 +01:00
KnibbsyMan 9fce06b957 Adds expression support for SQL activities. 2025-03-01 23:05:27 +00: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 b2d3fd9fda
Add configuration for default incident handling strategy
Configured `IncidentOptions` to set `DefaultIncidentStrategy` to `ContinueWithIncidentsStrategy`. This ensures consistent handling of workflow incidents and improves customization flexibility for incident management.
2025-02-26 14:53:18 +01: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 7145eae294
Merge pull request #6447 from elsa-workflows/enh/send-http-request-activity-resilience
Add Resiliency to HTTP Request Activity
2025-02-25 15:41: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 e89d071d9b
Merge pull request #6443 from elsa-workflows/remove-azure-service-bus
Remove Azure Service Bus integration and related tests
2025-02-23 23:43:53 +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 ce0ea7e680
Update package and remove obsolete project entry
Upgraded `System.Formats.Asn1` to version `9.0.2` to address vulnerabilities. Removed the obsolete "nuke" project entry and associated files from the solution to clean up unused references. These changes enhance security and streamline the project structure.
2025-02-23 23:38:48 +01:00
Sipke Schoorstra 6616043b0a
Merge pull request #6440 from elsa-workflows/bug/webhooks
Refactor WebhooksFeature to streamline configuration.
2025-02-23 21:41:16 +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 a8e5a97f93
Merge pull request #6438 from elsa-workflows/task/remove-orchard-core
Remove Elsa.OrchardCore module.
2025-02-23 20:10:51 +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 28ad3b3ed7
Merge pull request #6437 from elsa-workflows/task/remove-telnyx
Remove Telnyx module from the codebase
2025-02-23 14:48:01 +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 6f5b7e77d6
Merge pull request #6291 from jdevillard/enh/Connections
FEAT : Connection/Secret provider/handler to define generic configuration for Activities
2025-02-23 14:07:55 +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 05bfebd4d1
Add 'feat/*' branch pattern to workflow triggers
This update ensures that feature branches are included in the workflow triggers, improving automation coverage. It aligns the workflow configuration with the branching strategy.
2025-02-22 21:29:11 +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
Sipke Schoorstra dd92fa097c
Add migration files for database schema V3.4
This commit introduces migration files for multiple database providers (MySQL, SQL Server, PostgreSQL, SQLite, and Oracle) to support schema changes for version 3.4. The migrations primarily involve mapping entity schemas, indexes, and table structures for consistency across all supported database systems.
2025-02-22 20:48:56 +01:00
Sipke Schoorstra 3beedb9ec0
Refactor activity execution state tracking
Introduce `IsExecuting` flag to explicitly track activity execution state, improving clarity and control over workflow activity handling. Adjust scheduling intervals and add concurrency handling for database updates to enhance reliability and performance in interrupted workflows.
2025-02-22 19:45:44 +01:00
Sipke Schoorstra 3c0ab8b172
Rename 'pulse' to 'heartbeat' in WorkflowHeartbeat logic.
The terminology has been updated from 'pulse' to 'heartbeat' for consistency and clarity. This affects method names, logging messages, and related variable names. The change improves code readability and aligns with the intended functionality.
2025-02-22 16:33:13 +01:00
Sipke Schoorstra 090b5678bd
Add ISystemClock dependency to WorkflowHeartbeatMiddleware
Replaced the retrieval of ISystemClock from the context with direct dependency injection. This improves clarity and reduces unnecessary dependencies on the execution context for service resolution.
2025-02-22 16:31:11 +01:00
Sipke Schoorstra 037b82dc49
Update inactivity threshold and adjust related timings
Renamed 'WorkflowLivenessThreshold' to 'InactivityThreshold' for clarity and updated its usage across affected files. Adjusted timings for workflow restarts and delays to improve consistency, including increasing task delay and updating scheduler intervals. These changes enhance readability and align with revised task execution timelines.
2025-02-22 16:22:33 +01:00
Sipke Schoorstra 3bbb057378
Set WorkflowHeartbeatMiddleware logging level to Debug
This change updates the logging configuration to include Debug-level logs for WorkflowHeartbeatMiddleware. It helps in better monitoring and debugging of workflow heartbeat operations.
2025-02-22 16:15:12 +01:00
Sipke Schoorstra a3a82916af
Log heartbeat pulse generation in debug level
Add a debug-level log message to indicate when the heartbeat pulse is generated. This improves traceability and helps in diagnosing runtime behavior during development and debugging.
2025-02-22 16:08:54 +01:00
Sipke Schoorstra 5ae23ce7e5
Add Workflow Heartbeat Middleware and update methods
Introduce `WorkflowHeartbeatMiddleware` to monitor workflow liveness and update timestamps during execution. Extend WorkflowInstanceStore implementations to support updating the `UpdatedAt` timestamp across various data stores. Enhance Dapper query builder and workflow execution pipeline with related functionality.
2025-02-22 16:05:36 +01:00
Sipke Schoorstra 0a21b5201a
Add workflow restart functionality for handling interruptions
Introduced a mechanism to identify and restart interrupted workflows. This includes a new `IWorkflowRestarter` contract, its default implementation, and a recurring task for handling restarts. Additionally, updated configurations and added extensions to improve workflow instance filtering and liveness tracking.
2025-02-22 15:10:52 +01:00
Sipke Schoorstra 7ea01370e6
Merge pull request #6429 from elsa-workflows/bug/disable-inbox-cleanup
Enable configurable toggle for workflow inbox cleanup job
2025-02-21 10:36:52 +01:00
Sipke Schoorstra d7900efb31
Enable configurable toggle for workflow inbox cleanup job
Introduced an `IsEnabled` property in `WorkflowInboxCleanupOptions` to allow enabling or disabling the cleanup service. Updated related logic to respect this configuration, removing the redundant `_enableWorkflowInboxCleanupJob` field. Ensures easier management of the inbox cleanup feature via configuration.
2025-02-20 21:25:03 +01:00
Sipke Schoorstra 7261cd8443
Add OpenTelemetry tracing and error handling enhancements
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.
2025-02-20 20:34:07 +01:00
Sipke Schoorstra 07119c8ff5
Add OpenTelemetry error span handling infrastructure
Introduce infrastructure for handling error spans with OpenTelemetry, including `DefaultErrorSpanHandler` and `FaultExceptionErrorSpanHandler`. Define core abstractions (`ErrorSpanHandlerBase`, `IErrorSpanHandler`) and utilities for customizing OpenTelemetry integration. This enables improved error tracing and categorization in workflows.
2025-02-20 20:33:55 +01:00
Sipke Schoorstra ae676cf8e9
Merge pull request #6412 from pkaaz/bug/6409-correlationId-for-bookmark-queue
Add CorrelationId to NewBookmarkQueueItem
2025-02-19 15:26:07 +01:00