Skip to content

Commit 0560a11

Browse files
update nexus guides (#3821)
* update nexus guides Signed-off-by: Phil Prasek <prasek@gmail.com> * Update temporal-nexus.mdx Fixing a couple of bad links --------- Signed-off-by: Phil Prasek <prasek@gmail.com> Co-authored-by: Brian MacDonald <brian.macdonald@temporal.io>
1 parent c31e53c commit 0560a11

File tree

7 files changed

+38
-13
lines changed

7 files changed

+38
-13
lines changed

docs/develop/go/temporal-nexus.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ var HelloOperation = temporalnexus.NewWorkflowRunOperation(service.HelloOperatio
194194
Workflow IDs should typically be business-meaningful IDs and are used to dedupe Workflow starts.
195195
For the `HelloOperation`, `input.ID` is passed as part of the Nexus Service contract.
196196

197-
:::tip SUPPORT, STABILITY, and DEPENDENCY INFO
197+
:::tip RESOURCES
198198

199-
[Attaching multiple Nexus callers to a handler Workflow](/nexus/operations#attaching-multiple-nexus-callers) using a [Conflict-Policy of Use-Existing](/workflow-execution/workflowid-runid#workflow-id-conflict-policy) is a [Pre-release feature](/evaluate/development-production-features/release-stages#pre-release).
199+
[Attach multiple Nexus callers to a handler Workflow](/nexus/operations#attaching-multiple-nexus-callers) with a Conflict-Policy of Use-Existing.
200200

201201
:::
202202

docs/develop/java/temporal-nexus.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ public class NexusServiceImpl {
274274

275275
Workflow IDs should typically be business-meaningful IDs and are used to dedupe Workflow starts. In general, the ID should be passed in the Operation input as part of the Nexus Service contract.
276276

277-
:::tip SUPPORT, STABILITY, and DEPENDENCY INFO
277+
:::tip RESOURCES
278278

279-
[Attaching multiple Nexus callers to a handler Workflow](/nexus/operations#attaching-multiple-nexus-callers) using a [Conflict-Policy of Use-Existing](/workflow-execution/workflowid-runid#workflow-id-conflict-policy) is a [Pre-release feature](/evaluate/development-production-features/release-stages#pre-release).
279+
[Attach multiple Nexus callers to a handler Workflow](/nexus/operations#attaching-multiple-nexus-callers) with a Conflict-Policy of Use-Existing.
280280

281281
:::
282282

docs/develop/python/index.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,17 @@ Use compression, encryption, and other data handling by implementing custom conv
135135
- [Custom Payload Codec](/develop/python/converters-and-encryption#custom-payload-codec)
136136
- [Payload Conversion](/develop/python/converters-and-encryption#payload-conversion)
137137

138+
## Temporal Nexus
139+
140+
The [Temporal Nexus](/develop/python/nexus) feature guide shows how to use Temporal Nexus to connect durable executions within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations.
141+
142+
- [Create a Nexus Endpoint to route requests from caller to handler](/develop/python/nexus#create-nexus-endpoint)
143+
- [Define the Nexus Service contract](/develop/python/nexus#define-nexus-service-contract)
144+
- [Develop a Nexus Service and Operation handlers](/develop/python/nexus#develop-nexus-service-operation-handlers)
145+
- [Develop a caller Workflow that uses a Nexus Service](/develop/python/nexus#develop-caller-workflow-nexus-service)
146+
- [Make Nexus calls across Namespaces with a dev Server](/develop/python/nexus#register-the-caller-workflow-in-a-worker-and-start-the-caller-workflow)
147+
- [Make Nexus calls across Namespaces in Temporal Cloud](/develop/python/nexus#nexus-calls-across-namespaces-temporal-cloud)
148+
138149
## [Durable Timers](/develop/python/timers)
139150

140151
Use Timers to make a Workflow Execution pause or "sleep" for seconds, minutes, days, months, or years.

docs/develop/python/temporal-nexus.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,11 @@ class MyNexusServiceHandler:
180180

181181
Workflow IDs should typically be business-meaningful IDs and are used to dedupe Workflow starts. In general, the ID should be passed in the Operation input as part of the Nexus Service contract.
182182

183-
<!-- TODO: feature does not exist in Python pre-release yet -->
184-
<!-- :::tip SUPPORT, STABILITY, and DEPENDENCY INFO
183+
:::tip RESOURCES
185184

186-
[Attaching multiple Nexus callers to a handler Workflow](/nexus/operations#attaching-multiple-nexus-callers) using a [Conflict-Policy of Use-Existing](/workflow-execution/workflowid-runid#workflow-id-conflict-policy) is a [Pre-release feature](/evaluate/development-production-features/release-stages#pre-release).
185+
[Attach multiple Nexus callers to a handler Workflow](/nexus/operations#attaching-multiple-nexus-callers) with a Conflict-Policy of Use-Existing.
187186

188-
::: -->
187+
:::
189188

190189
### Register your Nexus Service handler in a Worker
191190

docs/develop/typescript/index.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,17 @@ Use compression, encryption, and other data handling by implementing custom conv
122122

123123
- [Custom Payload Codec](/develop/typescript/converters-and-encryption#custom-payload-conversion)
124124

125+
## Temporal Nexus
126+
127+
The [Temporal Nexus](/develop/typescript/nexus) feature guide shows how to use Temporal Nexus to connect durable executions within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations.
128+
129+
- [Create a Nexus Endpoint to route requests from caller to handler](/develop/typescript/nexus#create-nexus-endpoint)
130+
- [Define the Nexus Service contract](/develop/typescript/nexus#define-nexus-service-contract)
131+
- [Develop a Nexus Service and Operation handlers](/develop/typescript/nexus#develop-nexus-service-operation-handlers)
132+
- [Develop a caller Workflow that uses a Nexus Service](/develop/typescript/nexus#develop-caller-workflow-nexus-service)
133+
- [Make Nexus calls across Namespaces with a dev Server](/develop/typescript/nexus#register-the-caller-workflow-in-a-worker-and-start-the-caller-workflow)
134+
- [Make Nexus calls across Namespaces in Temporal Cloud](/develop/typescript/nexus#nexus-calls-across-namespaces-temporal-cloud)
135+
125136
## [Durable Timers](/develop/typescript/timers)
126137

127138
Use Timers to make a Workflow Execution pause or "sleep" for seconds, minutes, days, months, or years.

docs/develop/typescript/temporal-nexus.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This page shows how to do the following:
4141

4242
:::note
4343

44-
This documentation uses source code derived from the [TypeScript Nexus sample](https://github.com/temporalio/samples-typescript/tree/main/hello_nexus).
44+
This documentation uses source code derived from the [TypeScript Nexus sample](https://github.com/temporalio/samples-typescript/tree/main/nexus-hello).
4545

4646
:::
4747

@@ -232,9 +232,9 @@ export const helloServiceHandler = nexus.serviceHandler(helloService, {
232232
Workflow IDs should typically be business-meaningful IDs and are used to dedupe Workflow starts.
233233
In general, the ID should be passed in the Operation input as part of the Nexus Service contract.
234234

235-
:::tip SUPPORT, STABILITY, and DEPENDENCY INFO
235+
:::tip RESOURCES
236236

237-
[Attaching multiple Nexus callers to a handler Workflow](/nexus/operations#attaching-multiple-nexus-callers) using a [Conflict-Policy of Use-Existing](/workflow-execution/workflowid-runid#workflow-id-conflict-policy) is a [Pre-release feature](/evaluate/development-production-features/release-stages#pre-release).
237+
[Attach multiple Nexus callers to a handler Workflow](/nexus/operations#attaching-multiple-nexus-callers) with a Conflict-Policy of Use-Existing.
238238

239239
:::
240240

@@ -296,6 +296,8 @@ export async function helloCallerWorkflow(name: string, language: LanguageCode):
296296

297297
<!--SNIPEND-->
298298

299+
### Register the caller Workflow in a Worker and start the caller Workflow
300+
299301
This Workflow can be registered with a Worker and started using `client.startWorkflow()` or `client.executeWorkflow()`, as usual.
300302
Refer to the [complete TypeScript sample](https://github.com/temporalio/samples-typescript/blob/main/nexus-hello) for reference.
301303

@@ -308,7 +310,7 @@ Temporal provides general guidance on [Errors in Nexus operations](https://docs.
308310
In TypeScript, there are three Nexus-specific exception classes:
309311

310312
- `nexus-rpc`'s [`OperationError`](https://nexus-rpc.github.io/sdk-typescript/classes/OperationError.html): this is the exception type you should throw in a Nexus operation to indicate that it has failed according to its own application logic and should not be retried.
311-
- `nexus-rpc`'s [`HandlerError`](https://nexus-rpc.github.io/sdk-typescript/classes/HandlerError.html): you can throw this exception type in a Nexus operation with a specific [HandlerErrorType](https://nexus-rpc.github.io/sdk-typescript/nexusrpc.HandlerErrorType.html). The error will be marked as either retryable or non-retryable according to the type, following the [Nexus spec](https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors). The non-retryable handler error types are `BAD_REQUEST`, `UNAUTHENTICATED`, `UNAUTHORIZED`, `NOT_FOUND`, `NOT_IMPLEMENTED`; the retryable types are `RESOURCE_EXHAUSTED`, `INTERNAL`, `UNAVAILABLE`, `UPSTREAM_TIMEOUT`.
313+
- `nexus-rpc`'s [`HandlerError`](https://nexus-rpc.github.io/sdk-typescript/classes/HandlerError.html): you can throw this exception type in a Nexus operation with a specific [HandlerErrorType](https://nexus-rpc.github.io/sdk-typescript/types/HandlerErrorType.html). The error will be marked as either retryable or non-retryable according to the type, following the [Nexus spec](https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors). The non-retryable handler error types are `BAD_REQUEST`, `UNAUTHENTICATED`, `UNAUTHORIZED`, `NOT_FOUND`, `NOT_IMPLEMENTED`; the retryable types are `RESOURCE_EXHAUSTED`, `INTERNAL`, `UNAVAILABLE`, `UPSTREAM_TIMEOUT`.
312314
- `@temporalio/nexus`'s [`NexusOperationFailure`](https://typescript.temporal.io/api/classes/common.NexusOperationFailure): this is the error thrown inside a Workflow when a Nexus operation fails for any reason. Use the `cause` attribute on the exception to access the cause chain.
313315

314316
## Canceling a Nexus Operation {#canceling-a-nexus-operation}
@@ -397,7 +399,7 @@ tcld namespace create \
397399
--retention-days 1
398400
```
399401

400-
Alternatively, you can create Namespaces through the UI: [https://cloud.temporal.io/Namespaces](https://cloud.temporal.io/Namespaces).
402+
Alternatively, you can create Namespaces through the UI: [https://cloud.temporal.io/namespaces](https://cloud.temporal.io/namespaces).
401403

402404
### Create a Nexus Endpoint to route requests from caller to handler
403405

docs/encyclopedia/nexus.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ Nexus Operations can be implemented with Temporal primitives, like Workflows, or
5757

5858
- [Go SDK - Nexus quick start and code sample](/develop/go/nexus)
5959
- [Java SDK - Nexus quick start and code sample](/develop/java/nexus)
60+
- [Python SDK - Nexus quick start and code sample](/develop/python/nexus)
61+
- [TypeScript SDK - Nexus quick start and code sample](/develop/typescript/nexus)
6062
:::
6163

6264
## Queue-based Worker architecture

0 commit comments

Comments
 (0)