Skip to content

Add @TemporalOperation annotation for Nexus operations #2928

Draft
Quinn-With-Two-Ns wants to merge 3 commits into
temporalio:mainfrom
Quinn-With-Two-Ns:NEXUS-415
Draft

Add @TemporalOperation annotation for Nexus operations #2928
Quinn-With-Two-Ns wants to merge 3 commits into
temporalio:mainfrom
Quinn-With-Two-Ns:NEXUS-415

Conversation

@Quinn-With-Two-Ns

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

What was changed

Introduces @TemporalOperation, a method-level annotation that declares a Temporal-backed Nexus operation directly on a @ServiceImpl class. The framework wraps the annotated method as the start handler with default cancel behavior, removing the boilerplate of a separate TemporalOperationHandler for the common workflow-run case. @OperationImpl is still supported for custom cancel or handler composition, and both annotations can coexist on the same service (but not the same method).

Why?

Make it easier to define Nexus Operation Handlers by having less boilerplate between the interface and the implementation

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

Note requires nexus-rpc/sdk-java#46 to be merged

@Quinn-With-Two-Ns Quinn-With-Two-Ns changed the title Nexus 415 Add @TemporalOperation Annotation Jul 6, 2026
@Quinn-With-Two-Ns Quinn-With-Two-Ns changed the title Add @TemporalOperation Annotation Add @TemporalOperation annotation for Nexus operations Jul 6, 2026
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.

1 participant