You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you create an event with a correlationId for existing bookmarks it works as expected but if it goes to a queue, it is saved with a null value
This means that when a workflow instance is created it will activate instantly independent of the correlationId. In this case if I start a workflow with an unexpected correlationId, it is still executed. With the BookmarkQueue, giving a correlationId that does not exist puts it in the queue and then depending on the ttl executes it for workflows ignoring the correlationId
Steps to Reproduce
To help us identify the issue more quickly, please follow these guidelines:
Detailed Steps:
A simple scenario involves only an Event pretty much
If I were to run these events with correlation id's:
And now throw an event with a correlationId that is not expected
Note to achieve the result with 4 events it took 4 requests. For some reason the resume only picks up a single event to resume from the queue
Code Snippets:
In StimulusSender.ResumeExistingWorkflowsAsync the else block seems to be missing the CorrelationId assignment
else{// If no bookmarks were matched, enqueue the request in case a matching bookmark is created in the near future.varworkflowInstanceId=metadata?.WorkflowInstanceId;varbookmarkQueueItem=newNewBookmarkQueueItem{WorkflowInstanceId=workflowInstanceId,BookmarkId=metadata?.BookmarkId,StimulusHash=stimulusHash,Options=new(){Input=input,Properties=properties}};awaitbookmarkQueue.EnqueueAsync(bookmarkQueueItem,cancellationToken);}
Attachments:
Not sure how useful a 1 event workflow is workflow-1.json
Reproduction Rate:
Pretty much 100% I think there are rare cases where the queue gets removed before executing but that's probably rare.
Video/Screenshots:
See Steps to reproduced and details above
Additional Configuration:
BookmarkQueues enabled? (I'm not sure it's something we can turn off) The database doesn't really matter, it's not passed and not saved in any.
Expected Behavior
The event sits in the Queue because no workflow matches with the correlationId
Actual Behavior
The event executes other workflows that don't have the required correlationId to match up
Screenshots
See above
Environment
Elsa Package Version: Whatever main branch is, probably 3.3
Operating System: Windows 10
Browser and Version: Doesn't matter
Log Output
I think I basically provided why in Code Snippets
Troubleshooting Attempts
Breakpoint on trigger endpoint and following down the path to see the issue.
Additional Context
Related Issues
My own comments
I think just passing the CorrelationId in the else block would fix the issue. I can probably make a PR for you if this is not intended, it seems like a simple CorellationId pass between NewBookmarkQueueItem and BookmarkQueueItem. The database already expects this.
On a somewhat unrelated note is there even an option to turn this off?
The text was updated successfully, but these errors were encountered:
Description
When you create an event with a correlationId for existing bookmarks it works as expected but if it goes to a queue, it is saved with a null value
This means that when a workflow instance is created it will activate instantly independent of the correlationId. In this case if I start a workflow with an unexpected correlationId, it is still executed. With the BookmarkQueue, giving a correlationId that does not exist puts it in the queue and then depending on the ttl executes it for workflows ignoring the correlationId
Steps to Reproduce
To help us identify the issue more quickly, please follow these guidelines:
A simple scenario involves only an Event pretty much
If I were to run these events with correlation id's:
And now throw an event with a correlationId that is not expected
Note to achieve the result with 4 events it took 4 requests. For some reason the resume only picks up a single event to resume from the queue
In StimulusSender.ResumeExistingWorkflowsAsync the else block seems to be missing the CorrelationId assignment
Attachments:
Not sure how useful a 1 event workflow is
workflow-1.json
Reproduction Rate:
Pretty much 100% I think there are rare cases where the queue gets removed before executing but that's probably rare.
Video/Screenshots:
See Steps to reproduced and details above
Additional Configuration:
BookmarkQueues enabled? (I'm not sure it's something we can turn off) The database doesn't really matter, it's not passed and not saved in any.
Expected Behavior
The event sits in the Queue because no workflow matches with the correlationId
Actual Behavior
The event executes other workflows that don't have the required correlationId to match up
Screenshots
See above
Environment
Log Output
I think I basically provided why in Code Snippets
Troubleshooting Attempts
Breakpoint on trigger endpoint and following down the path to see the issue.
Additional Context
Related Issues
My own comments
I think just passing the CorrelationId in the else block would fix the issue. I can probably make a PR for you if this is not intended, it seems like a simple CorellationId pass between NewBookmarkQueueItem and BookmarkQueueItem. The database already expects this.
On a somewhat unrelated note is there even an option to turn this off?
The text was updated successfully, but these errors were encountered: