Skip to content

Support Spring property placeholders in @WorkflowImpl workers attribute - #2994

Open
sachinsharma3191 wants to merge 1 commit into
temporalio:mainfrom
sachinsharma3191:fix/2747-spring-worker-name-placeholders
Open

Support Spring property placeholders in @WorkflowImpl workers attribute#2994
sachinsharma3191 wants to merge 1 commit into
temporalio:mainfrom
sachinsharma3191:fix/2747-spring-worker-name-placeholders

Conversation

@sachinsharma3191

@sachinsharma3191 sachinsharma3191 commented Aug 10, 2026

Copy link
Copy Markdown

What was changed

Added environment.resolvePlaceholders(workerName) in three methods in WorkersTemplate.java:

  • configureWorkflowImplementationsByWorkerName
  • configureActivityBeansByWorkerName
  • configureNexusServiceBeansByWorkerName

Why?

Issue #2747: the workers attribute in @WorkflowImpl, @ActivityImpl, and @NexusServiceImpl did not resolve Spring property placeholders like ${my.worker.name}. The taskQueues attribute already resolves placeholders, so this makes workers consistent.

Checklist

  • Added resolvePlaceholders call in all three methods
  • Consistent with existing taskQueues placeholder resolution pattern

Fixes #2747

taskQueues already resolves placeholders via environment.resolvePlaceholders(),
but workers did not. Add the same resolution to configureWorkflowImplementationsByWorkerName,
configureActivityBeansByWorkerName, and configureNexusServiceBeansByWorkerName.

Fixes temporalio#2747
@sachinsharma3191
sachinsharma3191 requested a review from a team as a code owner August 10, 2026 01:19
@dplyukhin

Copy link
Copy Markdown
Contributor

Thanks for the contrib. Is this PR still in progress? The checklist isn't checked off. If in progress, please convert to a draft PR. Please also update the PR description to use the template we provide. Please also take note of the contributing guidelines - particularly AI-generated PRs. Please make sure to review AI contributions thoroughly yourself before opening a PR.

@sachinsharma3191

Copy link
Copy Markdown
Author

Thanks for the review! I've updated the PR description to use the repo's template format and checked off the checklist.

This addresses issue #2747 — adds resolvePlaceholders for the workers attribute, making it consistent with the existing taskQueues resolution. I've reviewed the change thoroughly.

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.

@WorkflowImpl(workers = "...") should support Spring property placeholders like taskQueues does

2 participants