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
{{ message }}
Repository navigation
Only the last workflow using schedule.on.all is started #1868
When two workflow definitions in the same WorkflowApplication use schedule.on.all, only the last registered one is ever started. Events for the other one are silently dropped.
The default AllStrategyCorrelationInfoFactory always returns the same singleton:
and InMemoryAllStrategyCorrelationInfo#init replaces its state (registrations and starter) for every definition, so the last one wins.
Reproduce: register two workflows with schedule.on.all (e.g. one on order.placed, another on order.shipped) and publish the matching events. Only the second workflow gets an instance.
changed the title [-]Two workflows scheduled with `schedule.on.all` in the same `WorkflowApplication` interfere: only the last one is ever started[/-][+]Only the last workflow using `schedule.on.all` is started[/+]on Nov 23, 2026
Currently we have one InMemoryAllStrategyCorrelationInfo per JVM. If we have two WorkflowApplication in the same JVM both uses the same InMemoryAllStrategyCorrelationInfo which sounds weird.
Proposal:
Allow one InMemoryAllStrategyCorrelationInfo per WorkflowApplication (1:1) and InMemoryAllStrategyCorrelationInfo for n WorkflowDefinition (1:n)
Allow one InMemoryAllStrategyCorrelationInfo per WorkflowApplication (1:1) and InMemoryAllStrategyCorrelationInfo per WorkflowDefinition (1:1)
@mathecruz
The way this is implemented, I think there should be one InMemoryAllStrategyCorrelationInfo per WorkflowDefinition.
There is a part of the information (the events) that can be stored an applicaiton level (thas why the persistence strategy is not affected by this PR, the event DB is global) to save some memory (but the event itself is not duplicated, just the list, so it is not big deal)
@mathecruz Im filing a PR for this one (since Im not sure we are fully aligned on the solution). Please check that the persistence implementation (Qflow should not be using this InMemory one for multi cluste) do not have the same issue. It should not, but Qflow is a good place to add a test to ensure it.
Activity
[-]Two workflows scheduled with `schedule.on.all` in the same `WorkflowApplication` interfere: only the last one is ever started[/-][+]Only the last workflow using `schedule.on.all` is started[/+]@ScheduleOn: support the full spec event consumption strategy, event filters, and correlation quarkiverse/quarkus-flow#630mathecruz commentedon Nov 23, 2026
Currently we have one
InMemoryAllStrategyCorrelationInfoper JVM. If we have two WorkflowApplication in the same JVM both uses the sameInMemoryAllStrategyCorrelationInfowhich sounds weird.Proposal:
InMemoryAllStrategyCorrelationInfoperWorkflowApplication(1:1) andInMemoryAllStrategyCorrelationInfofor nWorkflowDefinition(1:n)InMemoryAllStrategyCorrelationInfoperWorkflowApplication(1:1) andInMemoryAllStrategyCorrelationInfoperWorkflowDefinition(1:1)mathecruz commentedon Nov 23, 2026
I prefer the option 1, do you have another thing in mind @fjtirado?
fjtirado commentedon Nov 24, 2026
@mathecruz
The way this is implemented, I think there should be one InMemoryAllStrategyCorrelationInfo per WorkflowDefinition.
There is a part of the information (the events) that can be stored an applicaiton level (thas why the persistence strategy is not affected by this PR, the event DB is global) to save some memory (but the event itself is not duplicated, just the list, so it is not big deal)
fjtirado commentedon Nov 24, 2026
@mathecruz Im filing a PR for this one (since Im not sure we are fully aligned on the solution). Please check that the persistence implementation (Qflow should not be using this InMemory one for multi cluste) do not have the same issue. It should not, but Qflow is a good place to add a test to ensure it.
[Fix open-workflow-specification#1868] One correlation info per defin…