elsa-core/src/modules/Elsa.Workflows.Runtime
RalfvandenBurg 09d768791a
Assign Tenant.AgnosticTenantId in populator (#7252)
* Assign Tenant.AgnosticTenantId in populator

* Corrected comment

* Fix entities persisted with NULL TenantId instead of default tenant

Use normalized TenantId property (which returns empty string for default tenant) instead of Tenant?.Id (which returns null when no tenant is set).

When Tenant?.Id returned null: TenantAwareDbContextFactory set dbContext.TenantId to null, ApplyTenantId skipped assigning TenantId, entities were saved with NULL TenantId, and query filters using SQL equality against NULL never matched these entities.

This affected all EF Core stores including BookmarkStore and any store using bulk upsert operations.

Co-authored-by: Cursor <cursoragent@cursor.com>

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

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* PR comments

* Set Tenant.AgnosticTenantId when no tenantId is specified

---------

Co-authored-by: Ralf <Ralf@Careconnections.nl>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-09 11:03:49 +01:00
..
ActivationValidators
Activities Adds Publish Event Activity Tests (#7093) 2025-11-25 19:06:16 +01:00
Bookmarks
Commands
Comparers
Constants
Contexts
Contracts Improves workflow deletion and task scheduling (#7088) 2025-11-21 20:58:38 +01:00
Entities Refactor activity execution record serialization with snapshots (#6807) 2025-07-18 14:14:19 +02:00
Exceptions
Extensions Add Elsa Script DSL (#7076) 2025-11-25 19:57:50 +01:00
Features Merge remote-tracking branch 'origin/patch/3.5.3' into develop/3.6.0 2025-12-10 20:48:50 +01:00
Filters Addresses warnings and enforces null safety (#7051) 2025-11-12 16:56:31 +01:00
Handlers Ensure graceful handling of missing ParentInstanceId in ResumeBulkDispatchWorkflowActivity and add signal-based wait in DeleteWorkflowTests. 2026-01-30 21:41:27 +01:00
LogPersistence Refactor activity execution record capturing (#6836) 2025-08-04 08:44:42 +02:00
Matches
Messages
Middleware Merge remote-tracking branch 'origin/main' into release/3.6.0 2025-12-29 19:57:50 +01:00
Models Add Elsa Script DSL (#7076) 2025-11-25 19:57:50 +01:00
Notifications Add workflow dispatch notifications 2025-12-20 22:30:43 +00:00
Options
OrderDefinitions Add support for ordered and paginated trigger retrieval 2025-05-26 21:15:54 +02:00
Parameters
Params
Providers Assign Tenant.AgnosticTenantId in populator (#7252) 2026-02-09 11:03:49 +01:00
Requests Addresses warnings and enforces null safety (#7050) 2025-11-12 15:53:23 +01:00
Responses
Results
Services Assign Tenant.AgnosticTenantId in populator (#7252) 2026-02-09 11:03:49 +01:00
Stimuli
Stores Add support for ordered and paginated trigger retrieval 2025-05-26 21:15:54 +02:00
Tasks
UIHints
Elsa.Workflows.Runtime.csproj
Elsa.Workflows.Runtime.csproj.DotSettings
FodyWeavers.xml
IsExternalInit.cs
RuntimeStimulusNames.cs