The @WorkflowImpl annotation has two attributes for specifying which worker to register a workflow with:
workers - by worker name
taskQueues - by task queue
Currently, only taskQueues supports Spring property placeholders (e.g., ${my.property}), while workers does not. This inconsistency causes issues when sharing workflow modules across multiple services that need different worker names.
Current Behavior
In WorkersTemplate.java:
taskQueues - ✅ Resolves placeholders:
workers - ❌ Does NOT resolve placeholders:
Expected Behavior
Both workers and taskQueues should support Spring property placeholders for consistency:
Use Case
We have a shared workflow module used by multiple Spring Boot services. Each service configures its own worker name in application.yaml. We want to use:
Currently, this fails because the placeholder is not resolved, causing:
Workaround
Using taskQueues with a placeholder works:
However, this is inconsistent with the workers attribute behavior.
Proposed Fix
Add placeholder resolution in configureWorkflowImplementationsByWorkerName(), configureActivityBeansByWorkerName(), and configureNexusServiceBeansByWorkerName() methods in WorkersTemplate.java.