elsa-core/test/unit/Elsa.Workflows.Core.UnitTests/ObjectConversion
Sipke Schoorstra 1b8083a5c6
Update multitenancy logic and improve Result handling: (#7281)
* Update multitenancy logic and improve `Result` handling:

- Introduce `TenantsOptions` with `IsEnabled` flag to conditionally apply tenant-specific logic.
- Refactor `Result` class to support strongly-typed operations and async handlers.
- Implement tenant filters respecting multitenancy enablement.
- Enhance error logging for workflow definition addition, upgrading error handling.
- Refactor tests and storage drivers to use `IsSuccess` from `Result`.

* Update src/modules/Elsa.Workflows.Runtime/Services/DefaultWorkflowDefinitionStorePopulator.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add exception handling when accessing `Value` on failed results; introduce `ValueOrDefault` property for better null support.

* Add `ThrowIfFailure` method to handle exceptions in `Result` model and use it in `DefaultWorkflowRegistry` to ensure operation success.

* Normalize tenant ID handling by using `NormalizeTenantId()` in `DefaultWorkflowDefinitionStorePopulator`.

* Normalize tenant ID usage in unit tests by returning `tenantId.NormalizeTenantId()` in `DefaultWorkflowDefinitionStorePopulatorTests`.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-11 10:11:12 +01:00
..
Person.cs Fix ObjectConverter.ConvertTo to avoid using sourceTypeConverter.IsValid (#6972) 2025-10-16 13:51:37 +02:00
PersonTypeConverter.cs Fix ObjectConverter.ConvertTo to avoid using sourceTypeConverter.IsValid (#6972) 2025-10-16 13:51:37 +02:00
Tests.cs Update multitenancy logic and improve Result handling: (#7281) 2026-02-11 10:11:12 +01:00