Adjusted the indentation for the Release configuration of project {99F2B1DA-2F69-4D70-A2A3-AC985AD91EC4} in the solution file Elsa.sln. This change ensures proper alignment and readability of the project's configuration settings.
Refactor InputFunctionsDefinitionProvider to remove unused parameter. Simplify JintJavaScriptEvaluator object wrapping configuration and update Jint package to version 4.0.1. Add type Random to ConfigureEngineWithCommonTypes and enhance error handling in TaskReporter.
Replaced IWorkflowDispatcher in TaskReporter with IWorkflowInbox to streamline task reporting. This fixes race conditions when the workflow is attempted to be resumed before it committed its bookmarks.
* Add handlers and improve JavaScript engine configuration
Added several new handlers for configuring the JavaScript engine with common types, functions, variable accessors, and input/output accessors. Refactored the JintJavaScriptEvaluator for better clarity and modularity by breaking down configuration steps into separate methods. Also replaced `IsInsideCompositeActivity` with `IsContainedWithinCompositeActivity` for better semantic consistency.
* Refactor to use primary constructor syntax for TypeDefinitionProviders
Updated CommonTypeDefinitionProvider, VariableTypeDefinitionProvider, and ActivityOutputFunctionsDefinitionProvider to use primary constructors for dependency injection. This change reduces redundancy and simplifies the code structure for better readability and maintainability.
* Add byte conversion functions to JavaScript engine
Introduced functions for converting bytes to/from strings and Base64. Updated CommonFunctionsDefinitionProvider and ConfigureEngineWithCommonFunctions to incorporate these new functions. This enhances the JavaScript engine's ability to handle byte array manipulations.
* Add tests for JavaScript byte and string conversions.
Introduce integration tests to verify byte array to string, string to byte array, byte array to Base64, and Base64 to byte array conversions using JavaScript functions. Ensure accurate transformation of data within different encoding scenarios.
* Add meaningful summaries to Jint engine configuration handlers
Updated comment summaries in four handler classes to provide clear and concise descriptions of their purpose. This helps improve code readability and understanding for future developers.
* Rename and merge variable and input/output handlers
Merged the variable accessor logic into the input/output handler and renamed the class to reflect its broader functionality. This consolidation ensures the accessors are registered in the right order.
* Add string base64 conversion functions
Introduced `stringToBase64` and `stringFromBase64` functions to handle base64 encoding and decoding of strings. Updated corresponding provider, handler, and added tests to ensure functionality.
Introduced `ConverterHelper` and `ExpandoObjectConverter` to handle conversions from .NET dynamic objects to JavaScript objects. Updated integration tests to validate the conversion and sorting functionalities.
Fixes#5895
* Add optional refresh parameter
Renamed several `RefreshDescriptors` methods to `RefreshDescriptorsAsync` to reflect their asynchronous nature consistently. Added an optional refresh parameter in the `ListActivityDescriptorsRequest` class and updated related endpoints to handle this parameter, triggering a registry refresh if necessary.
* Update version to 3.2.0-rc5 in GitHub Actions
Modified the `packages.yml` workflow to change the version from `3.2.0-rc4` to `3.2.0-rc5` for non-tagged releases. This ensures version consistency with the new release candidate.
Changed class names, properties, and variables from Model to ServiceProfile for improved semantics and readability. Updated corresponding filenames and configuration settings to maintain consistency.
Included the TenantId property in the workflow definition to support tenant-specific workflows. Skipped a multitenancy test due to the current issue where not all workflows are assigned the Tenant1 tenant.
* Enhance logging and state handling in workflows
Added debug logging in `BookmarkResumer` and `StoreBookmarkQueue` to track workflow resumptions and queue additions. Updated `ICommitStateHandler` to include `WorkflowState` parameter and modified related implementations. Adjusted logging configuration in sample app and removed unused service import.
* Add CustomProperties entry for RootType in AgentActivity
This change ensures that the `RootType` property is set to `AgentActivity` inside the `AgentActivityProvider`. It enhances the descriptor's metadata, enabling clearer classification and potentially improving integration with other components.
* Update RemoveBookmarksAsync to use BookmarkIds instead of Hashes
Modified RemoveBookmarksAsync to filter bookmarks by BookmarkIds rather than Hashes for improved accuracy. Updated filter creation logic to accommodate the new identifier field.
* Fix commit state handler call in WorkflowRunner
Add workflowState as an argument to commitStateHandler.CommitAsync. This ensures that the commitStateHandler has the necessary context to commit properly and maintains consistency in workflow state changes.
Refactored multiple persistence feature classes to implement the self-referencing generic type parameter in the `PersistenceFeatureBase` class. This ensures that each feature correctly references its own type, enhancing type safety and overall code maintainability.
Switched to dictionary index access for "ResumeAt" in Delay.cs to ensure more efficient updating. Added handling for byte[] in ObjectConverter.cs to correctly deserialize from base64 strings.
* Add "integrations" project and update dependencies
A new project named "integrations" has been added to the Elsa solution. Related dependencies have been updated accordingly, with some connections reassigned to the new project. This includes both new connections established and existing connections removed in response to the project addition.
* Stash
* Refactor ActivityDescriber to clean up unused code
Removed commented out code lines related to input options in the `ActivityDescriber` class. This change enhances code readability and maintains the focus on active and necessary functionality. The main logic for getting UI properties remains intact.
* Remove deprecated webhook dispatchers and handlers
Eliminated classes and interfaces related to webhook dispatching and registration from the Elsa.Webhooks module as part of refactoring. Introduced new classes and features for handling webhook events within the Elsa.OrchardCore module. Updated several configuration files and references accordingly.
* Add OrchardCore integration sample and enhance webhooks
Added a new ASP.NET sample for integrating with OrchardCore and set up various related configuration files and project references. Improved the webhooks module by modifying the WebhookEventActivityProvider for better event handling and description management, and enhanced the WebhooksFeature to include the WebhookEventActivityProvider.
* Set activity descriptor description from eventType.DisplayName
The activity descriptor now sets its Description property using the eventType's DisplayName. This ensures that the description is consistent with the event type's display name across the system.
* Rename 'Description' to 'DisplayName' for activity descriptor
This change ensures that 'DisplayName' is assigned the correct value from 'eventType.DisplayName'. It helps avoid any confusion between 'Description' and 'DisplayName' properties in the activity descriptor object.
* Add PayloadType and Constructor logic for Webhooks
Added PayloadType to content item published events in `appsettings.json`. Updated `WebhookEventActivityProvider` to include constructor logic and manage payload types. Enhanced `OrchardCoreFeature` and `WebhooksFeature` with alias definitions for variable types.
* Add helper for webhook activity type names and refactor code to use it
Introduce `WebhookActivityTypeNameHelper` for consistent generation of webhook activity type names. Refactor relevant classes to utilize this helper, simplifying and standardizing the codebase. Adjust other minor settings, such as editor config line length and dependency configurations.
* Refactor and introduce Orchard core integration
Replace `ContentItemPublished` with a new handlers and payload structure. This change includes the creation of various classes and handlers necessary to support the OrchardCore integration, define the content item events, and configure them via app settings. This refactor aids in standardizing the handling of content item publication events through newly introduced classes and configurations.
* Refactor stimulus class name for content publication
Renamed `WebhookEventReceivedStimulus` to `ContentItemPublishedStimulus` to better reflect its purpose in handling content item publication events. Updated all references and imports accordingly to maintain consistency in the codebase.
* Refactor webhook payload handling
Switched from using only `ContentItemPublishedPayload` to incorporating both `WebhookEvent` and `ContentItemPublishedPayload` in the input dictionary. This change ensures more comprehensive data handling for webhook events.
* Add new dependency and correct project reference path
Included Elsa.Webhooks.ActivityProviders in WebhooksFeature to support new webhook activities. Corrected the project reference path in Elsa.Samples.AspNet.OrchardCoreIntegration.csproj to reflect the accurate module directory structure.
* Rename and enhance webhook handling functionality
Renamed `InvokeOrchardActivities` to `InvokeOrchardWebhookEventActivities` for clarity. Also added an `ActivityProvider` to improve webhook event handling.
* Refactor: replace Workflow with WorkflowGraph in context
Updated references from Workflow to WorkflowGraph across various files to reflect the new context structure. This change improves the accuracy of context information and aligns with recent architectural updates.
* Add Semantic Kernel modules and features
Introduced core classes and services to support Semantic Kernel agents, their configuration, and execution within workflows. Added API endpoints for agent execution, integrated kernel configuration settings, and ensured necessary extensions for skill and plugin integration.
* Update ActivityDescriber and AgentActivityProvider
Default `inputAttribute` to null in `GetUIHint` and use it in `AgentActivityProvider`. This change ensures the `GetUIHint` method is called directly, improving code reusability and simplifying input handling.
* Add GraphQL client with token authentication
Introduced a DefaultGraphQlClient to send GraphQL queries, incorporated token-based authentication using AuthenticatingDelegatingHandler, and included support for refresh tokens through DefaultSecurityTokenService. Updated projects and configuration accordingly.
* Rename OrchardWebhooks to OrchardCore
Updated method and related variables to use 'OrchardCore' instead of 'OrchardWebhooks' for consistency and improved clarity. Also added activity attributes for SendGraphQLQuery to better describe its purpose.
* Refactor webhook handling and add ProofreaderResult model
Refactor activities and event handling to support multiple webhook event types beyond content publishing. Introduce new models under OrchardCoreIntegration for ProofreaderResult and ProofreadError, and update existing methods for more generic payload handling.
* Add support for API key configuration and reference
Implemented a new `ApiKeyConfig` class to manage API keys. Updated various components to utilize API key references, enhancing configuration flexibility. Added new options and settings to facilitate these changes.
* Add translation functionality and improve agent activity displays
This commit introduces a new `TranslationResult` model and updates the project configuration to support translation features. Additionally, it adds two new project references and modifies the `appsettings.json` to include translation skills. The `AgentActivityProvider` class now has improved display names for agent activities for better readability.
* Add FactCheck and Tagging functionality
Introduced new models: FactCheckResult, GenerateTagsResult, and IncorrectFact. Integrated JetBrains.Annotations package and extended variable types in workflow management. Updated prompt templates and appsettings for proofreader, fact-checker, and tagger functions.
* Enhance 'Tagger' skill in appsettings.json
Updated the 'GenerateTags' function in the 'Tagger' skill to define the number of tags to generate and to ensure JSON response format. Added a 'Number' input variable and the 'ResponseFormat' property for clarity and precision.
* Add support for patching content items via OrchardCore API
Implement DefaultRestApiClient and IRestApiClient for GET and PATCH requests to the content API. Introduce Activity for patching content items and update app settings to handle TitleResult in JSON format.
* Add variable type aliasing and improve serialization
Introduced extension methods to add variable type and alias in WorkflowManagementFeature. Enhanced JSON serialization in AgentActivity and DefaultRestApiClient. Cleaned up solution by removing old project references and updated appsettings.json for revised prompt templates.
* Remove Proofreader models and update AgentActivity properties
Removed obsolete `ProofreaderResult` and `ProofreadError` classes to streamline the codebase. Updated `AgentActivity` properties to be internal and JSON-ignored to enhance encapsulation and reduce serialization overhead.
* Add localization support for content items in OrchardCore
Implemented a new activity `LocalizeContentItem` to create localized versions of content items based on a provided culture code. Added a corresponding API client method and request model to facilitate this feature, along with necessary format adjustments in the appsettings file.
* Enhance SkillExecutor functionality and update config details
Enabled 'AllowDangerouslySetContent' in SkillExecutor for improved flexibility with input variables. Streamlined the Proofread function prompt template and adjusted various execution settings in `appsettings.json`. Removed explicit MaxTokens limits to allow more dynamic content handling.
* Add attribute to BackgroundActivityStimulus
Added the `ExcludeFromHash` attribute to the `JobId` property in `BackgroundActivityStimulus` class, fixing background activity resumption.
* Rename SemanticKernel to Agents module for better clarity
This commit renames the SemanticKernel module to Agents across the entire project, including all relevant file paths, namespaces, and configuration settings. Major refactors encompass changing file names, class names, and namespaces to reflect the new module name, removing the SemanticKernel integration in favor of the more general Agents framework.
* Update configuration section for SemanticKernel
Changed the configuration section name from "Agents" to "SemanticKernel" in Program.cs and appsettings.json. This ensures the options are correctly bound to the relevant settings in appsettings.json.
* Add new entities and projects for Elsa Agents
Introduced new entities: `AgentDefinition`, `ApiKeyDefinition`, `ModelDefinition`, `PluginDefinition`, `SkillDefinition`. Added new projects: `Elsa.Agents.Management` and `Elsa.Agents.Persistence`. Renamed `ConfigureAgents.cs` to `ConfigureKernel.cs` and updated relevant references.
* Add ActivityHandle to workflow execution endpoint
Extended the endpoint to accept ActivityHandle as part of the workflow execution request. This change improves the ability to specify and manage activity-specific workflows. Additionally, updated `appsettings.json` to remove "Article" from the list of content types.
* Add nullable checks and new skills with functions
Improve null safety in AgentActivity and AgentActivityProvider classes by adding nullable checks. Additionally, update `appsettings.json` with corrected skill names and introduce new skills including ArticleWriter and Author.
* Register Random type in JavaScript engine
Added the Random type registration to both JintJavaScriptEvaluator and CommonTypesDefinitionProvider. This allows JavaScript code to utilize the Random class for generating random numbers.
* Add CreateContentItem activity and API client method
Introduce a new CreateContentItem activity to create and optionally publish content items. Added a new REST API client method to handle content creation, including the necessary request model.
* Update API endpoints and variable name for consistency
Changed API endpoints in DefaultRestApiClient.cs to use 'content-items' instead of 'content' for consistency with the project's URL structure. Also updated a variable name in CreateContentItem.cs for clarity and readability.
* Fix potential NullReferenceException on timer disposal.
Ensure that the timer is not null before calling Dispose in both ScheduledRecurringTask and ScheduledCronTask. This prevents potential NullReferenceExceptions when the timer event is fired.
* Add Image Generator and integrate OpenAI text-to-image feature
Introduced `ImageGenerator` for generating images from text using OpenAI's text-to-image functionality. Updated `KernelFactory` to support `OpenAITextToImage` service, and modified configurations and services to utilize the new image generation capabilities.
* Add UploadMedia activity and WorkflowInstanceStorageDriver
This commit introduces a new UploadMedia activity for uploading files to a media library and a WorkflowInstanceStorageDriver for managing workflow state storage. Additionally, it includes changes in IRestApiClient interface, DefaultRestApiClient implementation, and minor logging enhancements in ScheduledSpecificInstantTask. Unnecessary project references were removed and project files were updated accordingly.
* Mark `WorkflowStorageDriver` as obsolete and update condition.
Added [Obsolete] attribute to `WorkflowStorageDriver` indicating it will be removed in future releases. Modified `BackgroundActivityInvoker` to also recognize `WorkflowInstanceStorageDriver` for output capture.
* Handle JsonNode deserialization in ObjectConverter
Add support for deserializing JsonNode types in ObjectConverter.cs. This ensures proper handling of JsonNode along with JsonElement and JsonObject, enhancing the overall deserialization process.
* Add ResolveTags activity to OrchardCore module
Created a new ResolveTags activity that interacts with the Orchard Core API to resolve or create tags. Implemented the ResolveTagsRequest model and updated the IRestApiClient and DefaultRestApiClient to support this new functionality.
* Refactor project structure and update configuration
Renamed the Elsa.Agents project to Elsa.Agents.Activities and updated all relevant namespaces and file paths. Added a new setting to the appsettings.json to include the language parameter for article generation.
* Update project metadata in multiple csproj files
Revised descriptions and package tags across several projects to ensure consistent terminology related to Agents. Removed unused folder references in Elsa.Agents.Core.csproj.
* Simplify JSON node deserialization logic
Removed redundant JsonObject checks and unified the handling of JsonNode instances. This refactoring streamlines the code and ensures consistency in the deserialization process.
Introduced customizable database exception handlers across various modules, enabling specific error handling strategies for different DbContexts. Implemented a generic interface for exception handling and provided specific implementations for PostgreSQL and a No-op handler. Updated the code to utilize these handlers in various persistence features, enhancing error management and modularity.
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.