Skip to content

Add Standalone Nexus operation sample#158

Open
Quinn-With-Two-Ns wants to merge 1 commit into
mainfrom
sano-samples
Open

Add Standalone Nexus operation sample#158
Quinn-With-Two-Ns wants to merge 1 commit into
mainfrom
sano-samples

Conversation

@Quinn-With-Two-Ns

Copy link
Copy Markdown

What was changed

Add Standalone Nexus operation sample

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner June 10, 2026 22:05
@jmaeagle99 jmaeagle99 self-assigned this Jun 10, 2026

@Evanthx Evanthx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Mostly just nits!

blocking process that runs until it receives a SIGINT (Ctrl + C) command.

```bash
dotnet run worker

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I ran this just to check it out, and I get this output:
[16:46:07] info: Program[0]
Running worker on task queue nexus-standalone-operations
[16:46:16] warn: Temporalio.Nexus:SayHello[0]
Invalid Nexus link: temporal:///namespaces/default/nexus-operations/nexus-standalone-hello-op/019eb914-5105-793f-9adc-455289d201bb/details
System.ArgumentException: Invalid path
at Temporalio.Nexus.ProtoLinkExtensions.ToWorkflowEvent(NexusLink link)
at Temporalio.Nexus.NexusWorkflowStartHelper.<>c__DisplayClass1_0.b__0(NexusLink link)
^C[16:46:33] info: Program[0]

Though I am running dotnet 10 (the main branch upgraded to version 10), not sure I am running the same server, etc, so mostly just figured I'd call it out for a double check.


### Steps to run this sample

1. Run the [Temporal dev server build that supports standalone Nexus operations](https://github.com/temporalio/cli/releases/tag/v1.7.1-standalone-nexus-operations). (If you are going to run locally, you will want to start it in another terminal; this command is blocking and runs until it receives a SIGINT (Ctrl + C) command.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be 1.7.2? That is what lines 10 and 29 have. And if you search 1.7.1 in the changed files, there are two other places specifying 1.7.1 in this PR.


> [!NOTE]
> Standalone Nexus operations require a server version that supports this feature. Use the dev
> server build at https://github.com/temporalio/cli/releases/tag/v1.7.2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I thought this was just version 1.7.2 at first - spotless added a line break, which breaks the web link.

var nexusClient = client.CreateNexusClient<IHelloService>(IHelloService.EndpointName);

// Execute the sync Echo operation.
var echoHandle = await nexusClient.StartNexusOperationAsync(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Feels like this should be called out in comments or something. I looked and none of the readme files have documentation in them so that's consistent, but just reading this code it is not necessarily obvious how this is different from anything else.

So mostly just thinking a longer comment above the Start and Execute commands spelling it out a little more might be useful.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was already fixed in #153, so it should "disappear" when you merge/rebase.

// The endpoint must be pre-created on the server (see README).
var nexusClient = client.CreateNexusClient<IHelloService>(IHelloService.EndpointName);

// Execute the sync Echo operation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should these comments say they "Start the ..." to differentiate between the semantics of start and execute?

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.

3 participants