* Inital commit:
1. Fixed problem: (re-)added logic to search for workflow-as-activities based on DefinitionId (not only versionId)
2. Added tests for Deserialiazation so this logic cannot disappear "unnoticed" in the future.
* Found one flaw:
workflowDefinitionId is also used in other activities. Therefore, we must make sure to only search by workflowDefinitionId when the value is a string (e.g. when workflow used as activity, the value will always be a constant string, because the workflowDefinitionId cannot be resolved using expressions)
* Final attempt:
1) First try to find the activity by type name
2) Even if a descriptor is found by its type name, there might be multiple versions of a workflow-as-activity, hence; if the workflowDefinitionVersionId is specified, then this can override the initially found activity descriptor by type name.
3) Lastly, only when no activity descriptor is found by type name AND the activity JSON contains the property "workflowDeftinitionId", then we can search by workflowDefinitionId
* Add `net8.0` and `net9.0` targets, update package versions for resilience libraries.
* Exclude `net10.0` target framework from MySQL EF Core project due to Pomelo compatibility constraints.
* Remove unnecessary whitespace in MySQL EF Core project file
* Refactor `ActivityJsonConverterTests` to streamline registry setup and improve readability.
* Adds null activity descriptor lookup mock
Ensures the custom property lookup path is tested by mocking type name lookups to return null when searching for ActivityDescriptors.
* Fix activity descriptor override assignment in `ActivityJsonConverter`
Corrects the assignment logic for `activityDescriptor` and ensures `activityTypeVersion` uses the overridden descriptor's version when a custom property match is found.
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor `ActivityJsonConverter` for readability and logic improvements
- Adjust null-check handling for `activityDescriptor` overrides.
- Improve comment clarity and consolidate lambda expressions.
- Remove unnecessary whitespace.
* Add blob extension handling to `BlobStorageWorkflowsProvider`
- Introduce `BlobExtensions` for extracting blob file extensions.
- Add `SupportsExtension` to `IBlobWorkflowFormatHandler` to filter handlers by supported extensions.
* Remove unused workflow files and references in `Elsa.Server.Web`
- Deleted `flowchart-test.elsa` and `multi-workflow-example.elsa`.
- Removed corresponding references from the project file.
---------
Co-authored-by: Joey Barten - Founder Orbyss <joey.barten@unfussiness.io>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Introduce `FlowchartExecutionMode` to streamline flowchart execution logic.
- Added `FlowchartExecutionMode` enum to represent execution modes (Default, TokenBased, CounterBased).
- Updated flowchart-related integration and unit tests to use the new execution mode.
- Removed the global `UseTokenFlow` flag in favor of execution-specific configuration via `RunWorkflowOptions`.
- Refactored flowchart-related APIs and test helpers for improved flexibility and modularity.
* Add support for configuring flowchart execution behavior via `FlowchartOptions` and DI.
- Introduced extensions for `FlowchartFeature` to simplify configuration.
- Added DI support for setting default execution modes.
- Refactored flowchart execution logic to prioritize configuration.
* Update default Flowchart execution settings to align with version 3.5.2 behavior
- Changed `DefaultExecutionMode` to `CounterBased`.
- Updated `UseTokenFlow` default to `false`.
* Update src/modules/Elsa.Workflows.Core/Activities/Flowchart/Models/FlowchartExecutionMode.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/modules/Elsa.Workflows.Core/Activities/Flowchart/Extensions/FlowchartFeatureExtensions.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update test/integration/Elsa.Workflows.IntegrationTests/Scenarios/FlowchartNextActivity/Tests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/modules/Elsa.Workflows.Core/Activities/Flowchart/Extensions/RunWorkflowOptionsExtensions.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor flowchart integration tests for improved formatting and consistency
* Refactor workflow tests and related services to improve reusability and align with updated Flowchart execution behavior
* Update src/modules/Elsa.Workflows.Core/Activities/Flowchart/Options/FlowchartOptions.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor flowchart execution logic to use `FlowchartExecutionMode` enum, replacing boolean checks for improved clarity and extensibility.
* Refactor tests and workflow logic to replace boolean `useTokenFlow` with `FlowchartExecutionMode` enum for clarity and consistency.
* Refactor flowchart execution logic to centralize mode-based behavior handling and simplify implementation.
* Remove unnecessary whitespace in Flowchart.cs to improve code formatting
* Remove unnecessary whitespace in FlowJoinTests.cs to improve code formatting
* Update src/common/Elsa.Testing.Shared.Integration/WorkflowTestFixture.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/modules/Elsa.Workflows.Core/Activities/Flowchart/Activities/Flowchart.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Add Docker logs capturing step in GitHub Actions workflow for better debugging.
- Update PostgreSQL test container to use `postgres:16-alpine` with enhanced configuration options.
- Set database connection `Max Pool Size` to 20 in component tests.
* Add component tests for concurrent trigger indexing to prevent duplicate trigger registration in multi-engine workflows (#7130)
* Pin `dotnet-ef` version in `.config/dotnet-tools.json` to address migration bug, update EF Core script modules, and enhance `DesignTimeDbContextFactoryBase` with improved option description.
* Add migrations for EF Core SQLite and MySQL to include unique indexing on triggers.
* Update ConcurrentTriggerIndexing test to verify unique constraint enforcement and throw `DbUpdateException` for duplicate triggers
* Update src/modules/Elsa.Persistence.EFCore/Modules/Runtime/TriggerStore.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/modules/Elsa.Persistence.EFCore/Modules/Runtime/TriggerStore.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update EF Core script to include `Management` module and restore `Sqlite` provider in migration process
* Rename `SimpleHttpApiWorkflow.cs` to `HttpWorkflow.cs` in ConcurrentTriggerIndexing test.
* Remove 'locks' folder from project
Removed the 'locks' folder from the project structure.
* Clean up migration script by removing redundant column type changes
* Update EF Core Oracle migrations to change NVARCHAR2 fields to NCLOB for larger data storage
* Update EF Core Oracle migrations to use NCLOB for larger data storage
* Remove retry logic and logger dependency from EFCoreTriggerStore in TriggerStore implementation
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>