elsa-workflows / elsa-workflows/elsa-core

Stores save with TenantId = NULL but query with TenantId = '*'

Open
#7,253 1 comment 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

When queing a bookmarkitem:
INSERT INTO [Elsa].[BookmarkQueueItems] ([Id], [ActivityInstanceId], [ActivityTypeName], [BookmarkId], [CorrelationId], [CreatedAt], [SerializedOptions], [StimulusHash], [TenantId], [WorkflowInstanceId])
VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9);

Which yields this record :
SELECT TOP (1000) [Id]
,[BookmarkId]
,[TenantId]
FROM [0b24ea10-1623-438c-a522-64415527dc4f].[Elsa].[BookmarkQueueItems]
Id BookmarkId TenantId
bd72ebe4f0c07e00 c3b1593e12ddb001 NULL

Then The following query is executed:
SELECT [b].[Id], [b].[ActivityInstanceId], [b].[ActivityTypeName], [b].[BookmarkId], [b].[CorrelationId], [b].[CreatedAt], [b].[SerializedOptions], [b].[StimulusHash], [b].[TenantId], [b].[WorkflowInstanceId]
FROM [Elsa].[BookmarkQueueItems] AS [b]
WHERE [b].[TenantId] = @ef_filter__TenantId OR [b].[TenantId] = N'*'

Which doesn't yield the inserted record hence the bookmark isn't resumed. Prior to 3.6.0-rc3 with was still working

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.