Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cloud/high-availability/ha-connectivity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ When authenticating with mTLS, set the Client's `server_name` / `serverNameOverr
This overrides the SNI that the Client will expect during the TLS Handshake with Temporal Cloud.
The Regional Endpoint forwards the request to your Namespace, so the Client must expect the Namespace's certificate during the TLS handshake.

For example, in Typescript, the Client's config would be set like this:
For example, in TypeScript, the Client's config would be set like this:

```typescript
await Connection.connect({
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/dotnet/activities/asynchronous-activity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Asynchronously complete an Activity in Temporal. Follow simple step
toc_max_heading_level: 4
tags:
- Activities
- .Net SDK
- .NET SDK
- Temporal SDKs
---

Expand Down
2 changes: 1 addition & 1 deletion docs/develop/dotnet/best-practices/debugging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Debugging
description: Debug Workflows in development and production environments using Temporal .NET SDK. Use logging, debugger, Web UI, CLI, replay, tracing, and more for efficient troubleshooting.
toc_max_heading_level: 4
tags:
- .Net SDK
- .NET SDK
- Temporal SDKs
- Debugging
- Errors
Expand Down
4 changes: 2 additions & 2 deletions docs/develop/dotnet/best-practices/error-handling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
id: error-handling
title: Error handling - .NET SDK
sidebar_label: Error handling
description: Handle errors with Temporal .Net SDK
description: Handle errors with Temporal .NET SDK
toc_max_heading_level: 4
tags:
- Activities
- Workflows
- .Net SDK
- .NET SDK
- Temporal SDKs
- Failures
- Errors
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/dotnet/best-practices/testing-suite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Testing
description: The .NET test-suite guide covers Workflow and integration testing for Temporal. It includes end-to-end, integration, and unit testing, emphasizing the use of the test server to optimize test execution.
toc_max_heading_level: 4
tags:
- .Net SDK
- .NET SDK
- Temporal SDKs
- Testing
---
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/dotnet/client/temporal-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description:
Create a Temporal Client, connect to Temporal Cloud, start a Workflow, and get Workflow results using the Temporal
.NET SDK with detailed steps and code examples.
tags:
- .Net SDK
- .NET SDK
- Temporal SDKs
- Temporal Client
- Certificates
Expand Down
4 changes: 2 additions & 2 deletions docs/develop/dotnet/index.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
id: index
title: .Net SDK developer guide
title: .NET SDK developer guide
sidebar_label: .NET SDK
description:
Use the Temporal .NET SDK to develop Temporal Applications, connect to the Temporal Service, test Workflows and
Activities, handle failures, send messages, and more.
toc_max_heading_level: 4
tags:
- .Net SDK
- .NET SDK
- Temporal SDKs
---

Expand Down
2 changes: 1 addition & 1 deletion docs/develop/dotnet/platform/observability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Observability
description: Explore Temporal SDK observability features for Metrics, Tracing, Logging, and Visibility. Track Workflow Executions, set up Prometheus endpoints, customize metrics, configure tracing, and more.
toc_max_heading_level: 4
tags:
- .Net SDK
- .NET SDK
- Temporal SDKs
- Observability
- Search Attributes
Expand Down
3 changes: 2 additions & 1 deletion docs/develop/dotnet/workflows/basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebar_label: Workflow basics
description: This section explains Workflow basics with the .NET SDK
toc_max_heading_level: 4
tags:
- Workflows
- .NET SDK
- Temporal SDKs
---
Expand Down Expand Up @@ -181,7 +182,7 @@ Here are some known gotchas to avoid with .NET tasks inside of Workflows:
- Be wary of additional libraries' implicit use of the default scheduler.
- For example, while there are articles for `Dataflow` about [using a specific scheduler](https://learn.microsoft.com/en-us/dotnet/standard/parallel-programming/how-to-specify-a-task-scheduler-in-a-dataflow-block), there are hidden implicit uses of `TaskScheduler.Default`. For example, see [this bug](https://github.com/dotnet/runtime/issues/83159).

In order to help catch wrong scheduler use, by default the Temporal .NET SDK adds an event source listener for info-level task events.
To help catch wrong scheduler use, the Temporal .NET SDK adds an event source listener for info-level task events by default.
While this technically receives events from all uses of tasks in the process, we make sure to ignore anything that is not running in a Workflow in a high performant way (basically one thread local check).

For code that does run in a Workflow and accidentally starts a task in another scheduler, an `InvalidWorkflowOperationException` will be thrown which "pauses" the Workflow (fails the Workflow Task which continually retries until the code is fixed).
Expand Down
8 changes: 3 additions & 5 deletions docs/develop/dotnet/workflows/cancellation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
id: cancellation
title: Cancellation - .NET SDK
sidebar_label: Cancellation
description:
Interrupt Workflow Execution in .NET using the Temporal SDK. Cancel for graceful stops; terminate for forceful stops.
Handle Cancellation in Workflow and Activities efficiently.
description: Handle Cancellation in .NET Workflows and Activities, request Cancellation from a Client, and choose between Cancellation, termination, and reset.
toc_max_heading_level: 4
tags:
- Workflows
- .Net SDK
- .NET SDK
- Temporal SDKs
---

Expand Down Expand Up @@ -126,7 +124,7 @@ var handle = myClient.GetWorkflowHandle("my-workflow-id");
await handle.CancelAsync();
```

