Skip to content
Draft
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
4 changes: 3 additions & 1 deletion docs/develop/dotnet/client/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
id: index
title: Client - .NET SDK
sidebar_label: Client
description: This section explains how to implement the Temporal Client with the .NET SDK
description:
Connect a Temporal Client, start Workflow Executions, and get Workflow results with the Temporal .NET SDK.
toc_max_heading_level: 4
tags:
- Temporal Client
- .NET SDK
- Temporal SDKs
---
Expand Down
55 changes: 44 additions & 11 deletions docs/develop/dotnet/client/temporal-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ id: temporal-client
title: Temporal Client - .NET SDK
sidebar_label: Temporal Client
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.
Connect to a development Temporal Service or Temporal Cloud from .NET, set a Task Queue and Workflow Id, and get
Workflow Execution results.
toc_max_heading_level: 4
tags:
- Temporal Client
- .NET SDK
- Temporal SDKs
- Temporal Client
- Certificates
---

Expand Down Expand Up @@ -37,7 +38,7 @@ configuration. You can provide these options directly in code, or load them from
**TOML configuration file** using the `Temporalio.Client.EnvConfig` helpers. We recommend environment variables or a
configuration file for secure, repeatable configuration.

When youre running a Temporal Service locally (such as with the
When you're running a Temporal Service locally (such as with the
[Temporal CLI dev server](/cli/command-reference/server#start-dev)), the required options are minimal. If you
don't specify a host/port, most connections default to `127.0.0.1:7233` and the `default` Namespace.

Expand Down Expand Up @@ -314,10 +315,10 @@ tls_client_key_path = "your-tls-client-key-path"
```

With the connections options defined in the configuration file, use the `ClientEnvConfig.LoadClientConnectOptions`
method to create a Temporal Client using the `staging` profile as follows. After loading the profile, you can also
method to create a Temporal Client from a named profile as follows. After loading the profile, you can also
programmatically override specific connection options before creating the client.

```csharp title="LoadProfile.cs" {25. 41}
```csharp title="LoadProfile.cs" {25,41}
using Temporalio.Client;
using Temporalio.Client.EnvConfig;

Expand Down Expand Up @@ -467,7 +468,7 @@ var myClient = TemporalClient.ConnectAsync(new(<endpoint>)
});
```

Unlike `ApiKey`, `TlsOptions` is not mutable on an existing connection — the certificate bytes are fixed once the
Unlike `ApiKey`, `TlsOptions` is not mutable on an existing connection. The certificate bytes are fixed once the
connection is established. To rotate an mTLS client certificate without restarting your Worker, connect a new client
with the new certificate and assign it to the running `TemporalWorker`'s `Client` property:

Expand All @@ -493,11 +494,11 @@ completion, Activity Heartbeats, and so on); calls already in flight on the old

</Tabs>

## Start a Workflow {/* #start-workflow */}
## Start a Workflow Execution {/* #start-workflow */}

[Workflow Execution](/workflow-execution) semantics rely on several parameters—that is, to start a Workflow Execution
you must supply a Task Queue that will be used for the Tasks (one that a Worker is polling), the Workflow Type,
language-specific contextual data, and Workflow Function parameters.
[Workflow Execution](/workflow-execution) semantics rely on several parameters. To start a Workflow Execution, you must
supply a Task Queue that will be used for the Tasks (one that a Worker is polling), the Workflow Type, language-specific
contextual data, and Workflow Function parameters.

A request to spawn a Workflow Execution causes the Temporal Service to create the first Event
([WorkflowExecutionStarted](/references/events#workflowexecutionstarted)) in the Workflow Execution Event History. The
Expand All @@ -515,6 +516,38 @@ var result = await client.ExecuteWorkflowAsync(
Console.WriteLine("Result: {0}", result);
```

### Set a Workflow's Task Queue {/* #set-task-queue */}

The only Workflow Option that you must set is the name of the [Task Queue](/task-queue).

For any code to execute, a Worker Process must be running that contains a Worker Entity that is polling the same Task
Queue name.

To set a Task Queue in .NET, specify the `taskQueue` argument in the `WorkflowOptions` given to `StartWorkflowAsync()`
or `ExecuteWorkflowAsync()`.

```csharp
var result = await client.ExecuteWorkflowAsync(
(MyWorkflow wf) => wf.RunAsync(),
new(id: "my-workflow-id", taskQueue: "my-task-queue"));
```

### Set a Workflow Id {/* #workflow-id */}

You must set a [Workflow Id](/workflow-execution/workflowid-runid#workflow-id).

When setting a Workflow Id, we recommend mapping it to a business process or business entity identifier, such as an
order identifier or customer identifier.

To set a Workflow Id in .NET, specify the `id` argument in the `WorkflowOptions` given to `StartWorkflowAsync()` or
`ExecuteWorkflowAsync()`.

```csharp
var result = await client.ExecuteWorkflowAsync(
(MyWorkflow wf) => wf.RunAsync(),
new(id: "my-workflow-id", taskQueue: "my-task-queue"));
```

## Get Workflow results {/* #get-workflow-results */}

If the call to start a Workflow Execution is successful, you will gain access to the Workflow Execution's Run Id.
Expand Down
5 changes: 4 additions & 1 deletion docs/develop/go/client/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
id: index
title: Client - Go SDK
sidebar_label: Client
description: This section explains how to implement the Temporal Client with the Go SDK
description:
Connect a Temporal Client, start Workflow Executions, get Workflow results, and manage Namespaces with the
Temporal Go SDK.
toc_max_heading_level: 4
tags:
- Temporal Client
- Go SDK
- Temporal SDKs
---
Expand Down
6 changes: 3 additions & 3 deletions docs/develop/go/client/namespaces.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: Register and manage Namespaces in Temporal using CLI or SDK APIs. I

This page shows how to do the following:

- [Register Namespaces](#register-namespace)
- [Register a Namespace](#register-namespace)
- [Manage Namespaces](#manage-namespaces)

You can create, update, deprecate, or delete your [Namespaces](/namespaces) using either the Temporal CLI or SDK APIs.
Expand All @@ -30,7 +30,7 @@ Use a custom [Authorizer](/self-hosted-guide/security#authorizer-plugin) on your

You must register a Namespace with the Temporal Service before setting it in the Temporal Client.

### How to register Namespaces {/* #register-namespace */}
## Register a Namespace {/* #register-namespace */}

Registering a Namespace creates a Namespace on the Temporal Service or Temporal Cloud.

Expand Down Expand Up @@ -67,7 +67,7 @@ To update your Namespace, use the [`Update` API](https://pkg.go.dev/go.temporal.

To update your Namespace using the Temporal CLI, use the [temporal operator namespace update](/cli/command-reference/operator#update) command.

### How to manage Namespaces {/* #manage-namespaces */}
## Manage Namespaces {/* #manage-namespaces */}

You can get details for your Namespaces, update Namespace configuration, and deprecate or delete your Namespaces.

Expand Down
37 changes: 18 additions & 19 deletions docs/develop/go/client/temporal-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ id: temporal-client
title: Temporal Client - Go SDK
sidebar_label: Temporal Client
description:
Connect to Temporal Service or Cloud, start Workflow Executions, manage Workflow options, and retrieve Workflow
results using the Go SDK. Follow detailed steps and code examples to effectively use Temporal’s capabilities.
Connect to a development Temporal Service or Temporal Cloud from Go, set StartWorkflowOptions, and get Workflow
Execution results.
toc_max_heading_level: 4
tags:
- Temporal Client
Expand Down Expand Up @@ -223,7 +223,6 @@ func main() {
}
}
```
{/* SNIPEND */}

</TabItem>

Expand Down Expand Up @@ -563,11 +562,11 @@ apiKeyProvider.APIKey = myKeyUpdated

</Tabs>

## Start Workflow Execution {/* #start-workflow-execution */}
## Start a Workflow Execution {/* #start-workflow-execution */}

[Workflow Execution](/workflow-execution) semantics rely on several parameters—that is, to start a Workflow Execution
you must supply a Task Queue that will be used for the Tasks (one that a Worker is polling), the Workflow Type,
language-specific contextual data, and Workflow Function parameters.
[Workflow Execution](/workflow-execution) semantics rely on several parameters. To start a Workflow Execution, you must
supply a Task Queue that will be used for the Tasks (one that a Worker is polling), the Workflow Type, language-specific
contextual data, and Workflow Function parameters.

In the examples below, all Workflow Executions are started using a Temporal Client. To spawn Workflow Executions from
within another Workflow Execution, use either the [Child Workflow](/develop/go/workflows/child-workflows) or External Workflow
Expand Down Expand Up @@ -635,9 +634,9 @@ Workflow Type can be provided as a `string`.
workflowRun, err := c.ExecuteWorkflow(context.Background(), workflowOptions, "YourWorkflowDefinition", param)
```

### Set Workflow Task Queue {/* #set-task-queue */}
### Set a Workflow's Task Queue {/* #set-task-queue */}

In most SDKs, the only Workflow Option that must be set is the name of the [Task Queue](/task-queue).
The only Workflow Option that you must set is the name of the [Task Queue](/task-queue).

For any code to execute, a Worker Process must be running that contains a Worker Entity that is polling the same Task
Queue name.
Expand Down Expand Up @@ -666,7 +665,7 @@ application load. For more information, refer to
[Task Queues Processing Tuning](/develop/worker-performance/task-queues#task-queues-processing-tuning) and
[Worker Versioning](/worker-versioning).

### Set custom Workflow Id {/* #workflow-id */}
### Set a Workflow Id {/* #workflow-id */}

Although it is not required, we recommend providing your own
[Workflow Id](/workflow-execution/workflowid-runid#workflow-id) that maps to a business process or business entity
Expand Down Expand Up @@ -943,7 +942,7 @@ if err != nil {
}
```

### Get Workflow results {/* #get-workflow-results */}
## Get Workflow results {/* #get-workflow-results */}

If the call to start a Workflow Execution is successful, you will gain access to the Workflow Execution's Run Id.

Expand Down Expand Up @@ -972,8 +971,9 @@ following line.
The instance of `WorkflowRun` has the following three methods:

- `GetWorkflowID()`: Returns the Workflow Id of the invoked Workflow Execution.
- `GetRunID()`: Always returns the Run Id of the initial Run (See [Continue As New](#)) in the series of Runs that make
up the full Workflow Execution.
- `GetRunID()`: Always returns the Run Id of the initial Run (see
[Continue-As-New](/workflow-execution/continue-as-new)) in the series of Runs that make up the full Workflow
Execution.
- `Get`: Takes a pointer as a parameter and populates the associated variable with the Workflow Execution result.

To wait on the result of Workflow Execution in the same process that invoked it, call `Get()` on the instance of
Expand All @@ -994,11 +994,10 @@ To wait on the result of Workflow Execution in the same process that invoked it,
```

However, the result of a Workflow Execution can be obtained from a completely different process. All that is needed is
the [Workflow Id](#). (A [Run Id](#) is optional if more than one closed Workflow Execution has the same Workflow Id.)
The result of the Workflow Execution is available for as long as the Workflow Execution Event History remains in the
system.

{/* TODO (See [How long do Workflow Execution Histories persist](#)). */}
the [Workflow Id](/workflow-execution/workflowid-runid#workflow-id).
(A [Run Id](/workflow-execution/workflowid-runid#run-id) is optional if more than one closed Workflow Execution has
the same Workflow Id.) The result of the Workflow Execution is available for as long as the Workflow Execution Event
History remains in the system.

Call the `GetWorkflow()` method on an instance of the Go SDK Client and pass it the Workflow Id used to spawn the
Workflow Execution. Then call the `Get()` method on the instance of `WorkflowRun` that is returned, passing it a pointer
Expand All @@ -1017,7 +1016,7 @@ to populate the result.
// ...
```

**Get last completion result**
### Get last completion result

In the case of a [Temporal Cron Job](/cron-job), you might need to get the result of the previous Workflow Run and use
it in the current Workflow Run.
Expand Down
5 changes: 4 additions & 1 deletion docs/develop/java/client/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
id: index
title: Client - Java SDK
sidebar_label: Client
description: This section explains how to implement the Temporal Client with the Java SDK
description:
Connect a Temporal Client, start Workflow Executions, get Workflow results, and manage Namespaces with the
Temporal Java SDK.
toc_max_heading_level: 4
tags:
- Temporal Client
- Java SDK
- Temporal SDKs
---
Expand Down
Loading