From 155e7e61271422d5605e0f7ccceb992dad884710 Mon Sep 17 00:00:00 2001 From: Quinn Klassen Date: Mon, 2 Feb 2026 19:12:32 -0800 Subject: [PATCH 1/4] Update docs for Nexus Cancellation for dotnet --- docs/develop/dotnet/temporal-nexus.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/develop/dotnet/temporal-nexus.mdx b/docs/develop/dotnet/temporal-nexus.mdx index 7d764a78bd..8f0b316a08 100644 --- a/docs/develop/dotnet/temporal-nexus.mdx +++ b/docs/develop/dotnet/temporal-nexus.mdx @@ -381,10 +381,21 @@ To cancel a Nexus Operation from within a Workflow, cancel the cancellation toke The Workflow or other resources backing the operation may choose to ignore the cancellation request. If ignored, the operation may enter a terminal state. +When a Nexus operation is started the caller can specify different cancellation types that will control how the caller reacts to cancellation: + +- `Abandon` - Do not request cancellation of the operation. +- `TryCancel` - Initiate a cancellation request and immediately report cancellation to the caller. Note that this type doesn't guarantee that cancellation is delivered to the operation handler if the caller exits before the delivery is done. +- `WaitCancellationRequested` ` Request cancellation of the operation and wait for confirmation that the request was received. Doesn't wait for actual cancellation. +- `WaitCancellationCompleted` - Wait for operation completion. Operation may or may not complete as cancelled. + +The default is `WaitCancellationCompleted`. Users can set a different option for `CancellationType` in `NexusOperationOptions` when starting an operation. + Once the caller Workflow completes, the caller's Nexus Machinery will not make any further attempts to cancel operations that are still running. It's okay to leave operations running in some use cases. To ensure cancellations are delivered, wait for all pending operations to finish before exiting the Workflow. +TODO See the [Nexus cancelation sample](https://github.com/temporalio/samples-java/tree/main/core/src/main/java/io/temporal/samples/nexuscancellation) for reference. + ## Make Nexus calls across Namespaces in Temporal Cloud {#nexus-calls-across-namespaces-temporal-cloud} This section assumes you are already familiar with how to connect a Worker to Temporal Cloud. From 0ab29198f1aca80d2b8bdf387fddb0fe0e5908db Mon Sep 17 00:00:00 2001 From: Quinn Klassen Date: Fri, 6 Feb 2026 09:37:14 -0800 Subject: [PATCH 2/4] Point to sample --- docs/develop/dotnet/temporal-nexus.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/develop/dotnet/temporal-nexus.mdx b/docs/develop/dotnet/temporal-nexus.mdx index 8f0b316a08..17cbdbde2c 100644 --- a/docs/develop/dotnet/temporal-nexus.mdx +++ b/docs/develop/dotnet/temporal-nexus.mdx @@ -375,8 +375,6 @@ This will show the two workflows started and their results. ### Canceling a Nexus Operation {#canceling-a-nexus-operation} - - To cancel a Nexus Operation from within a Workflow, cancel the cancellation token passed to the operation call. Only asynchronous operations can be canceled in Nexus, since cancellation is sent using an operation token. The Workflow or other resources backing the operation may choose to ignore the cancellation request. If ignored, the operation may enter a terminal state. @@ -394,7 +392,7 @@ Once the caller Workflow completes, the caller's Nexus Machinery will not make a It's okay to leave operations running in some use cases. To ensure cancellations are delivered, wait for all pending operations to finish before exiting the Workflow. -TODO See the [Nexus cancelation sample](https://github.com/temporalio/samples-java/tree/main/core/src/main/java/io/temporal/samples/nexuscancellation) for reference. +See the [Nexus cancelation sample](https://github.com/temporalio/samples-dotnet/tree/main/src/NexusCancellation) for reference. ## Make Nexus calls across Namespaces in Temporal Cloud {#nexus-calls-across-namespaces-temporal-cloud} From ffddb9be1a73e2c17dce7413afed47d53dca60a6 Mon Sep 17 00:00:00 2001 From: Quinn Klassen Date: Fri, 6 Feb 2026 09:39:03 -0800 Subject: [PATCH 3/4] Change cancelation -> cancellation --- docs/develop/dotnet/temporal-nexus.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/develop/dotnet/temporal-nexus.mdx b/docs/develop/dotnet/temporal-nexus.mdx index 17cbdbde2c..d897c30444 100644 --- a/docs/develop/dotnet/temporal-nexus.mdx +++ b/docs/develop/dotnet/temporal-nexus.mdx @@ -392,7 +392,7 @@ Once the caller Workflow completes, the caller's Nexus Machinery will not make a It's okay to leave operations running in some use cases. To ensure cancellations are delivered, wait for all pending operations to finish before exiting the Workflow. -See the [Nexus cancelation sample](https://github.com/temporalio/samples-dotnet/tree/main/src/NexusCancellation) for reference. +See the [Nexus cancellation sample](https://github.com/temporalio/samples-dotnet/tree/main/src/NexusCancellation) for reference. ## Make Nexus calls across Namespaces in Temporal Cloud {#nexus-calls-across-namespaces-temporal-cloud} From aef4fcfe9570db50c90853c431db1df03ff2a130 Mon Sep 17 00:00:00 2001 From: Jwahir Sundai Date: Mon, 9 Feb 2026 15:59:13 -0600 Subject: [PATCH 4/4] small edits --- docs/develop/dotnet/temporal-nexus.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/develop/dotnet/temporal-nexus.mdx b/docs/develop/dotnet/temporal-nexus.mdx index d897c30444..f0ea419372 100644 --- a/docs/develop/dotnet/temporal-nexus.mdx +++ b/docs/develop/dotnet/temporal-nexus.mdx @@ -379,7 +379,7 @@ To cancel a Nexus Operation from within a Workflow, cancel the cancellation toke The Workflow or other resources backing the operation may choose to ignore the cancellation request. If ignored, the operation may enter a terminal state. -When a Nexus operation is started the caller can specify different cancellation types that will control how the caller reacts to cancellation: +When a Nexus operation is started, the caller can specify different cancellation types that control how the caller reacts to cancellation: - `Abandon` - Do not request cancellation of the operation. - `TryCancel` - Initiate a cancellation request and immediately report cancellation to the caller. Note that this type doesn't guarantee that cancellation is delivered to the operation handler if the caller exits before the delivery is done.