Removed subStatus parameter from ValidateStatusTransition method to simplify its usage. Also, eliminated redundant UseBackgroundActivities call in WorkflowExecutionPipelineBuilderExtensions to streamline the pipeline configuration.
This change integrates the MyEvent activity into the Elsa Workflow engine configuration. It ensures that the MyEvent activity is available for workflows in the console application. This setup is essential for utilizing custom events within the application's workflow definitions.
This commit changes the ElsaStudioVersion property from 3.2.0-rc3 to 3.2.0-rc4.473 in the Directory.Build.props file. This update ensures compatibility with the latest features and bug fixes in the new release candidate version.
Corrected the serializer reference from `_payloadSerializer` to `payloadSerializer` in `WorkflowDefinitionStore.cs`. This change ensures that the correct serializer instance is used when serializing `WorkflowDefinitionState`.
The packages.yml file was modified to use version 3.2.0-rc4 instead of 3.2.0-rc3. This change ensures that the latest pre-release version is correctly set during the workflow execution.
* Refactor workflow context extension structure
Removed unused WorkflowContextWorkflowDefinitionExtensions and renamed several extension and middleware classes for clarity and consistency. Simplified context provider type handling using JsonArray in custom properties.
* Refactor context provider and update email workflow
Refactored `CustomerWorkflowContextProvider` to use constructor parameter directly, removing redundant fields and constructors. Updated comments and list syntax in `CustomerCommunicationsWorkflow`. Improved README.md documentation for workflow contexts and context providers.
* Adjust logging levels and improve workflow logic
Modified `appsettings.json` to reduce the verbosity of logging by adjusting log levels. Updated `CustomerCommunicationsWorkflow` to include a timer activity and simplified the workflow context parameter setting.
* Remove PropertyBag and related functionalities.
Deleted the PropertyBag class and extension methods, and removed all instances where PropertyBag was utilized across various modules. This simplifies the workflow configuration and management by relying solely on CustomProperties for storing metadata.
* Add workflow context management extensions and optimizations
Introduces `WorkflowExecutionContextExtensions` for loading and saving workflow contexts more efficiently. Replaces `JsonArray` usage with `List<object>` for context provider types, simplifying the type management in the workflow execution context. Streamlines `WorkflowContextActivityExecutionMiddleware` by removing redundant service scope creation and enhancing readability.
* Remove redundant timer in CustomerCommunicationsWorkflow
The timer activity that was set to not start the workflow has been removed to streamline the workflow process. Updated the README to include instructions on how to start the CustomerCommunicationsWorkflow using the REST API or Elsa Studio.
* Refactor middleware to streamline context management
Removed dependency on `IServiceScopeFactory` and refactored middleware to directly load and save workflow contexts. Simplified workflow context provider invocation, enhancing code readability and maintainability.
* Remove redundant PropertyBag property
The PropertyBag property was commented out and is no longer needed in the WorkflowDefinition class. This change removes the commented-out code to clean up the class definition.
* Add JsonSerializerOptions for deserialization
Introduce JsonSerializerOptions with camelCase policy and case insensitivity for property names. This ensures consistent deserialization of custom properties in activity workflow context settings.
Moved role and RBAC files from trace-lens to elsa-server directory. Updated solution file to reflect these changes and adjusted package version for WebhooksCore. This refactor improves organization and clarity in deployment configurations.
Removed unnecessary ID fields from HelloWorld.json to streamline the structure. This change focuses on reducing clutter and making the configuration easier to read and maintain.
Updated the database provider in the program configuration to use SQLite instead of PostgreSQL. This change simplifies local development setup and reduces dependencies.
This update improves compatibility with the latest features and bug fixes in the Azure.Messaging.ServiceBus package. Ensuring libraries are up-to-date will maintain security and performance standards.
Eliminated an unnecessary console log statement in Program.cs, which was logging the KUBERNETES_SERVICE_HOST value. Additionally, removed an obsolete project reference to "bundles" in the solution file.
Replaced the private _clusterName variable with a public ClusterName property to allow external configuration of the cluster name. Updated cluster setup configuration to use the new property, ensuring flexibility and maintainability.
This commit consolidates namespaces by removing redundant declarations and unused using statements across multiple files. This helps to streamline the code and improve readability, reducing potential confusion.
Removed the unused `Elsa.Workflows.Contracts` import to clean up the code. This change reduces clutter and potential confusion by ensuring only necessary namespaces are included.
* Add activity execution log sink
Introduced an interface `IActivityExecutionLogSink` for storing workflow execution log records and implemented it as `StoreActivityExecutionLogSink`. This centralizes and streamlines the handling of persisting execution logs into the workflow's runtime, thus making the process more modular and maintainable. The `PersistActivityExecutionLogMiddleware` has also been refactored to use this sink, replacing the direct usage of the workflow execution log store.
* Refactor logging interfaces and implementations
Replaced specific logging interfaces and implementations with generic ones. The individual interfaces for workflow and activity execution logging have been replaced with a single ILogRecordExtractor and ILogRecordSink interface. Specific implementations have been adjusted to use these new interfaces. This allows for greater flexibility and reuse of logging code.
* Introduce ILogRecordStore interface
The `ILogRecordStore` interface has been introduced to provide a centralized place for handling log records. Both `IActivityExecutionStore` and `IWorkflowExecutionLogStore` have been updated to inherit from this new interface. As a result of this change, the `SaveManyAsync` methods in these two interfaces have been removed to avoid redundancy.
* **Refactor ProtoActor modules and integrate new core module**
Removed obsolete proto actor-related files and introduced a new core module under `Elsa.ProtoActor.Core` to centralize ProtoActor functionalities. Updated services and extensions to align with the new core structure, focusing on efficient persistence and actor system configurations.
* Add Proto.Actor-based distributed caching module
Introduces a new module `Elsa.Caching.Distributed.ProtoActor` for Proto.Actor-based distributed caching, including configuration extensions, proto files, and required services. Refactors some existing Proto.Actor-related features and updates Dockerfile and example projects to use the new module.
* Refactor ProtoActor cache handling and virtual actor setup.
Reorganize the distributed caching by introducing LocalCacheVirtualActorProvider and StartLocalCacheActor. Update WorkflowInstanceVirtualActorProvider for better cluster kind handling. Adjust namespaces in Protobuf definitions for consistency.
* Refactor LocalCacheImpl to use IChangeTokenSignalInvoker
Replace IChangeTokenSignaler with IChangeTokenSignalInvoker to align with updated dependency contract. Adjust method call to use InvokeAsync for triggering token signals with cancellation support.
* Refactor ConfigureClusterConfig and config mutation
Change ConfigureClusterConfig from Action to Func for better flexibility. Update clusterConfig and remoteConfig to support reassignment from configuration methods.
* Add ProtoActor support for distributed caching
Introduced ProtoActor as a new distributed caching transport option. Updated the configuration and workflow runtime settings to utilize ProtoActor. Added necessary project reference for Elsa.Caching.Distributed.ProtoActor in the .csproj file.
* Add LocalNodeStrategy and integrate it in actor provider
Introduced `LocalNodeStrategy` to handle member placement on the current node. Integrated the new strategy in `LocalCacheVirtualActorProvider`, ensuring it uses `LocalNodeStrategy` for member management.
* Prevent duplicate member additions based on ID.
Updated the member checking logic to include member IDs. In addition, this change improves the robustness of the member management in `LocalNodeStrategy.cs`.
* Refactor virtual actor configuration into a separate method
Moved virtual actor setup logic from `ProtoActorFeature` to a new `AddVirtualActors` method to improve code readability and reusability. Updated related files to maintain consistency and enhance documentation clarity.
* Refactor LocalCache to use PubSub for change token signals
Replaced direct event stream usage with PubSub in LocalCache implementation. Updated service and hosted service to support PubSub subscription and publishing. Removed obsolete Start and Stop RPC methods from LocalCache service definition.
* Add UsedImplicitly attribute to notification handler
This change introduces the [UsedImplicitly] attribute to the DistributedWorkflowDefinitionNotificationsHandler class. The attribute is intended to prevent any accidental removal by static analysis tools, ensuring the class remains available for dynamic usage scenarios.
* Refactor caching and signal handling mechanisms
Replaced `TriggerChangeTokenSignalConsumer` with `ChangeTokenSignalInvoker` and added new decorators for change token handling. Renamed namespaces and file paths for better consistency and clarity. Updated test files to align with these changes.
* Remove unnecessary interface dependencies from services
Eliminated the ISignalManager and related interfaces to streamline dependency management. Updated services and test components to use concrete implementations directly, reducing complexity and improving maintainability.
* Remove Shared.proto and associated imports
Deleted the Shared.proto file and removed related import statements across multiple files. This cleanup also involved modifying the proto actor provider and project file to exclude references to Shared.proto.
* Simplify namespaces in component test helpers
Consolidated several namespaces into 'Elsa.Workflows.ComponentTests.Helpers' to reduce redundancy and improve maintainability. Removed unnecessary using directives in multiple test files for cleaner and more readable code.
* Refactor imports in component tests
Consolidated various helper imports in component tests by removing redundant specific references and utilizing general 'Elsa.Workflows.ComponentTests.Helpers'. This change simplifies the dependency management and ensures cleaner and more maintainable code.
* Remove redundant state persistence calls
Eliminated multiple calls to PersistStateAsync in WorkflowInstanceImpl.cs as they were unnecessary given that the WorkflowRunner already invokes the commit handler. This change simplifies the workflow execution and cancellation logic by avoiding redundant state persistence operations.
* Add workflowInstanceId to response mapping
Updated methods to include workflowInstanceId in response mapping functions for consistency and clarity. Additionally, fixed project reference paths and added error handling for missing workflow variables in tests.
* Remove unnecessary variable existence check
Removed a redundant check for the existence of the "Workflow1:variable-1" key in the variables dictionary. This streamlines the test and relies on the assumption that the key exists as expected without explicit validation.
* Add Kubernetes deployment and service configurations
Introduced a Deployment and Service configuration for the Kubernetes cluster. Updated Dockerfiles and build script to align with port 8080 configuration and renamed images for consistency. Updated solution file to include new deployment files.
* Add Kubernetes cluster integration
Introduced Kubernetes cluster provider for Proto.Actor and configured the application to use it if running in a Kubernetes environment. Added necessary RBAC roles, role bindings, and service accounts to support Kubernetes integration. Updated deployment configuration and package references to include Proto.Cluster.Kubernetes.
* Refactor deployment configurations and add service support.
Reorganized deployment YAML files into designated subdirectories for elsa-server, postgres, plant-uml, and trace-lens. Introduced new configuration maps, service accounts, roles, and service bindings. Updated .NET environment variables and solution structure to reflect these changes.
* Update service configurations and environment variables
Renamed and split services in trace-lens to isolate the OTEL collector. Updated environment variables in elsa-server to enhance instrumentation, connection strings, and profiling settings. Adjusted OTEL exporter endpoint to match the new service naming.
* Increase deployment replicas to 3
Updated the 'replicas' field in the deployment configuration to enhance the system's availability and load balancing. This change ensures that three instances of 'elsa-server' will be running simultaneously.
* Rename LocalCacheImpl to LocalCache and add logging
Renamed `LocalCacheImpl` class to `LocalCache` to better reflect its purpose. Added a logging statement in `OnReceive` method to log incoming `ProtoTriggerChangeTokenSignal` messages. These changes improve code readability and debugging.
* Disable OTEL console exporters and set session affinity
Disabled console exporters for logs, metrics, and traces in the OTEL configuration to reduce unnecessary console output. Additionally, set session affinity to 'None' in the elsa-server service configuration for load balancing.
* Rename WorkflowInstanceImpl to WorkflowInstance
Updated the class name from WorkflowInstanceImpl to WorkflowInstance for clarity and simplicity. Adjusted all relevant references and instances in the codebase to match the new class name.
* Remove ActivityIncidentStateMapper and Update ProtoBuf Mappings
Removed the unused ActivityIncidentStateMapper class to streamline the codebase. Updated all related ProtoBuf mappings and imports to ensure consistency and remove redundancy across the project.
* Remove duplicate actor spawn verification timeout setting
The code had a redundant setting for actor spawn verification timeout, which was specified twice. This commit removes the duplicate line to ensure cleaner and more maintainable configuration.
* Remove unused imports from Program.cs
Eliminated unnecessary imports for ActivityExecution, WorkflowExecution, and k8s libraries. This cleanup helps reduce the code footprint and may improve compile time.
* Remove debug logging from LocalCache actor
The `Console.WriteLine` statement was removed from the `OnReceive` method in `LocalCache.cs`. This change eliminates unnecessary console output during the token signal handling, improving performance and reducing log clutter.
* Directory.Packages.props should mandate used versions
* Add NuGet audit mode setting to show any problems during restore
* System.Text.Json should be 8.0.4 which is patched against security vulnerabilities
* Fix build GH Actions generation
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Added IDisposable interface to scheduled task classes to ensure proper resource cleanup. Specifically, added dispose methods to release timers and cancellation tokens where applicable.
Updated the application role parsing to provide a default value when the configuration is missing. Removed redundant inbox cleanup options binding, and added a Resharper disable comment for redundant assignment.
Updated the Program.cs files across web applications to use `await app.RunAsync()` instead of `app.Run()`. This change ensures proper asynchronous operation and aligns with best practices for hosting .NET applications.
This commit introduces the OnStopped method in the WorkflowInstanceImpl class to properly dispose of _linkedTokenSource. This change ensures that resources are appropriately cleaned up when the actor is stopped, preventing potential memory leaks.
Corrected the path in the ProjectReference for Elsa.csproj to ensure proper module loading. This resolves issues related to incorrect project references and allows the project to build successfully.
Changed the project reference from the bundles directory to the module directory for Elsa.csproj. This update ensures proper inclusion of the Elsa project within Elsa.Testing.Shared.Component.
Corrected the project reference path from 'bundles' to 'modules' to ensure proper linkage and compilation. This change addresses a path configuration error in the project file.
Updated Dockerfile paths to reflect 'apps' directory structure, removed redundant XML comments, and modified methods in WorkflowDefinitionExtensions to use FindWorkflowGraphAsync for consistent workflow retrieval.
Including the lang attribute with the value "en" improves accessibility and helps search engines better understand the page's content. This small change enhances the overall SEO and user experience for English-speaking users.
Added the `lang` attribute with the value "en" to the `<html>` tag to specify the language of the document. This improves accessibility and enhances SEO by clearly defining the page's primary language.
* Add OpenTelemetry integration for workflow tracing
Introduced a new module, Elsa.OpenTelemetry, to provide OpenTelemetry sources for tracing workflow and activity execution. Updated various components and pipeline extensions to support OpenTelemetry tracing throughout the workflow execution process.
* Refactor workflow execution pipelines
Deleted `WorkflowsFeatureExtensions` and migrated methods to `PipelineWorkflowsFeatureExtensions` with added configurability. Enhanced `ActivityExecutionMiddlewareExtensions` and `ActivityExecutionPipelinePipelineBuilder` to support middleware insertion. Added comprehensive tracing to `OpenTelemetryTracingWorkflowExecutionMiddleware`.
* Add OpenTelemetry tracing to activity execution
Introduced `OpenTelemetryTracingActivityExecutionMiddleware` to capture tracing information for activity execution within workflows. This middleware logs activity execution start and end events, attaching pertinent activity tags. Added extension method to register this middleware in the workflow execution pipeline.
* Set `PYTHONNET_PYDLL` consistently and update workflow pipelines
Update Dockerfiles to set the `PYTHONNET_PYDLL` environment variable consistently without spaces. Additionally, refactor `Program.cs` to streamline workflow and activity execution pipeline configurations by using the `WithDefaultWorkflowExecutionPipeline` and `WithDefaultActivityExecutionPipeline` methods.
* Enhance OpenTelemetry Tracing Middleware Implementation
Add missing activity tags and events to improve telemetry data. Simplify middleware installation syntax for both workflow and activity execution tracing pipelines, ensuring consistent and clear tracing across modules.
Updated `docker-compose.yml` to include `depends_on` for `trace-lens`, ensuring it starts after `plantuml-server` and `postgres`. Modified the README to include `Elsa.Workflows` in `OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES` and corrected formatting for `OTEL_RESOURCE_ATTRIBUTES`.
* Replace custom webhooks implementation with WebhooksCore
Replaced the existing custom webhooks registration and dispatching system with the WebhooksCore library. This involved removing all previous custom webhook classes and interfaces, updating project dependencies, and modifying appsettings and program files to use the new configuration. The update simplifies the webhook handling architecture and leverages the features provided by WebhooksCore.
* Hide API key in Datadog Docker compose file
This change replaces the exposed Datadog API key with a placeholder "<HIDDEN>". This enhances security by preventing the API key from being visible in the version control system.
Deleted an unused commented configuration line in docker-compose-datadog.yml to improve readability and maintainability. This change does not affect the existing tracing configuration or application behavior.
Added `pull_policy: always` to `elsa-server` and `elsa-studio` services in the Docker Compose file to ensure the latest images are always pulled. Updated `elsa-server` environment variables to improve Datadog tracing and monitoring. Adjusted the Dockerfile path for the `elsa-studio` service.
Uncommented conditional enabling of tracing for WorkflowInstanceActor. This ensures that tracing is enabled only if the `_enableTracing` flag is set, improving the clarity and functionality of the feature.
Corrected Dockerfile paths for Elsa.Server and Elsa.Studio, and added Datadog tracing and related environment variables. Included Datadog.Trace package in Elsa.Server.Web project and updated Elsa.Studio package versions to 3.3.0-preview.466.
Changed paths from "bundles" to "apps" in multiple Dockerfiles to standardize the directory structure. This ensures all Dockerfiles use a consistent directory naming convention across the project.
* Add database initialization script and update dependencies
Added a script to initialize the 'tracelens' database and modified the Docker setup to include this script. Refactored and improved the ProtoActorFeature class, added OpenTelemetry dependencies, and updated project settings.
* Enable OpenTelemetry integration for Proto.Actor
Added OpenTelemetry environment configuration details to the README and included the Proto.OpenTelemetry package in the project file. Updated the ProtoActorFeature to apply tracing with OpenTelemetry to WorkflowInstanceActor.
* Refactor VariablePersistenceManager to use primary constructor
This refactor simplifies the VariablePersistenceManager by moving the storageDriverManager initialization into the primary constructor. It removes the redundant field and constructor, aligning with the concise nature of modern C# syntax, and ensures consistency in accessing the storageDriverManager throughout the class.
* Remove unused Open Telemetry code from Program.cs
The code for configuring Open Telemetry was commented out but not removed, cluttering the file. This commit cleans up Program.cs by deleting these unused lines, maintaining a cleaner and more readable codebase.
* Add metrics and tracing configurations for ProtoActorFeature
Introduced methods to enable metrics and tracing in ProtoActorFeature. Removed redundant properties and updated the workflow runtime to utilize the new configurations.
* Add Directory.Build.props for shared project settings
Introduce Directory.Build.props to centralize common project settings and dependencies. Consolidate target framework, language version, and package references to reduce duplication. Remove redundant property definitions from Elsa.Server.Web.csproj.
* Move apps from bundles to apps folder and Elsa module to modules folder
Removed the IWorkflowExecutionContextStore interface and its implementations, along with the associated handlers and registrations. This change simplifies the codebase by eliminating unnecessary components and their dependencies.