Skip to content

Add Standalone Activities support to Temporal Nexus Operation Handler#748

Open
Quinn-With-Two-Ns wants to merge 3 commits into
temporalio:mainfrom
Quinn-With-Two-Ns:NEXUS-389
Open

Add Standalone Activities support to Temporal Nexus Operation Handler#748
Quinn-With-Two-Ns wants to merge 3 commits into
temporalio:mainfrom
Quinn-With-Two-Ns:NEXUS-389

Conversation

@Quinn-With-Two-Ns

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

Copy link
Copy Markdown
Contributor

What was changed

Add Standalone Activities support to Temporal Nexus Operation Handler

Why?

Allow calling Standalone Activities as a Nexus Operation

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

Note

Medium Risk
Touches experimental Nexus operation lifecycle (async tokens, callbacks, cancel routing) and standalone activity RPC fields; behavior is covered by new unit and worker integration tests but spans client and handler paths.

Overview
Adds standalone activity backing for experimental Temporal Nexus TemporalOperationHandler, so handlers can return an async activity-execution operation token (type t=2) instead of only workflow-run tokens.

ITemporalNexusClient gains StartActivityAsync overloads (expression and by name) that schedule activities via NexusActivityStartHelper: default task queue from the operation, deterministic activity Id, Nexus request ID, inbound links, completion callbacks with Nexus-Operation-Token, and UseExisting on-conflict attach options. StartActivityOptions picks up internal links, callbacks, on-conflict, and request ID wired through StartActivityExecution.

Cancel on TemporalOperationHandler peeks token type with LoadTokenType, then cancels the workflow or standalone activity (overridable CancelActivityExecutionAsync). Activity and workflow proto ↔ Nexus link conversion is extended; workflow/activity starts from Nexus now add outbound links from the server response (workflow falls back to a synthetic started-event link). Shared start plumbing moves to NexusOperationStartCommon; workflow start docs note TaskQueue can default to the operation queue.

Reviewed by Cursor Bugbot for commit 84020ad. Bugbot is set up for automated code reviews on this repo. Configure here.

@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner June 16, 2026 16:47

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3f807fc513

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/Temporalio/Nexus/TemporalOperationHandler.cs Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 84020ad. Configure here.

Comment thread src/Temporalio/Nexus/NexusActivityStartHelper.cs
Comment thread src/Temporalio/Client/TemporalClient.Activity.cs
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