#### How to request Cancellation of an Activity
#### Request Cancellation of an Activity {/* #request-cancellation-of-an-activity */}

By default, Activities are automatically cancelled when the Workflow is cancelled since the workflow cancellation token
is used by activities by default. To issue a cancellation explicitly, a new cancellation token can be created.
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/dotnet/workflows/child-workflows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Child Workflows
description: Start a Child Workflow Execution and set a Parent Close Policy using Temporal .NET SDK. Discover methods like ExecuteChildWorkflowAsync and manage Workflow behaviors.
tags:
- Workflows
- .Net SDK
- .NET SDK
- Temporal SDKs
- Child Workflows
---
Expand Down
16 changes: 8 additions & 8 deletions docs/develop/dotnet/workflows/continue-as-new.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ toc_max_heading_level: 2
tags:
- Workflows
- continue-as-new
- .Net SDK
- .NET SDK
- Temporal SDKs
---

import { ViewSourceCodeNotice } from '@site/src/components';

This page answers the following questions for .NET developers:
This page covers the following for .NET developers:

- [What is Continue-As-New?](#what)
- [How to Continue-As-New?](#how)
- [When is it right to Continue-as-New?](#when)
- [How to test Continue-as-New?](#how-to-test)
- [Use Continue-As-New](#how)
- [When is it right to Continue-As-New?](#when)
- [Test Continue-As-New](#how-to-test)

## What is Continue-As-New? {/* #what */}

Expand All @@ -28,7 +28,7 @@ You can think of it as a checkpoint when your Workflow gets too long or approach
The new Workflow Execution is in the same [chain](/workflow-execution#workflow-execution-chain); it keeps the same Workflow Id but gets a new Run Id and a fresh Event History.
It also receives your Workflow's usual parameters.

## How to Continue-As-New using the .NET SDK {/* #how */}
## Use Continue-As-New with the .NET SDK {/* #how */}

First, design your Workflow parameters so that you can pass in the "current state" when you Continue-As-New into the next Workflow run.
This state is typically set to `None` for the original caller of the Workflow.
Expand Down Expand Up @@ -66,14 +66,14 @@ If you use Updates or Signals, don't call Continue-as-New from the handlers.
Instead, wait for your handlers to finish in your main Workflow before you throw `CreateContinueAsNewException`.
See the [`AllHandlersFinished`](message-passing#wait-for-message-handlers) example for guidance.

## When is it right to Continue-as-New using the .NET SDK? {/* #when */}
## When is it right to Continue-As-New with the .NET SDK? {/* #when */}

Use Continue-as-New when your Workflow might hit [Event History Limits](/workflow-execution/event#event-history).

Temporal tracks your Workflow's progress against these limits to let you know when you should Continue-as-New.
Call `Workflow.ContinueAsNewSuggested` to check if it's time.

## How to test Continue-as-New using the .NET SDK {/* #how-to-test */}
## Test Continue-As-New with the .NET SDK {/* #how-to-test */}

Testing Workflows that naturally Continue-as-New may be time-consuming and resource-intensive.
Instead, add a test hook to check your Workflow's Continue-as-New behavior faster in automated tests.
Expand Down
1 change: 1 addition & 0 deletions docs/develop/dotnet/workflows/dynamic-workflow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebar_label: Dynamic Workflow
description: This section explains Dynamic Workflows with the .NET SDK
toc_max_heading_level: 4
tags:
- Workflows
- .NET SDK
- Temporal SDKs
---
Expand Down
1 change: 1 addition & 0 deletions docs/develop/dotnet/workflows/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebar_label: Workflows
description: This section explains how to implement Workflows with the .NET SDK
toc_max_heading_level: 4
tags:
- Workflows
- .NET SDK
- Temporal SDKs
---
Expand Down
5 changes: 3 additions & 2 deletions docs/develop/dotnet/workflows/message-passing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ sidebar_label: Message passing
description: Develop with Queries, Signals, and Updates with the Temporal .NET SDK.
toc_max_heading_level: 3
tags:
- .Net SDK
- Workflows
- .NET SDK
- Temporal SDKs
---

Expand Down Expand Up @@ -421,7 +422,7 @@ Signal and Update handlers can be asynchronous as well as blocking.
Using asynchronous calls allows you to `await` Activities, Child Workflows, [`Workflow.DelayAsync`](https://dotnet.temporal.io/api/Temporalio.Workflows.Workflow.html?#Temporalio_Workflows_Workflow_DelayAsync_System_Int32_System_Nullable_System_Threading_CancellationToken__) Timers, [`Workflow.WaitConditionAsync`](https://dotnet.temporal.io/api/Temporalio.Workflows.Workflow.html?#Temporalio_Workflows_Workflow_WaitConditionAsync_System_Func_System_Boolean__System_Int32_System_Nullable_System_Threading_CancellationToken__) wait conditions, etc.
This expands the possibilities for what can be done by a handler but it also means that handler executions and your main Workflow method are all running concurrently, with switching occurring between them at await calls.

It's essential to understand the things that could go wrong in order to use asynchronous handlers safely.
To use asynchronous handlers safely, understand what can go wrong.
See [Workflow message passing](/encyclopedia/workflow-message-passing) for guidance on safe usage of async Signal and Update handlers, and the [Controlling handler concurrency](#control-handler-concurrency) and [Waiting for message handlers to finish](#wait-for-message-handlers) sections below.

The following code executes an Activity that simulates a network call to a remote service:
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/dotnet/workflows/schedules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Schedules
description: Manage and optimize Scheduled Workflows using the Temporal .NET SDK; Schedule, Create, Backfill, Update, Delete, Describe, List, Pause, Trigger, and use Start Delay options.
tags:
- Workflows
- .Net SDK
- .NET SDK
- Temporal SDKs
- Schedules
---
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/dotnet/workflows/timeouts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var result = await client.ExecuteWorkflowAsync(
});
```

### Set Workflow retries {/* #workflow-retries */}
## Workflow retries {/* #workflow-retries */}

A Retry Policy can work in cooperation with the timeouts to provide fine controls to optimize the execution experience.

Expand Down
2 changes: 1 addition & 1 deletion docs/develop/dotnet/workflows/timers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_label: Timers
tags:
- Workflows
- Durable Timers
- .Net SDK
- .NET SDK
- Temporal SDKs
---

Expand Down
4 changes: 2 additions & 2 deletions docs/develop/dotnet/workflows/versioning.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Use the .NET SDK Patching API to safely deploy new code versions, h
toc_max_heading_level: 4
tags:
- Workflows
- .Net SDK
- .NET SDK
- Temporal SDKs
- Versioning
- Patching
Expand Down Expand Up @@ -158,7 +158,7 @@ public class MyWorkflow
```

Patching allows you to make changes to currently running Workflows.
It is a powerful method for introducing compatible changes without introducing non-determinism errors.
It introduces compatible changes without causing non-determinism errors.

### Detailed Overview of the Patched Function

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.

📝 [vale] <Temporal.Headings> reported by reviewdog 🐶
'Detailed Overview of the Patched Function' should use sentence-style capitalization.


Expand Down
11 changes: 6 additions & 5 deletions docs/develop/go/workflows/basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ sidebar_label: Workflow basics
description: This section explains Workflow basics with the Go SDK
toc_max_heading_level: 4
tags:
- Workflows
- Go SDK
- Temporal SDKs
---

## How to develop a basic Workflow {/* #develop-workflows */}
## Develop a basic Workflow {/* #develop-workflows */}

Workflows are the fundamental unit of a Temporal Application, and it all starts with the development of a [Workflow Definition](/workflow-definition).

Expand All @@ -30,7 +31,7 @@ func YourSimpleWorkflowDefinition(ctx workflow.Context) error {
}
```

### How to define Workflow parameters {/* #workflow-parameters */}
### Define Workflow parameters {/* #workflow-parameters */}

Temporal Workflows may have any number of custom parameters.
However, we strongly recommend that objects are used as parameters, so that the object's individual fields may be altered without breaking the signature of the Workflow.
Expand Down Expand Up @@ -86,7 +87,7 @@ func YourWorkflowDefinition(ctx workflow.Context, param YourWorkflowParam) (*You
}
```

### How to define Workflow return parameters {/* #workflow-return-values */}
### Define Workflow return parameters {/* #workflow-return-values */}

Workflow return values must also be serializable.
Returning results, returning errors, or throwing exceptions is fairly idiomatic in each language that is supported.
Expand Down Expand Up @@ -142,7 +143,7 @@ func YourWorkflowDefinition(ctx workflow.Context, param YourWorkflowParam) (*You
}
```

### How to customize Workflow Type in Go {/* #customize-workflow-type */}
### Customize Workflow Type {/* #customize-workflow-type */}

In Go, by default, the Workflow Type name is the same as the function name.

Expand Down Expand Up @@ -196,7 +197,7 @@ func main() {
}
```

### How to develop Workflow logic {/* #workflow-logic-requirements */}
### Develop Workflow logic {/* #workflow-logic-requirements */}

Workflow logic is constrained by [deterministic execution requirements](/workflow-definition#deterministic-constraints). Each Temporal SDK provides a set of APIs that can be used inside your Workflow to interact with application code outside the Workflow.

Expand Down
14 changes: 7 additions & 7 deletions docs/develop/go/workflows/continue-as-new.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ tags:

import { ViewSourceCodeNotice } from '@site/src/components';

This page answers the following questions for Go developers:
This page covers the following for Go developers:

- [What is Continue-As-New?](#what)
- [How to Continue-As-New?](#how)
- [When is it right to Continue-as-New?](#when)
- [How to test Continue-as-New?](#how-to-test)
- [Use Continue-As-New](#how)
- [When is it right to Continue-As-New?](#when)
- [Test Continue-As-New](#how-to-test)

## What is Continue-As-New? {/* #what */}

Expand All @@ -28,7 +28,7 @@ You can think of it as a checkpoint when your Workflow gets too long or approach
The new Workflow Execution is in the same [chain](/workflow-execution#workflow-execution-chain); it keeps the same Workflow Id but gets a new Run Id and a fresh Event History.
It also receives your Workflow's usual parameters.

## How to Continue-As-New using the Go SDK {/* #how */}
## Use Continue-As-New with the Go SDK {/* #how */}

First, design your Workflow parameters so that you can pass in the "current state" when you Continue-As-New into the next Workflow run.
This state is typically set to `None` for the original caller of the Workflow.
Expand Down Expand Up @@ -66,14 +66,14 @@ If you use Updates or Signals, don't call Continue-as-New from the handlers.
Instead, wait for your handlers to finish in your main Workflow before you return `NewContinueAsNewError`.
See the [`AllHandlersFinished`](message-passing#wait-for-message-handlers) example for guidance.

## When is it right to Continue-as-New using the Go SDK? {/* #when */}
## When is it right to Continue-As-New with the Go SDK? {/* #when */}

Use Continue-as-New when your Workflow might hit [Event History Limits](/workflow-execution/event#event-history).

Temporal tracks your Workflow's progress against these limits to let you know when you should Continue-as-New.
Call `GetInfo(ctx).GetContinueAsNewSuggested()` to check if it's time.

## How to test Continue-as-New using the Go SDK {/* #how-to-test */}
## Test Continue-As-New with the Go SDK {/* #how-to-test */}

Testing Workflows that naturally Continue-as-New may be time-consuming and resource-intensive.
Instead, add a test hook to check your Workflow's Continue-as-New behavior faster in automated tests.
Expand Down
1 change: 1 addition & 0 deletions docs/develop/go/workflows/dynamic-workflow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebar_label: Dynamic Workflow
description: This section explains Dynamic Workflows with the Go SDK
toc_max_heading_level: 4
tags:
- Workflows
- Go SDK
- Temporal SDKs
---
Expand Down
1 change: 1 addition & 0 deletions docs/develop/go/workflows/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebar_label: Workflows
description: This section explains how to implement Workflows with the Go SDK
toc_max_heading_level: 4
tags:
- Workflows
- Go SDK
- Temporal SDKs
---
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/go/workflows/message-passing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ Signal and Update handlers can block.
This allows you to use Activities, Child Workflows, durable [workflow.Sleep](https://pkg.go.dev/go.temporal.io/sdk/workflow#Sleep) Timers, [`workflow.Await`](https://pkg.go.dev/go.temporal.io/sdk/workflow#Await) conditions, etc.
This expands the possibilities for what can be done by a handler but it also means that handler executions and your main Workflow method are all running concurrently, with switching occurring between them at await calls.

It's essential to understand the things that could go wrong in order to use blocking handlers safely.
To use blocking handlers safely, understand what can go wrong.
See [Workflow message passing](/encyclopedia/workflow-message-passing) for guidance on safe usage of blocking Signal and Update handlers, and the [Controlling handler concurrency](#control-handler-concurrency) and [Waiting for message handlers to finish](#wait-for-message-handlers) sections below.

The following code modifies the Update handler from earlier on in this page.
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/go/workflows/selectors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ It chooses one at random if multiple are ready.
However, a normal Go select statement can not be used inside of Workflows directly because of the random nature.
Temporal's Go SDK `Selector`s are similar and act as a replacement.
They can block on sending and receiving from Channels but as a bonus can listen on Future deferred work.
Usage of Selectors to defer and process work (in place of Go's `select`) are necessary in order to ensure deterministic Workflow code execution (though using `select` in Activity code is fine).
Use Selectors to defer and process work in place of Go's `select`, which keeps Workflow code execution deterministic. Using `select` in Activity code is fine.

## Full API example {/* #api-example */}

Expand Down
Loading