This commit introduces a dedicated `BulkUpsertExtensions` class to streamline bulk upsert operations in Entity Framework Core. It supports multiple database providers and replaces the previous implementation in `QueryableExtensions` for better modularity and maintainability.
Updated the mapping function in AddManyAsync to include the cancellation token and corrected the store reference to _store. This ensures proper handling of async operations and aligns with the expected method signature.
Introduced a new AddManyAsync method across multiple activity execution stores to add collections of log records. This enhancement ensures consistency in handling bulk additions and aligns with existing store interfaces.
Introduced a new property, `EmptyFilterSelectsAll`, to handle cases where empty filters should match all records. Updated logic in `WorkflowInstanceFinder` to respect this property, ensuring consistent behavior across the system. Removed redundant comments in the dry-run endpoint for cleaner code.
Replaced status checks with a call to `CanTransitionTo` for determining if a workflow can transition to the "Cancelled" state. This improves code readability and maintains consistent transition validation logic.
Introduced a new `Cancel` alteration type with its corresponding handler to allow workflow instance cancellations in alteration plans. Updated related services, serialization configurations, and activity metadata to support the new type. Improved JSON polymorphism handling to include the `Cancel` type.
Introduced new filtering capabilities such as `Names`, `Statuses`, `SubStatuses`, and `SearchTerm` for workflow instance filters. Simplified object initialization syntax and removed unnecessary attributes, improving code readability. Added missing dependencies and API service registrations to ensure completeness.
Updated `StorageDriverContext` to include a `Variable` parameter, ensuring more precise context handling for variable-related operations. Adjusted relevant method calls to pass the required `Variable` argument where necessary.
This update introduces the ability to optionally wait for child workflows to complete before finishing the ExecuteWorkflow activity. A bookmark mechanism is used to resume the activity when the child workflow completes. Additionally, a new handler was added to manage the resumption of these workflows upon completion events.
Introduced `Output` message and related data serialization/deserialization methods in `ProtoOutputExtensions`. Updated `WorkflowExecutionResult` and impacted methods to include `Output` handling. Enhanced workflow runtime logic to manage and integrate output data.
Introduced a new `ExecuteWorkflow` activity that allows executing nested workflows. Added `ExecuteWorkflowResult` model to handle results and integrated component tests to verify nested workflow execution. Enhanced `IWorkflowBuilder` to support fluent methods for adding outputs.
Ensure that only the latest version of each workflow definition is processed by grouping and selecting the highest version. This change helps prevent redundant updates and ensures data consistency.
* Add workflow graph network builder and child workflow finder
Introduce IWorkflowGraphNetworkBuilder and IChildWorkflowFinder interfaces with their implementations to build and manage workflow graph networks. Additionally, register new services and handlers to support these functionalities in the Workflow Management feature.
* Remove unused workflow graph network builder
Deleted the unused `IWorkflowGraphNetworkBuilder` interface, its implementation, and related files. Updated affected classes to replace dependency on the removed builder with direct methods. Enhanced affected workflows tracking during publication.
* Optimize workflow update logic to skip redundant checks
Added condition to ensure only relevant activities are processed by verifying their version IDs. This reduces unnecessary computations and ensures the system skips already up-to-date workflow activities.
* Add workflow reference updater implementation
Introduced IWorkflowReferenceUpdater interface to manage workflow references updates. Implemented the corresponding service and integrated it into existing event handling logic. This improves maintainability and reduces code duplication by isolating the reference update logic.
* Set workflow activity version during update
Added a missing assignment of the workflow activity version in the `UpdateWorkflowDefinition` method. This ensures that the `Version` field is properly set when workflow definitions are updated.
* Remove UpdateReferencesInConsumingWorkflows method
Eliminated the UpdateReferencesInConsumingWorkflows method from IWorkflowDefinitionPublisher and its implementation from WorkflowDefinitionPublisher. The responsibility of updating workflow references is now transitioned to IWorkflowReferenceUpdater used in the `UpdateReferences` endpoint.
* Remove WorkflowGraphNetwork and WorkflowGraphNode models
These models were deleted as they are no longer needed in the system. The removal helps in reducing code clutter and improves maintainability by eliminating unused components.
* Refactor parameter naming in IWorkflowReferenceUpdater
Renamed 'definition' to 'referencedDefinition' for clarity in the IWorkflowReferenceUpdater contract and its implementation. This change makes it explicit that the parameter refers to the workflow definition being referenced, ensuring the code is more understandable and maintainable.
* Update WorkflowReferenceUpdater for clarity and accuracy
Renamed variables and updated comments for better clarity. The term "matchingWorkflowGraphs" was changed to "consumingWorkflowGraphs" to more accurately describe its purpose. Adjusted comment to clarify the materialization process of the draft version.
* Add IsReadonly filter to WorkflowDefinitionFilter
This ensures that only non-readonly workflow definitions are fetched. It enhances the accuracy of workflow updates by filtering out readonly versions.
This commit decorates the WorkflowInstanceHub class with the [Authorize] attribute to ensure that only authorized users can connect to the SignalR hub. This change improves the security of the workflow event notification system.
* Refactor AdditionalConvertersConfigurator constructor
Simplify AdditionalConvertersConfigurator by using constructor injection directly in the class declaration. Also, annotate the class with [UsedImplicitly] to improve code clarity and maintainability.
* Update workflow serialization to be asynchronous
Refactor the workflow definition serialization to use asynchronous operations, improving efficiency and handling cancellation tokens. This change ensures the schema is correctly included in the serialized output.
* Remove outdated sample workflows and activities
Deleted CompositeExample, SampleWorkflow, and SlowActivity classes as they are no longer needed. These deletions help clean up the codebase and maintain relevance in the code structure.
* Handle null WorkflowBuilderType in ClrWorkflowMaterializer
Introduce a fallback NotFoundWorkflowbuilder class when WorkflowBuilderType is null. This ensures the MaterializeAsync method functions even if the provided context lacks a specific workflow builder type.
* Add merging of itemDictionary to input
This change ensures that the itemDictionary's contents are also merged into the input dictionary, preventing possible data loss. It builds on existing logic by adding an additional merge operation to incorporate all necessary data.
* Add new workflows to BulkDispatchWorkflows and modify tests
Introduce `FruitWorkflow` and `MixFruitsWorkflow` for bulk dispatch scenarios. Refactor `BulkDispatchWorkflowsTests` to include new tests and rename signals for clarity. Optimize `BulkDispatchWorkflows` activity by removing redundant dictionary merge.
Add null checks for `referenceResolver` in cases where `RefPropertyName` and `IdPropertyName` are being processed. This prevents potential null reference exceptions and ensures safer deserialization of objects.
Introduce JsonNodeBsonConverter for BSON serialization of JsonNode objects. Update MongoDbFeature to register the new serializer, enhancing JSON handling within MongoDB serialization context.
Switched from a hardcoded version to a property variable `$(SystemTextJsonVersion)` for the `System.Text.Json` package reference in multiple project files. This change centralizes version management and ensures consistency across all projects.
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.
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.
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.
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.
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.
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.
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.