Replaced hardcoded System.Text.Json version 8.0.4 with a variable $(SystemTextJsonVersion) across multiple project files. This improves maintainability and consistency when updating the package version.
* Add endpoints for activity execution records and summaries
Created new classes and endpoints to handle activity execution records and summaries retrieval. Added related models and updated relevant interfaces.
* Rename endpoint classes for clarity
Updated endpoint classes in `ActivityExecutions` and `ActivityExecutionSummaries` to use the name `Endpoint` instead of `List`. This improves readability and consistency in the codebase.
Replaced `Deserialize` with `DeserializePayload` to align with updated deserialization strategies, ensuring consistency across the codebase and improving future maintainability. This change affects how 'SerializedProperties' are handled within `ActivityExecutionLogStore`.
Simplify the handling of `JsonNode` parsing and improve type-checking. Added a guard clause in `ReadType` method to handle non-object JSON token types, ensuring safer type parsing.
Eliminates an unnecessary using directive from PolymorphicObjectConverterFactory.cs to keep the code clean and reduce potential confusion. This change has no impact on functionality.
Bumped versions for various Microsoft and third-party packages to improve compatibility and take advantage of recent bug fixes and performance improvements. Specific changes include updates to AspNetCore, EntityFrameworkCore, and Polly packages among others.
* Enhance logging by adding logger state to activity and workflow pipelines
* Change logger state for ActivityExecutionContext to use key of ActivityInstanceId instead of ActivityId
* Adjusted logger state registration to conform to the Elsa Features framework delegate pattern
---------
Co-authored-by: Bob Hauser <rhauser@kinaxis.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Enhanced the OpenTelemetry tracing middleware to include detailed information about the triggered activity within the workflow execution. This change adds tags for the activity ID, name, and type to provide better observability and debugging insights.
Introduced a new feature to integrate Lodash FP into the JavaScript engine. Updated configuration to use Lodash FP instead of Lodash. Adjusted Moment.js library handling to ensure compatibility.
Included the System.Text.RegularExpressions package to Directory.Packages.props with version 4.3.1. This addition ensures regex functionalities are available within the project dependencies.
This update changes the version of multiple Elsa.Studio packages from 3.3.0-preview.524 to 3.3.0-preview.561. This ensures that all dependencies are up-to-date and can include bug fixes and new features introduced in the latest preview version.
Introduce support for Lodash and Moment libraries in the JavaScript engine. Also configure project settings and Weavers for consistent code quality and behavior.
Introduce ITenantAccessor interface and its implementation, DefaultTenantAccessor, for tenant management in the multitenancy module. This setup will allow future enhancements for tenant-specific functionality.
Consolidate imports by replacing Elsa.Common.Contracts with Elsa.Common and Elsa.Common.Multitenancy. This update streamlines import statements across various modules, improving code readability and maintainability.
Eliminated redundant `correlationId` tag setting. Adjusted `workflowInstance` and `activityInstance` tag schemas for better clarity. Simplified the processors list in `otel-collector-config.yaml`.
Renamed variables from 'activity' to 'span' for clarity and consistency. Added additional span tags for start and end times, status updates, and detailed error information for improved traceability and debugging.
Replaced inline tag creation with a helper method to streamline code and ensure consistency in status tags for activity events. This change also includes a minor comment for clarity on null activity handling.
Reorganized the logic for setting tags when incidents are present in `OpenTelemetryTracingWorkflowExecutionMiddleware`. The new structure ensures consistent tag setting for error status and incidents, improving code readability and maintainability.
Updated ReadAsJsonAsync method to accept an IServiceProvider parameter for improved JSON deserialization. Modified corresponding tests and helper classes to utilize the service provider for more flexible JSON serialization options.
Introduced a TypeJsonConverter to handle Type serialization and deserialization. Updated dependency injection and helper methods to support customized JSON serializer options, improving flexibility and configurability.
Upgraded WebhooksCore package version from 0.0.1-preview.16 to 0.0.1-preview.17. Introduced a new configurable HTTP client action in the WebhooksFeature class to support extended configurations.
* Add secret scripting integration for JavaScript
Introduced a new `Elsa.Secrets.Scripting` module that provides secret management capabilities within JavaScript workflows. This includes configuring the Jint engine to use workflow variables, adding new type and variable definition providers, and integrating with existing secret management features.
* Refactor secret name extraction to a separate method
Moved the logic for extracting secret names from the main method to a dedicated private method `GetSecretNamesFromExpression`. This improves code readability and maintains the single responsibility principle by delegating secret name extraction to its own method.
* Add input evaluation, sensitive input handling, and middleware refactor
Introduced methods for evaluating activity input properties and handling inputs marked as sensitive. Refactored `ExecutionLogMiddleware` constructor for consistency. Enhanced `SendHttpRequestBase` to mark authorization inputs as potentially containing secrets. Removed obsolete entries and adjusted persistence logic for clarity.
* Refactor IActivityStateProtector interface
Remove unused using directives and unnecessary comments. Simplify the definition of the `ProtectedActivityStateContext` record.
* Add activity state filtering mechanism
Introduce an abstract filter base class, context, and result models to enable filtering of activity state. Implement a default filter manager to run these filters and apply a specific filter for obfuscating HTTP request headers. Update necessary dependencies and extension methods to integrate the new filtering functionality.
* Add expired secrets management
Implemented services to manage expired secrets by periodically checking and updating their status. Introduced a new hosted service to perform the sweep and configurable options for the sweep interval. Updated related classes and configurations accordingly.
* Update SweepInterval in appsettings.json
Changed the Secrets Management SweepInterval from 30 seconds to 4 hours. This adjustment aims to reduce the frequency of sweep operations and improve overall system performance.
* Update comment to reflect configuring engine with secrets
The comment was changed to better describe the handler's function, specifying that it configures the Jint engine with secrets instead of workflow variables. This clarifies the purpose and usage of the handler in the context of the code.
* Remove unused inputDescriptors variable
This commit removes the inputDescriptors variable, which was declared but never used in DefaultActivityExecutionMapper.cs. This helps in cleaning up the code and potentially reducing memory usage. Ensuring that all declared variables are utilized can improve code readability and maintainability.
Upgraded various packages to their latest stable versions to ensure compatibility and take advantage of new features and bug fixes. Notable upgrades include Microsoft.EntityFrameworkCore, Microsoft.Data.Sqlite, and Polly.
Modified the WorkflowVersion property from init-only to settable. This adjustment allows for updating the workflow version post-initialization, providing greater flexibility in handling workflow instances.
This new method retrieves the JSON serializer options, enhancing flexibility in how JSON data is handled. It provides an additional way to customize serialization settings contextually.
Renamed GetPayloadSerializerOptions to GetOptions for simplicity and updated method accessibility. This change ensures that the method name is more intuitive and aligns with common naming conventions. Additionally, it introduces a new public GetOptions method in the IPayloadSerializer interface.
Implemented synchronous methods for serialization and deserialization while marking the asynchronous methods as obsolete across various storage and serialization services. This includes updates to handle serialization within the Save and Load methods, enhancing performance by avoiding unnecessary Task usage.
This update introduces a static factory method `From` in the `PagedListResponse` class. It allows for the creation of `PagedListResponse` instances directly from `Page` objects, streamlining object instantiation.
This commit cleans up the HungryWorkflow.cs file by removing unused using directives. This improves code readability and reduces unnecessary dependencies.
Refactored the `Get` class to utilize a primary constructor for dependency injection of `IWorkflowExecutionLogStore`. This change simplifies the class definition and removes the need for a private field.
Revised otel-collector and docker-compose configurations to streamline tracing and metrics collection, replacing Datadog connectors with OpenTelemetry. Removed unused scraping modules and unnecessary dependencies to improve setup efficiency and resource utilization.
Introduce OpenTelemetry configuration and dependencies for observability. Replace DataDog tracer with OpenTelemetry auto-instrumentation in the Dockerfile. Adjust project dependencies and log levels to incorporate OpenTelemetry without disrupting existing functionality.
Enhanced the Datadog tracing configuration to include priority sampling, rate limits, and sampling rules in the docker-compose-datadog.yml. Updated the agent image version and improved error message serialization in OpenTelemetry middleware to use custom JSON serializer options. Adjusted Dockerfile path to correct bundle location.
Updated `docker-compose-datadog.yml` with new environment variables and updated image versions, enhancing trace sampling and service autodiscovery. Added Kubernetes deployment, service, and role files for `elsa-server`, `elsa-studio`, `plant-uml`, `postgres`, and `trace-lens`, improving the project's infrastructure. Enhanced OpenTelemetry middleware for better error handling and detailed tracing of activity and workflow executions.
This commit introduces the Elsa.OpenTelemetry module to provide OpenTelemetry sources for tracing workflow and activity execution. Additionally, it updates the program to include default workflow and activity execution pipelines with tracing middleware, and improves pipeline builder extensions to support middleware insertion.
Replaced private fields with constructor parameters in IdentityGraphService and introduced a logger. Added logging to handle cases where activity descriptors are not found, improving debugging and maintainability.
Enhanced exception messages to include activity type and version for better debugging. This provides clearer context when activity descriptors or inputs are not found.
* Switch to Azure Service Bus for message brokering
Updated the message broker from in-memory to Azure Service Bus to enhance scalability. Added new configuration settings and dependencies to support Azure Service Bus integration, including scoped service initialization and queue/topic management.
* Refactor StartWorkers for dependency injection
Updated StartWorkers class to use constructor parameter injection and service scope factory for retrieving services. This refactor eliminates the need for field-level dependency storage, enhancing testability and adherence to the dependency injection principles. Additionally, annotated the class with [UsedImplicitly] to eliminate unused code warnings.
* Refactor Worker to use IServiceScopeFactory for dependency resolution
Refactored the Worker class to use IServiceScopeFactory for DI instead of directly injecting IWorkflowInbox. This enhances the flexibility and lifecycle management of the dependencies.
* Add Azure Service Bus integration toggle
Introduced a new configuration constant `useAzureServiceBus` to control the optional integration with Azure Service Bus. Implemented conditional logic to bind Azure Service Bus options from configuration if the flag is enabled.
* Add IComposite interface and implement Setup method
Introduced a new IComposite interface and added a default Setup method to the Composite class. Updated the ActivityFactory to call the Setup method when an activity is an instance of IComposite. The CompositeExample class demonstrates the use of the new interface and method.
* Remove AzureServiceBus configuration setup
The AzureServiceBus configuration setup was removed from the Program.cs file. This change aims to streamline configuration and remove unused or unnecessary setup, ensuring the code remains clean and maintainable.
* Switch MassTransit broker to in-memory
Changed the MassTransit broker from AzureServiceBus to Memory in the application configuration. This adjustment aims to simplify deployment and reduce dependencies in the current environment.
* Improve dispatched workflow input handling
Addressed input handling in dispatch messages by adding `SerializedInput` property. Also removed initialization logic and moved input deserialization to a helper method, ensuring compatibility with both new and deprecated input property formats.
* Update workflow Docker images and version tags
Changed Docker image tags from v3-2-0-rc3 to v3-2-1-preview across multiple GitHub workflows. Updated the VERSION environment variable in packages.yml to reflect the new versioning scheme. These changes ensure consistency with the new preview release.
* Update versioning to include 'preview' in package workflow
Modified the workflow to append 'preview' to the version number for non-tagged builds. This ensures clearer differentiation between stable and non-stable versions in the CI pipeline.
* Add WorkflowInstanceStorageDriver for workflow variable storage
Introduced a new storage driver, WorkflowInstanceStorageDriver, to store workflow variables directly in the workflow state. Updated relevant classes and methods to incorporate this new storage driver, ensuring seamless read/write/delete operations and extending support for it throughout the codebase.
* Refactor object conversion and update variable retrieval.
Switched from JsonObject to JsonNode for object conversion and corrected a typo in the summary comment. Changed the return type of GetVariablesDictionary method and updated its implementation to use VariablesDictionary.
* Rename 'input' to 'serializedInput' in DispatchWorkflowDefinition.
This change clarifies that the input provided to the workflow should be serialized. It enhances the readability and accuracy of the code documentation, ensuring that developers understand the expected format of the input parameter.
* Add priority and deprecation attributes to storage drivers
Introduced a priority attribute to the `IStorageDriver` interface and implemented it in various storage drivers. Additionally, marked `WorkflowStorageDriver` as deprecated and reordered storage driver listing based on priority.
* Switch MassTransit broker to in-memory and refactor converter
Changed MassTransit broker from AzureServiceBus to in-memory for improved performance in development environment. Simplified PolymorphicObjectConverterFactory by removing redundant constructor and dependencies. Removed unused folder from the project file.