Tags: elsa-workflows/elsa-core
Tags
Generic activity name fix (#6698) * Refactor ActivityRegistry to populate all activities in workflow editor page - Modify ListAll to return distinct activity descriptors. - Update RegisterAsync to call Add with correct parameters. - Refactor RefreshDescriptorsAsync for better collection usage. - Split Add method into two overloads for clarity. - Improve logging for replacing existing activity descriptors. * Add FuncExpressionValueConverter for JSON serialization Implemented FuncExpressionValueConverter to handle serialization and deserialization of Func<ExpressionExecutionContext, ValueTask<object>> types, ensuring delegates are not serialized and cannot be rehydrated from JSON. Updated multiple serializers including ApiSerializer, BookmarkPayloadSerializer, JsonActivitySerializer, JsonPayloadSerializer, JsonWorkflowStateSerializer, and SafeSerializer to utilize the new converter in their JSON serialization options. * fix broken studio when when viewing suspended workflows * fix for tests * Refactor WorkflowStateExtractor for readability and safety Improved code formatting and consistency in the WorkflowStateExtractor class. Updated logic in several methods to enhance handling of input items, activity execution contexts, and completion callbacks. Replaced `First` with `FirstOrDefault` for safer item retrieval and added null checks to prevent exceptions. These changes improve overall code readability, maintainability, and safety within the workflow execution context. * Enhance ActivityDescriber with new functionality This commit introduces several improvements to the `ActivityDescriber` class, including: - A new `GetFriendlyActivityName` method for better naming of activity types. - Updates to `DescribeActivityAsync` to use the friendly name for `typeName` and `displayName`. - Refactoring of `flowPorts` initialization for improved readability. - Simplification of `GetInputProperties` and `GetOutputProperties` methods. - Streamlined creation of `OutputDescriptor` and `InputDescriptor` in their respective methods. - Addition of `DescribeInputPropertiesAsync` and `DescribeOutputPropertiesAsync` for asynchronous property descriptions. --------- Co-authored-by: Max Brooks <Max@compyl.com> Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Adds activity execution metadata support (#6699) * Add logging to DefaultActivityExecutionMapper constructor Introduced an ILogger dependency to DefaultActivityExecutionMapper and added a debug log statement in GetPersistableDictionary. This aids in tracking log persistence mode for improved debugging and state visibility. * Simplify activity execution log mapping logic. Replaced asynchronous mapping with synchronous mapping to simplify the logic flow. This change reduces task overhead and improves code clarity while maintaining functionality. * Update activity execution mapping and comment out unused method Replaced direct dictionary usage with a cloned dictionary to ensure data integrity in `DefaultActivityExecutionMapper`. Commented out an unused method in `ActivityExecutionExtensions` to suppress its execution for now. * Add logging to ActivityExecutionLogStore for property tracking Integrate ILogger to track and log details of activity execution records, specifically focusing on properties and their serialization. This enhancement improves debugging and provides better insights into the execution flow. * Introduce Metadata field for activity execution handling Replaces the use of Properties with Metadata across activity execution models and services for storing lightweight, persistent data. Updated serialization, database schema, and relevant APIs to support this change while ensuring backward compatibility. Adjusted logging and extension methods for Metadata integration. * Reset V3.5 Runtime Migrations * Add EF Core migrations for MySQL and SQL Server schema updates Introduced migrations to support schema changes for MySQL and SQL Server. Changes include new columns for bookmarks and activity execution records, updates to existing columns, and creation of additional indexes. These updates aim to enhance database structure and query performance. * Add support for metadata in workflow execution context Introduce a `Metadata` property to `ActivityExecutionContextState` to enhance workflow state management. Updated `WorkflowStateExtractor` to handle metadata merging and preservation. Added an alias for `RetryAttemptRecordList` in `ExpressionOptions` for improved type handling. * Remove logger dependency from DefaultActivityExecutionMapper Eliminated the ILogger dependency and related logging calls from DefaultActivityExecutionMapper to simplify the class. This reduces unnecessary coupling and streamlines the activity execution mapping process.
Update ElsaStudio package version to 3.4.0-preview.1025 Changed the ElsaStudioVersion to a new preview version and referenced it consistently in package definitions. This ensures centralized management of the version and supports the updated preview release.
Update Elsa.Studio package versions to 3.4.0-preview.991 Upgraded Elsa.Studio and related packages to the latest preview version (3.4.0-preview.991) from 3.4.0-preview.918. This ensures compatibility with the latest updates and fixes in the Elsa.Studio ecosystem.
Remove unused datadog compose file and update branch reference. The datadog compose file was removed from the solution as it is no longer needed. Additionally, the GitHub workflow was updated to reference the "rc/3.4.0" branch instead of "main" for the release process.
PreviousNext