2025-07-16 16:05:32 +00:00
|
|
|
using Elsa.Common;
|
|
|
|
|
using Elsa.Common.Codecs;
|
2024-10-25 17:41:10 +00:00
|
|
|
using Elsa.Workflows.LogPersistence;
|
2025-07-16 16:05:32 +00:00
|
|
|
using Elsa.Workflows.Management.Options;
|
2023-10-10 10:34:32 +00:00
|
|
|
using Elsa.Workflows.Runtime.Entities;
|
2025-07-16 16:05:32 +00:00
|
|
|
using Elsa.Workflows.Runtime.Extensions;
|
Add a more generic UIHandler to customize how inputAttributes can be handle by UI (#4688)
* add a more generic UIHandler to customize how inputAttributes can be handle by the ui
* Add IPropertyUIHandlerResolver and update PropertyUIHandlerResolver
Introduced a new interface, IPropertyUIHandlerResolver, to resolve UI options for a property. Refactored PropertyUIHandlerResolver to implement this interface and removed the unnecessary partial class structure. Also, cleaned up some unnecessary usings in various files for better code organization.
* Refactor variable name and description in InputDescriptor
The 'uISpecifications' variable in the InputDescriptor model is renamed to 'uiSpecifications' for better readability. Additionally, the associated comment was revised to explain that the dictionary is used by the UI.
* "Refactor codebase for improved organization and cleaner architecture"
The codebase has been significantly refactored, moving several classes to more appropriate namespaces for improved organization and cleaner architecture. This includes shifting UI hint handlers, activities, and memory-related components, amongst others. The changes should improve code readability and maintainability, but as this is a broad refactoring effort, thorough regression testing is advised.
* Add CheckList UIHint with associated handler and provider
This update introduces a new UIHint called CheckList to the Elsa.Workflows.Core. This includes the necessary handler and provider classes. The handler is registered in the WorkflowsFeature.cs, and the CheckList UIHint key has been added to the InputUIHints.cs. Various associated files have been created in both the Elsa.Api.Client and Elsa.Workflows.Core project to support this new UIHint.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2023-12-26 17:56:29 +00:00
|
|
|
using Elsa.Workflows.State;
|
2025-07-16 16:05:32 +00:00
|
|
|
using Microsoft.Extensions.Options;
|
2023-10-10 10:34:32 +00:00
|
|
|
|
Add Bookmark Queue and Restore Background Activity Execution (#5758)
* Update package versions and add PrivateAssets attributes
Updated multiple package versions to the latest releases and added the `PrivateAssets="All"` attribute to several dependencies to improve project isolation. This ensures that the specified packages will not be propagated as transitive dependencies.
* Fix incorrect serializer and generator references.
Replaced `_payloadSerializer` and `_identityGenerator` with `payloadSerializer` and `identityGenerator` respectively. This resolves potential null reference issues and ensures the correct instances are used during workflow and definition processing.
* Refactor background activity scheduling logic
Moved the state commit outside of the deferred task to ensure workflow state is saved before scheduling activities. This change ensures the workflow instance is updated promptly, preventing potential concurrency issues.
* Add bookmark queue management system
Introduced a comprehensive bookmark queue system to manage and process bookmarks efficiently. This includes entities, stores, filters, processors, and workers for both in-memory and distributed environments. Additionally, added notifications to signal bookmark queue workers and updated related contracts.
* Add state commit handler with various implementations
Introduced ICommitStateHandler for committing workflow state. Provided NoopCommitStateHandler and StoreCommitStateHandler implementations. Updated namespaces and dependencies across the project to incorporate these changes.
* Fix order in CommitAsync method for proper task execution
Reorder `ExecuteDeferredTasksAsync` after `SaveAsync` in `CommitAsync` method to ensure that deferred tasks execute correctly after the state is saved, addressing potential issues with task execution dependencies.
* Remove unused and deprecated middleware and annotations
Deleted unused classes `ExecuteDeferredActivityTasks` and `ScheduleBackgroundActivitiesMiddleware`. Removed unnecessary summary tags and unused usings across multiple files to clean up the codebase.
* Remove unnecessary initial migration files
Deleted initial migration files for alterations, management, and identity contexts. These files are no longer needed and their removal helps keep the repository clean and maintainable.
* Add delay in TriggerBookmarkQueueWorker loop
Introduced a 10-second delay within the while loop of TriggerBookmarkQueueWorker. This change aims to alleviate potential tight loop issues, ensuring better performance and resource management.
* Enable all database providers in migration script
Uncomment the providers array and add previously commented database providers (SqlServer, Sqlite, PostgreSql, Oracle). This ensures compatibility with multiple database systems during the migration process.
* Remove unused Microsoft.Extensions.DependencyInjection import
The import statement for `Microsoft.Extensions.DependencyInjection` was not being utilized and has been removed. This cleanup helps in maintaining cleaner and more readable code without unnecessary imports.
* Add Dapper persistence support for bookmark queue
Introduced a new Dapper-based bookmark queue store and related classes for handling bookmark queue items. Various migrations were added to support the new `BookmarkQueueItems` table with tenant-specific columns. Refactored existing EF Core and in-memory bookmark queue item stores to use a unified interface.
* Add MongoBookmarkQueueStore implementation
Added a MongoDB-based BookmarkQueueStore to handle CRUD operations for bookmark queue items. Updated the workflow runtime persistence feature to include and utilize this new store for managing bookmark queue items.
* Add migration helper for altering columns and update keys
Introduced MigrationHelper to simplify altering DateTime and Boolean columns. Updated keys in KeyValueStore and KeyValueFilter classes to use 'Id' instead of 'Key'. Revised migration scripts to utilize the new helper methods for modifying column types.
* Prevent BookmarkQueueWorker.Stop from cancelling when not running
Previously, the Stop method would always cancel the token source regardless of the worker's state. By checking if the worker is running before cancelling, we avoid unnecessary operations and potential errors related to an already cancelled token source.
* Update database schema and bookmark handling logic
Refactored various database migration scripts to allow nullable `WorkflowInstanceId` fields and added new fields such as `ActivityInstanceId` and `CorrelationId`. Enhanced bookmark queue and bound workflow handling logic to support these new fields, ensuring precise and efficient workflow execution and queuing.
* Refactor BookmarkHash to StimulusHash and introduce ActivityTypeName
Renamed BookmarkHash to StimulusHash across multiple components and added ActivityTypeName to enhance traceability. Updated indices, filters, and entities for this change, ensuring consistent naming and improved functionality.
* Remove unnecessary timeouts in AzureServiceBusTests.
Eliminated redundant timeout parameters in _signalManager.WaitAsync calls to streamline test execution and reduce potential waiting time. This change ensures more efficient and accurate testing synchronization.
* Rename and refactor BookmarkQueueWorkerSignaler
Renamed IBookmarkQueueWorkerSignaler to IBookmarkQueueSignaler across the project for clarity. Updated related classes and methods to reflect this change. Added bookmark queue signaling to ensure new items are processed, and renamed BookmarkQueueStore to EFBookmarkQueueStore for consistency.
* Refactor EF Core stores and add migration field
Refactored EF Core store classes to simplify field usage and constructors. Added "CorrelationId" field and created corresponding index in SQLite and PostgreSQL migration files to support new functionality.
* Update workflow context ID and optimize Task handling
Added `ParentInstanceId` to `BulkDispatchWorkflowsStimulus` for context propagation. Also, reset `TaskCompletionSource` in `BookmarkQueueSignaler` to reduce memory usage and ensure proper task lifecycle management.
* Update async method signature and fix variable usage
Modified `AddAsync` to include the `OnSaveAsync` parameter. Corrected the variable used for `parentInstanceId` and utilized `ActivityTypeNameHelper` for generating type names.
* Reset migrations to 3.2
* Generate 3.3 migrations
2024-07-15 20:37:14 +00:00
|
|
|
namespace Elsa.Workflows.Runtime;
|
2023-10-10 10:34:32 +00:00
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
2025-07-16 16:05:32 +00:00
|
|
|
public class DefaultActivityExecutionMapper(
|
2025-07-18 12:14:19 +00:00
|
|
|
ISafeSerializer safeSerializer,
|
2025-07-16 16:05:32 +00:00
|
|
|
IPayloadSerializer payloadSerializer,
|
|
|
|
|
ICompressionCodecResolver compressionCodecResolver,
|
|
|
|
|
IOptions<ManagementOptions> options) : IActivityExecutionMapper
|
2024-04-12 13:00:00 +00:00
|
|
|
{
|
2025-07-16 16:05:32 +00:00
|
|
|
/// <inheritdoc />
|
|
|
|
|
public async Task<ActivityExecutionRecord> MapAsync(ActivityExecutionContext source)
|
2024-04-12 13:00:00 +00:00
|
|
|
{
|
2025-04-17 16:03:06 +00:00
|
|
|
var outputs = source.GetOutputs();
|
|
|
|
|
var inputs = source.GetInputs();
|
|
|
|
|
var persistenceMap = source.GetLogPersistenceModeMap();
|
2025-04-18 12:29:18 +00:00
|
|
|
var persistableInputs = GetPersistableInputOutput(inputs, persistenceMap.Inputs);
|
|
|
|
|
var persistableOutputs = GetPersistableInputOutput(outputs, persistenceMap.Outputs);
|
|
|
|
|
var persistableProperties = GetPersistableDictionary(source.Properties!, persistenceMap.InternalState);
|
2025-04-18 14:21:25 +00:00
|
|
|
var persistableJournalData = GetPersistableDictionary(source.JournalData!, persistenceMap.InternalState);
|
2025-07-16 16:05:32 +00:00
|
|
|
var cancellationToken = source.CancellationToken;
|
2024-04-12 13:00:00 +00:00
|
|
|
|
2025-07-16 16:05:32 +00:00
|
|
|
var record = new ActivityExecutionRecord
|
2023-10-13 08:34:21 +00:00
|
|
|
{
|
|
|
|
|
Id = source.Id,
|
|
|
|
|
ActivityId = source.Activity.Id,
|
2023-10-25 20:46:06 +00:00
|
|
|
ActivityNodeId = source.NodeId,
|
2023-10-13 08:34:21 +00:00
|
|
|
WorkflowInstanceId = source.WorkflowExecutionContext.Id,
|
|
|
|
|
ActivityType = source.Activity.Type,
|
|
|
|
|
ActivityName = source.Activity.Name,
|
2025-04-17 16:03:06 +00:00
|
|
|
ActivityState = persistableInputs,
|
|
|
|
|
Outputs = persistableOutputs,
|
2025-05-30 13:37:57 +00:00
|
|
|
Properties = persistableProperties!,
|
|
|
|
|
Metadata = new Dictionary<string, object>(source.Metadata),
|
2025-04-18 14:21:25 +00:00
|
|
|
Payload = persistableJournalData!,
|
2023-10-13 08:34:21 +00:00
|
|
|
Exception = ExceptionState.FromException(source.Exception),
|
|
|
|
|
ActivityTypeVersion = source.Activity.Version,
|
|
|
|
|
StartedAt = source.StartedAt,
|
|
|
|
|
HasBookmarks = source.Bookmarks.Any(),
|
2025-01-20 12:58:11 +00:00
|
|
|
Status = source.Status,
|
Refactor Fault Propagation and Simplify Bookmark Management (#6545)
* Refactor bookmark management and add new features
Streamlined bookmark handling by eliminating temporary storage in `ActivityExecutionContext` and directly managing bookmarks in `WorkflowExecutionContext`. Documented architectural decisions using ADRs.
* Regenerate EF Core migrations
* Refactor fault tracking to use AggregatedFaultCount property.
Replaces FaultCount with AggregatedFaultCount across the codebase to improve clarity and consistency in fault tracking. Updates related methods, properties, and data mappings to align with the new terminology. Fixes initialization issue with nullable inputs in Fault class.
* Add migration to track fault counts in runtime (V3.5)
This migration adds a new column, "AggregatedFaultCount," to the "ActivityExecutionRecords" table. The column is an integer, non-nullable, with a default value of 0, and enables tracking aggregated fault occurrences. The migration also includes a rollback to remove this column if needed.
* Fix typo in ADR 0004 regarding bookmark management convention
Corrected a spelling mistake in the ADR documentation by changing "determins" to "determines." This ensures clarity and maintains the professionalism of the document. No functional changes were made.
* Refine fault propagation logic for child-parent activities
Replace automatic fault transitions of parent activities with an aggregate fault count for descendant activities. This avoids premature state changes while still indicating child activity faults, improving workflow resilience and accuracy.
* Remove signal-driven fault propagation ADR and renumber bookmarks ADR
The ADR for signal-driven fault propagation was deleted, and the direct bookmark management ADR was renamed and renumbered accordingly. Related references in the table of contents, graph, and solution file were updated to reflect these changes.
* Refactor DeleteBookmarks to improve readability.
Reformatted the BookmarkFilter initialization for better clarity and maintainability. This change ensures the code is more aligned with modern C# conventions and improves overall readability. No behavior or functionality has been altered.
* Refactor naming for "AggregatedFaultCount" to "AggregateFaultCount"
Standardized the terminology across the codebase and migrations by renaming all references of "AggregatedFaultCount" to "AggregateFaultCount" for improved consistency and readability. Updated relevant logic, models, migrations, and database contexts accordingly.
2025-04-10 13:01:49 +00:00
|
|
|
AggregateFaultCount = source.AggregateFaultCount,
|
Adds activity execution call stack support (#7271)
* Adds activity execution call stack support
Implements a call stack mechanism to track the execution chain, enabling visibility into the invocation hierarchy.
Introduces new fields to scheduling models and runtime contexts to store call stack information.
Includes EF Core migrations for various database providers to support new columns in `ActivityExecutionRecords`.
Provides an API to query and reconstruct the call stack for a given activity execution.
* Refactor: Replace `PagedCallStackResult` with `Page<T>` for execution chain pagination
* Remove ambient scheduling scope logic and related methods
Simplifies scheduling logic by removing ambient scope mechanisms, refactoring scheduling context handling, and updating affected classes accordingly.
* Add `GetCallStackAsync` to `IActivityExecutionsApi` for querying activity execution call stack
* Add new properties to `ActivityExecutionRecord` for scheduling and execution tracking
Introduce fields for aggregated fault count, scheduling context, workflow instance details, and call stack depth to enhance execution monitoring and debugging capabilities.
* Add call stack visualization for activity executions
Introduced components and models to display a call stack for activity executions in the Workflow Instance Viewer. This includes UI elements for call stack rendering, error handling, and data integration with activity execution records.
* Remove obsolete ambient scheduling properties from WorkflowExecutionContext
* Fix infinite loop issues in activity execution chain traversal
Added cycle detection using a `HashSet` to prevent infinite loops when traversing activity execution chains in multiple storage implementations. Updated unit tests to validate correct handling of circular references and chain traversal.
* Refactor activity execution chain retrieval logic
Centralized the `GetExecutionChainAsync` method into an extension class to streamline and unify its implementation across stores. Removed redundant implementations from individual stores and updated interfaces to utilize the new extension method. This reduces code duplication and simplifies future maintenance.
* Add CallStackDepth property to activity contexts
Integrated the `CallStackDepth` property into `ActivityExecutionContext`, `ActivityExecutionContextState`, and related classes to track and manage the call stack depth of activity executions. Removed obsolete depth calculation logic to streamline the process.
* Add unit tests for call stack depth calculations and persistence
- Add `WorkflowExecutionContextTests` to verify correct calculation of call stack depth during activity execution.
- Add `WorkflowStateExtractorTests` to ensure call stack depth is preserved during state extraction and application.
* Update src/modules/Elsa.Workflows.Api/Endpoints/ActivityExecutions/GetCallStack/Endpoint.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/modules/Elsa.Workflows.Api/Endpoints/ActivityExecutions/GetCallStack/Endpoint.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Enhance activity execution handling with ID filter and task completion logic
- Implement `ActivityExecutionRecordFilter` for precise query matching by ID.
- Add await logic for task completion in command handler middleware.
* Add missing indexes for call stack columns in V3_7 migrations (#7250)
* Initial plan
* Add missing indexes for call stack columns in all provider migrations
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
* Optimize migrations by creating columns with correct indexable types
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
* Add unit tests for ActivityExecutionStoreExtensions
- Introduce tests for `GetExecutionChainAsync` covering scenarios of empty results, single records, multi-level chain traversal, workflow boundary constraints, pagination, and circular references.
* Refactor tests for `ActivityExecutionStoreExtensions`
- Replace mock setup with `CreateStore` helper for clean and clear test arrangements.
- Remove unused imports and clean up test setup for improved readability and maintenance.
* Remove unused imports from ActivityExecutionLogStore in Elsa.Persistence.EFCore module.
* Removes obsolete planning document
Removes the activity execution call stack planning document
as the feature has been implemented.
* Remove DefaultActivityExecutionMapperTests
- Deleted `DefaultActivityExecutionMapperTests.cs` as the test class is no longer in use and redundant.
* Address review feedback: Fix corrupted test, Oracle migrations, and call stack depth calculation (#7272)
* Initial plan
* Fix corrupted DefaultActivityExecutionMapperTests.cs test file
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
* Fix Oracle migration snapshot to use NCLOB for large text fields
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
* Optimize GetExecutionChainAsync to avoid loading all workflow instance records
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
* Fix CallStackDepth calculation to support cross-workflow invocations
- Add SchedulingCallStackDepth to ActivityInvocationOptions
- Update WorkflowExecutionContext to use provided depth when scheduling context not found
- Remove problematic test that reveals pre-existing bug with duplicate contexts
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
* Improve documentation for CallStackDepth calculation
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
* Add WorkflowStateExtractor to ActivityTestFixture services
* Refactor `DefaultActivityExecutionMapperTests` with `ActivityTestFixture` and add project reference for shared testing utilities.
* Propagate SchedulingCallStackDepth through cross-workflow invocation chain (#7273)
* Initial plan
* Add SchedulingCallStackDepth propagation through cross-workflow invocation chain
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
* Add unit tests for CallStackDepth propagation across workflow boundaries
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
* Initial plan (#7274)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* Reduce NVARCHAR2 column sizes in Oracle migrations to optimize storage and improve performance.
* Change column types to NCLOB for large text fields in Oracle migrations to enhance data storage capacity.
* Update GitHub Actions to use .NET 10.x and refactor setup classes for consistency
* Improve test project detection in GitHub Actions by handling non-csproj files and updating project sorting mechanism.
* Enhance GitHub Actions to display .NET environment info and enforce .NET 10 toolchain for test execution.
* Update GitHub Actions to use .NET SDK 10.0.1xx and enforce its usage for builds and tests.
* Refine GitHub Actions workflow by narrowing test project search to the `test/unit` directory and removing unnecessary script checks.
* Remove redundant build step from GitHub Actions workflow.
* Enhance GitHub Actions workflow by adding multiple test directories and handling ignored failed sources in .NET restore.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
2026-02-24 14:23:59 +00:00
|
|
|
CompletedAt = source.CompletedAt,
|
|
|
|
|
SchedulingActivityExecutionId = source.SchedulingActivityExecutionId,
|
|
|
|
|
SchedulingActivityId = source.SchedulingActivityId,
|
|
|
|
|
SchedulingWorkflowInstanceId = source.SchedulingWorkflowInstanceId,
|
|
|
|
|
CallStackDepth = source.CallStackDepth
|
2023-10-13 08:34:21 +00:00
|
|
|
};
|
2024-04-12 13:00:00 +00:00
|
|
|
|
2025-07-18 12:14:19 +00:00
|
|
|
record = record.SanitizeLogMessage();
|
|
|
|
|
var compressionAlgorithm = options.Value.CompressionAlgorithm ?? nameof(None);
|
|
|
|
|
var serializedActivityState = record.ActivityState?.Count > 0 ? safeSerializer.Serialize(record.ActivityState) : null;
|
|
|
|
|
var compressedSerializedActivityState = serializedActivityState != null ? await compressionCodecResolver.Resolve(compressionAlgorithm).CompressAsync(serializedActivityState, cancellationToken) : null;
|
|
|
|
|
var serializedProperties = record.Properties != null ? payloadSerializer.Serialize(record.Properties) : null;
|
|
|
|
|
var serializedMetadata = record.Metadata != null ? payloadSerializer.Serialize(record.Metadata) : null;
|
|
|
|
|
record.SerializedSnapshot = new()
|
|
|
|
|
{
|
|
|
|
|
Id = record.Id,
|
|
|
|
|
TenantId = record.TenantId,
|
|
|
|
|
WorkflowInstanceId = record.WorkflowInstanceId,
|
|
|
|
|
ActivityId = record.ActivityId,
|
|
|
|
|
ActivityNodeId = record.ActivityNodeId,
|
|
|
|
|
ActivityType = record.ActivityType,
|
|
|
|
|
ActivityTypeVersion = record.ActivityTypeVersion,
|
|
|
|
|
ActivityName = record.ActivityName,
|
|
|
|
|
StartedAt = record.StartedAt,
|
|
|
|
|
HasBookmarks = record.HasBookmarks,
|
|
|
|
|
Status = record.Status,
|
|
|
|
|
AggregateFaultCount = record.AggregateFaultCount,
|
|
|
|
|
CompletedAt = record.CompletedAt,
|
|
|
|
|
SerializedActivityState = compressedSerializedActivityState,
|
|
|
|
|
SerializedActivityStateCompressionAlgorithm = compressionAlgorithm,
|
|
|
|
|
SerializedOutputs = record.Outputs?.Any() == true ? safeSerializer.Serialize(record.Outputs) : null,
|
|
|
|
|
SerializedProperties = serializedProperties,
|
|
|
|
|
SerializedMetadata = serializedMetadata,
|
|
|
|
|
SerializedException = record.Exception != null ? payloadSerializer.Serialize(record.Exception) : null,
|
|
|
|
|
SerializedPayload = record.Payload?.Any() == true ? payloadSerializer.Serialize(record.Payload) : null
|
|
|
|
|
};
|
|
|
|
|
|
2025-07-16 16:05:32 +00:00
|
|
|
return record;
|
2024-04-12 13:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
2025-07-16 16:05:32 +00:00
|
|
|
private IDictionary<string, object?> GetPersistableInputOutput(IDictionary<string, object> state, IDictionary<string, LogPersistenceMode> map, bool deepCopy = false)
|
2024-04-12 13:00:00 +00:00
|
|
|
{
|
|
|
|
|
var result = new Dictionary<string, object?>();
|
2025-04-17 16:03:06 +00:00
|
|
|
foreach (var stateEntry in state)
|
2024-04-12 13:00:00 +00:00
|
|
|
{
|
2025-04-17 16:03:06 +00:00
|
|
|
var mode = map.TryGetValue(stateEntry.Key, out var value) ? value : LogPersistenceMode.Include;
|
|
|
|
|
if (mode == LogPersistenceMode.Include)
|
|
|
|
|
result.Add(stateEntry.Key, stateEntry.Value);
|
2024-04-12 13:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-18 12:29:18 +00:00
|
|
|
private IDictionary<string, object?>? GetPersistableDictionary(IDictionary<string, object?> dictionary, LogPersistenceMode mode)
|
2024-10-25 17:41:10 +00:00
|
|
|
{
|
2025-05-30 13:37:57 +00:00
|
|
|
return mode == LogPersistenceMode.Include ? new Dictionary<string, object?>(dictionary) : null;
|
2024-10-25 17:41:10 +00:00
|
|
|
}
|
2023-10-10 10:34:32 +00:00
|
|
|
}
|