Skip to content

[Fix #1296] Prevent double loading of the same process instance#1297

Merged
ricardozanini merged 1 commit intoserverlessworkflow:mainfrom
fjtirado:Fix_#1296
Apr 10, 2026
Merged

[Fix #1296] Prevent double loading of the same process instance#1297
ricardozanini merged 1 commit intoserverlessworkflow:mainfrom
fjtirado:Fix_#1296

Conversation

@fjtirado
Copy link
Copy Markdown
Collaborator

Fix #1296

…ess instance

Signed-off-by: fjtirado <ftirados@redhat.com>
try (Stream<WorkflowInstance> stream = handlers.reader().scanAll(definition)) {
assertThat(stream.count()).isEqualTo(1);
}
definition.close();
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that I have to do this in order the test to work, it is enough proof that the change is working.
If the instance map is not clear, then the instance is reused and none of the methods are invoked, failing the test.

Copy link
Copy Markdown
Collaborator

@gmunozfe gmunozfe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, good catch @fjtirado !

@ricardozanini ricardozanini merged commit c8e2ac9 into serverlessworkflow:main Apr 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent loading the same process instance twice

3 participants