temporalio / temporalio/sdk-java
@WorkflowImpl(workers = "...") should support Spring property placeholders like taskQueues does
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 433
- Forks
- 249
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 26
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in WorkersTemplate.java with configureWorkflowImplementationsByWorkerName(), configureActivityBeansByWorkerName(), and configureNexusServiceBeansByWorkerName(), comparing their worker-name handling with the existing taskQueues placeholder resolution. Done means worker names supplied through application.yaml placeholders behave consistently across workflow, activity, and Nexus registrations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100