* 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.
* Add initial implementation for Elsa Secrets modules
This commit introduces new projects for managing secrets within the Elsa framework: `Elsa.Secrets.Api`, `Elsa.Secrets.Core`, and `Elsa.Secrets.Management`. These projects include essential interfaces, models, entities, and endpoints to handle secret storage, retrieval, and management. Specific features include API endpoints for listing secrets, models for secret filtering, and interfaces for encryption key handling.
* Add weavers
* Refactor encryption handling in secrets management
Implemented a new architecture for handling encryption keys and algorithms within the secrets management system. Replaced old encryption key entities and related interfaces with a more modular and extensible approach. Added new services and models to improve encryption and decryption processes, enhancing maintainability and scalability.
* Add IEncryptor interface for encryption functionality
Introduced the IEncryptor interface to standardize encryption operations within the Elsa.Secrets.Management module. This interface includes the EncryptAsync method to handle encryption using a specified key ID and value.
* Add dependency on SecretsFeature and configure secrets provider
Integrate the SecretsFeature dependency and configure a secrets provider within the SecretsManagementFeature class. This adds the StoreSecretProvider to the service collection and ensures the secrets provider is correctly set up. Also, rename method from WithSecretsProvider to UseSecretsProvider for clarity.
* Add EF Core and SQLite support for Secrets module
Introduced Entity Framework Core and SQLite support for the Secrets module, including migration files, EF Core configurations, context factory, and store implementation. Added necessary extensions and configuration code to integrate with the existing API and features. Included updates to the main web application to utilize the new persistence providers.
* Update Microsoft.SemanticKernel to version 1.18.2
Upgrade Microsoft.SemanticKernel package to the latest version to ensure compatibility and new features. Remove unused Elsa.Agents.Persistence using directive from Program.cs for code cleanliness.
* Update workflows and add Agents module
Changed workflow branch targets from `main` to `feature/secrets`. Updated Docker image tags and added the `Agents` module to the Elsa Studio WebAssembly project.
* Enable agent activities in workflow configuration
This change introduces the `.UseAgentActivities()` method in the workflow configuration, enhancing the workflow capabilities. By doing so, it ensures that agent activities are appropriately integrated and available for use in the application.
* Add EF Core migrations for MySQL and SQL Server
Added Entity Framework Core migrations and related configurations to support MySQL and SQL Server for the Agents Persistence module. These changes include new migration files, context factories, and project configurations.
* Fix migration assembly reference and update method syntax
Changed the migration assembly reference in SqlServerProvidersExtensions. Updated method syntax in WorkflowManagementFeature to use array shorthand format.
* Add secret management functionalities
Introduced secret management services with CRUD operations, notifications, and bulk actions. Added unique name generation and validation for secrets, and implemented corresponding API endpoints.
* Enhance Secret Management Feature
Added Elsa.Extensions import and updated MemorySecretStore registration to use the AddMemoryStore method with Secret. This improves code modularity and adheres to the updated registration method conventions.
* Remove encryption services and update migration
Removed multiple files related to encryption services and their dependencies, including encryption algorithms and key providers. Also updated a migration script to reflect schema changes, removing specific columns and constraints.
* Implement versioning and retrieval for secrets management
Added "IsLatest" flag and cloning mechanism for secrets to support versioning. Introduced a new API endpoint for fetching decrypted secret input models. Refactored encryption and decryption logic to handle empty values gracefully.
* Add secret management functionalities
Introduced services and interfaces for secret name generation, validation, and updating. Updated secret handling to include expiration metadata. Refactored methods in ISecretManager to streamline secret creation and update processes.
* Remove DisableSyntaxSelection class and references
Deleted the DisableSyntaxSelection class and its references from various files. This includes removing its registration as a Scoped service and associated usage in the `RunJavaScript` activity.
* Add new migration for secrets and update DefaultSecretManager
Re-created migration files for V3_3 to include the ExpiresIn column. Updated DefaultSecretManager to utilize identityGenerator for generating Id and SecretId, and added additional fields like CreatedAt, UpdatedAt, and IsLatest.
* Add database initialization script and update dependencies
Added a script to initialize the 'tracelens' database and modified the Docker setup to include this script. Refactored and improved the ProtoActorFeature class, added OpenTelemetry dependencies, and updated project settings.
* Enable OpenTelemetry integration for Proto.Actor
Added OpenTelemetry environment configuration details to the README and included the Proto.OpenTelemetry package in the project file. Updated the ProtoActorFeature to apply tracing with OpenTelemetry to WorkflowInstanceActor.
* Refactor VariablePersistenceManager to use primary constructor
This refactor simplifies the VariablePersistenceManager by moving the storageDriverManager initialization into the primary constructor. It removes the redundant field and constructor, aligning with the concise nature of modern C# syntax, and ensures consistency in accessing the storageDriverManager throughout the class.
* Remove unused Open Telemetry code from Program.cs
The code for configuring Open Telemetry was commented out but not removed, cluttering the file. This commit cleans up Program.cs by deleting these unused lines, maintaining a cleaner and more readable codebase.
* Add metrics and tracing configurations for ProtoActorFeature
Introduced methods to enable metrics and tracing in ProtoActorFeature. Removed redundant properties and updated the workflow runtime to utilize the new configurations.
* Add Directory.Build.props for shared project settings
Introduce Directory.Build.props to centralize common project settings and dependencies. Consolidate target framework, language version, and package references to reduce duplication. Remove redundant property definitions from Elsa.Server.Web.csproj.
* Move apps from bundles to apps folder and Elsa module to modules folder
* Add reloading logic for workflow definitions
Introduced a new mechanism to handle reloaded workflow definitions. This includes creating a "ReloadedWorkflowDefinition" model, updating the caching logic, and modifying notification handlers to work with the enhanced workflow reloading logic. This ensures workflow definitions are updated and managed correctly when published, retracted, or deleted.
* Improve RefreshActivityRegistry documentation
Updated the XML documentation to clarify that `RefreshActivityRegistry` refreshes the `IActivityRegistry` for `WorkflowDefinitionActivityProvider` whenever workflow definitions are reloaded, instead of when they are published, retracted, or deleted.
* Add 'materializer' to user dictionary
The term 'materializer' has been added to the user dictionary to improve code spelling and naming consistency. This change ensures that 'materializer' is recognized as a correct term in the codebase.
* Organize test files by adding a 'Workflows' directory
Renamed 'http-workflow.json' to indicate it belongs under 'Workflows'. This improves file organization and clarity within the 'WorkflowDefinitionReload' scenario.
* Add TestWorkflowMaterializer and TestWorkflowProvider
Introduce `TestWorkflowMaterializer` for deserializing workflows from `TestWorkflowProvider`. Added integration of these new components in the `ReloadWorkflowTests` and `WorkflowServer`. Also renamed `RemoveReloadWorkflowTests` to `ReloadWorkflowTests`.
* Rename and expand workflow reload tests
Renamed `RemoveReloadWorkflowTests` to `ReloadWorkflowTests` to better reflect its purpose and expanded with additional test cases. Added tests to verify workflow and activity registry updates after source provider changes and workflow reloads.
* Update copy settings for workflow test scenarios
Reorganized and added 'CopyToOutputDirectory' settings for JSON files in workflow test scenarios. Ensured all necessary files are correctly included and copied during output directory builds to maintain test consistency.
* 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
Implemented new integration tests for serialization of programmatic workflows. Additionally, major refactoring was performed on the serialization classes. This involved moving the classes to new namespaces and enhancing their functionalities to correctly handle null inputs and to support the serialization of activities and expressions. Also, updated Elsa.sln.DotSettings and JsonActivitySerializer to handle new serializers.
Removed ICompressionStrategyResolver interface and file, and added ICompressionCodec and ICompressionCodecResolver interface. Updated relevant classes for the new interface. Specifically, added Zstd class under Compression as a new compression method. Also modified WorkflowInstanceStore.cs, None.cs, EFCoreWorkflowInstanceStore.cs, GZip.cs, and ActivityExecutionLogStore.cs for uniform compression terminology.
This update adds a compression feature for workflow state data to reduce storage needs. A compression strategy resolver, None and GZip strategies have been implemented. Migration scripts were also updated, and a superfluous file(s) were removed.
The term 'Unschedule' has been included to the UserDictionary within the Elsa solution settings. This update shows that 'Unschedule' is recognized in the context of the solution, thereby reducing the risk of related typographical errors.
Modified code formatting to enhance readability in several files including integration tests and workflow definitions. Order of project references in both Elsa.sln and Elsa.Server.Web.csproj files were rearranged. Unnecessary namespaces were also removed in BulkSuspendedWorkflow.cs and _build.csproj file saw a minor adjustment.
The new dictionary entry for 'Persister' has been added to Elsa.sln.DotSettings. This expands the vocabulary of the solution's user dictionary and ensures that 'Persister' is recognized as a valid term within the project context.
Removed HttpResponseHeaders class and refactored HttpRequestHeaders class into HttpHeaders. This commit merges the separate classes to represent HTTP headers into a single class, HttpHeaders. It also includes updates to the related files like HttpJavaScriptHandler and SendHttpRequestBase to reflect these changes.
* Initial version of BulkDispatchWorkflow
* Update comments
* Refactor options models for running workflows and add Properties
* Fix resumption
* Add ability to provide arguments when evaluating expressions
* Update args syntax for JS
* Fix ProtoActor Runtime Properties mapping
* Use default constructor
* Provide completed workflow instance ID as input to BulkDispatchWorkflows
* Implement ChildFaulted port
* Switch to Publish to make Memory service bus work
* Update input evaluation and activity output retrieval
Refined the input evaluation process to only consider inputs with AutoEvaluate set to true. Added a comment to clarify the purpose of the GetActivitiesWithOutputs method. Removed the unnecessary check for AutoEvaluate from the EvaluateInputPropertyAsync method.
In the scenario where this resolver is used, it's not about discovering ports, but about constructing a graph from the workflow by going through each activity or activities property.
* Implement Alteration types and engine
* Implement Alteration APIs
* Refactor activity work item with support for activity input
* Serialize scheduled activities as part of workflow state
* Add signal to schedule child activity
* Implement stores for plans and jobs
* Add EF Core provider
* Add Retry endpoint
* Keep root context as always active. The root context is the workflow execution context and contains persistent variable state
* Regenerate EF Core migrations
* Handle orphaned activity execution contexts
* Refactor workflow execution factory
* Enable configuring Jint from Program
* Update ModifyVariable alteration with support for type deserialization
* Use ShortGuid for identity
* Cleanup WorkflowServer host
* Adding set var and main/sub workflow tests
* Deprecate SetWorkflowOutput and replace with SetOutput
---------
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Incremental work
* Enable control over when to include full compositie root
* Cleanup
* Update WorkflowDefinitionActivity
* Implement input as variables
* Delete unused class
* Remove less common types
* Rename ExpandoObject to JSON
* Implement variable scoping
* Remove parent/child relationship from MemoryRegister
* Add support for sending input to "trigger event" endpoint
* Add support for configuring input storage driver
* Remove unused namespace imports
* Auto-register activity types when running a workflow
* Fix missing variables from containers
* Incremental work on samples
* Rename HTTP middleware and update samples
* Rename HTTP Activities to Workflows
* Automatically register core activities when adding Elsa
* Fix feature registration bug
* Add default auth feature
* Make activity serializer more flexible
* Bump designer version
* Add workflow server + designer samples
* Simplify EntityFrameworkCore projects
* Update solution
* Add Sqlite package references to ensure the correct version is used
* Update sample project with EF Core
* Update EF extensions
* Add server + designer sample project
* Cleanup AllInOne project and add some XML comments
* Rename ci.yml and add CI for Docker file
* Incremental work on Telnyx integration
* Incremental port of Telnyx activities
* Fix polymorphic JSON serialization for webhook data
* Fix IsFirstPass logic
* Fix trigger base to prevent activity auto completion
* Temporarily disable persistent snapshotting provider for testing
* Fix namespaces
* Add method to register activities in bulk using marker type
* Fix Telnyx refit client setup
* Register all Telnyx activities by default
* Incremental work on webhook driven resumption and correlation
* Incremental work on post-bookmark signaling
* Fix bookmark resolution
* Include correlation ID with bookmark
* Fix Telnyx resumption input
* Replace bookmark persisted signal with handler
* Fix SpeakText completion
* Add flow outcomes to SpeakText activity
* Update GatherUsingSpeak and GatherUsingaudio
* Refactor "is first pass" concept
* Fix WebhookEvent activity
* Add HTTP absolute URL provider
* Formatting and small changes
* Various API enhancements
* Initial experiment with implicit fork and join construct
* Implement flow execution counters
* Incremental work on FlowJoin
* Implement bookmark removal behavior
* Set icon for FlowJoin