Skip to content
Merged
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/best-practices/managing-namespace.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ Here are some of the typical Namespace settings you’re able to configure:
| `default_task_queue` | The task queue used if none is specified in the workflow code |
| `search_attributes` | Custom fields that allow filtering and querying workflow executions |
| `data_converter` | Used to serialize/deserialize and encrypt/decrypt workflow payloads |
| `visibility settings` | Controls how workflow status data is indexed and queried |
| `visibility settings` | Controls how workflow status data is indexed and queried |
2 changes: 1 addition & 1 deletion docs/best-practices/security-controls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ For these critical use cases, enable High Availability features for specific nam

By default, Temporal Cloud provides a [99.9% contractual SLA guarantee](https://docs.temporal.io/cloud/high-availability) against service errors for all namespaces.

Note: [enabling HA features for namespaces will 2x the consumption cost.](https://docs.temporal.io/cloud/pricing#high-availability-features)
Note: [enabling HA features for namespaces will 2x the consumption cost.](https://docs.temporal.io/cloud/pricing#high-availability-features)
2 changes: 1 addition & 1 deletion docs/develop/dotnet/enriching-ui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ All Workflow details support standard Markdown formatting (excluding images, HTM
Individual events in the Workflow's Event History display their associated summaries when available.

Workflow, Activity and Timer summaries appear in purple text next to their corresponding events, providing immediate context without requiring you to expand the Event details.
When you do expand an Event, the summary is also prominently displayed in the detailed view.
When you do expand an Event, the summary is also prominently displayed in the detailed view.
3 changes: 0 additions & 3 deletions docs/develop/go/cancellation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ If the Workflow receives a Cancellation Request, but all Activities gracefully h
It is completely up to the needs of the business process and your use case which determines whether you want to return the Cancellation error to show a Canceled status or Complete status regardless of whether a Cancellation has propagated to and/or skipped Activities.

<!--SNIPSTART go-features-cancellation-workflow {"selectedLines": ["14-15", "18", "20-38", "41", "43-45", "47-50"]}-->

[sample-apps/go/features/cancellation/workflow.go](https://github.com/temporalio/documentation/blob/main/sample-apps/go/features/cancellation/workflow.go)

```go
// ...
// YourWorkflow is a Workflow Definition that shows how it can be canceled.
Expand Down Expand Up @@ -73,7 +71,6 @@ func YourWorkflow(ctx workflow.Context) error {
return err
}
```

<!--SNIPEND-->

## Handle Cancellation in an Activity {#handle-cancellation-in-an-activity}
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/go/enriching-ui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,4 @@ All Workflow details support standard Markdown formatting (excluding images, HTM
Individual events in the Workflow's Event History display their associated summaries when available.

Workflow, Activity and Timer summaries appear in purple text next to their corresponding events, providing immediate context without requiring you to expand the event details.
When you do expand an event, the summary is also prominently displayed in the detailed view.
When you do expand an event, the summary is also prominently displayed in the detailed view.
8 changes: 1 addition & 7 deletions docs/develop/go/temporal-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ If you don't provide [`HostPort`](https://pkg.go.dev/go.temporal.io/sdk/internal
If you don't set a custom Namespace name in the Namespace field, the client connects to the default Namespace.

<!--SNIPSTART samples-apps-go-yourapp-gateway {"selectedLines": ["1-23", "32"]} -->

[sample-apps/go/yourapp/gateway/main.go](https://github.com/temporalio/documentation/blob/main/sample-apps/go/yourapp/gateway/main.go)

```go
package main

Expand All @@ -85,7 +83,7 @@ import (
)

func main() {
// Create a Temporal Client to communicate with the Temporal Service.
// Create a Temporal Client to communicate with the Temporal Cluster.
// A Temporal Client is a heavyweight object that should be created just once per process.
temporalClient, err := client.Dial(client.Options{
HostPort: client.DefaultHostPort,
Expand All @@ -97,7 +95,6 @@ func main() {
// ...
}
```

<!--SNIPEND-->

## Connect to Temporal Cloud {#connect-to-temporal-cloud}
Expand Down Expand Up @@ -254,9 +251,7 @@ For more information about managing and generating client certificates for Tempo
For more information about configuring TLS to secure inter- and intra-network communication for a Temporal Service, see [Temporal Customization Samples](https://github.com/temporalio/samples-server).

<!--SNIPSTART sample-apps-go-cloud-client {"selectedLines": ["1-38", "64"]} -->

[sample-apps/go/cloud/client/main.go](https://github.com/temporalio/documentation/blob/main/sample-apps/go/cloud/client/main.go)

```go
package main

Expand Down Expand Up @@ -299,7 +294,6 @@ func main() {
// ...
}
```

<!--SNIPEND-->

## Start Workflow Execution {#start-workflow-execution}
Expand Down
30 changes: 7 additions & 23 deletions docs/develop/go/temporal-nexus.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ In a polyglot environment, that is where more than one language and SDK is being
This example uses native Go types.

<!--SNIPSTART samples-go-nexus-service {"selectedLines": ["2-13"]}-->

[nexus/service/api.go](https://github.com/temporalio/samples-go/blob/main/nexus/service/api.go)

```go
// ...

Expand All @@ -114,8 +112,8 @@ type EchoInput struct {
}

type EchoOutput EchoInput
```

```
<!--SNIPEND-->

## Develop a Nexus Service and Operation handlers {#develop-nexus-service-operation-handlers}
Expand All @@ -139,9 +137,7 @@ Typically to use SDK client, which is obtained via `temporalnexus.GetClient(ctx)
However, implementations are free to make arbitrary calls to other services or databases, or perform computations such as this one:

<!--SNIPSTART samples-go-nexus-handler {"selectedLines": ["2-23"]}-->

[nexus/handler/app.go](https://github.com/temporalio/samples-go/blob/main/nexus/handler/app.go)

```go
// ...

Expand All @@ -165,8 +161,8 @@ var EchoOperation = nexus.NewSyncOperation(service.EchoOperationName, func(ctx c
// services or databases, or perform simple computations such as this one.
return service.EchoOutput(input), nil
})
```

```
<!--SNIPEND-->

### Develop an Asynchronous Nexus Operation handler to start a Workflow
Expand All @@ -175,22 +171,20 @@ Use the `NewWorkflowRunOperation` constructor, which is the easiest way to expos
See alternatives [here](https://pkg.go.dev/go.temporal.io/sdk/temporalnexus).

<!--SNIPSTART samples-go-nexus-handler {"selectedLines": ["26-35"]}-->

[nexus/handler/app.go](https://github.com/temporalio/samples-go/blob/main/nexus/handler/app.go)

```go
// ...
var HelloOperation = temporalnexus.NewWorkflowRunOperation(service.HelloOperationName, HelloHandlerWorkflow, func(ctx context.Context, input service.HelloInput, options nexus.StartOperationOptions) (client.StartWorkflowOptions, error) {
return client.StartWorkflowOptions{
// Workflow IDs should typically be business-meaningful IDs and are used to dedupe workflow starts.
// Workflow IDs should typically be business meaningful IDs and are used to dedupe workflow starts.
// For this example, we're using the request ID allocated by Temporal when the caller workflow schedules
// the operation, this ID is guaranteed to be stable across retries of this operation.
ID: options.RequestID,
// Task queue defaults to the task queue this operation is handled on.
}, nil
})
```

```
<!--SNIPEND-->

Workflow IDs should typically be business-meaningful IDs and are used to dedupe Workflow starts.
Expand Down Expand Up @@ -237,9 +231,7 @@ var HelloOperation = temporalnexus.MustNewWorkflowRunOperationWithOptions(tempor
After developing an asynchronous Nexus Operation handler to start a Workflow, the next step is to register a Nexus Service in a Worker.

<!--SNIPSTART samples-go-nexus-handler-worker-->

[nexus/handler/worker/main.go](https://github.com/temporalio/samples-go/blob/main/nexus/handler/worker/main.go)

```go
package main

Expand Down Expand Up @@ -287,17 +279,14 @@ func main() {
}
}
```

<!--SNIPEND-->

## Develop a caller Workflow that uses the Nexus Service {#develop-caller-workflow-nexus-service}

Import the Service API package that has the necessary service and operation names and input/output types to execute a Nexus Operation from the caller Workflow:

<!--SNIPSTART samples-go-nexus-caller-workflow-->

[nexus/caller/workflows.go](https://github.com/temporalio/samples-go/blob/main/nexus/caller/workflows.go)

```go
package caller

Expand Down Expand Up @@ -331,7 +320,8 @@ func HelloCallerWorkflow(ctx workflow.Context, name string, language service.Lan
var res service.HelloOutput

// Optionally wait for the operation to be started. NexusOperationExecution will contain the operation token in
// case this operation is asynchronous.
// case this operation is asynchronous, which is a handle that can be used to perform additional actions like
// cancelling an operation.
var exec workflow.NexusOperationExecution
if err := fut.GetNexusOperationExecution().Get(ctx, &exec); err != nil {
return "", err
Expand All @@ -342,18 +332,16 @@ func HelloCallerWorkflow(ctx workflow.Context, name string, language service.Lan

return res.Message, nil
}
```

```
<!--SNIPEND-->

### Register the caller Workflow in a Worker

After developing the caller Workflow, the next step is to register it with a Worker.

<!--SNIPSTART samples-go-nexus-caller-worker-->

[nexus/caller/worker/main.go](https://github.com/temporalio/samples-go/blob/main/nexus/caller/worker/main.go)

```go
package main

Expand Down Expand Up @@ -391,17 +379,14 @@ func main() {
}
}
```

<!--SNIPEND-->

### Develop a starter to start the caller Workflow

To initiate the caller Workflow, a starter program is required.

<!--SNIPSTART samples-go-nexus-caller-starter-->

[nexus/caller/starter/main.go](https://github.com/temporalio/samples-go/blob/main/nexus/caller/starter/main.go)

```go
package main

Expand Down Expand Up @@ -454,7 +439,6 @@ func runWorkflow(c client.Client, workflow interface{}, args ...interface{}) {
log.Println("Workflow result:", result)
}
```

<!--SNIPEND-->

## Make Nexus calls across Namespaces with a development Server {#nexus-calls-across-namespaces-dev-server}
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/java/enriching-ui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ All Workflow details support standard Markdown formatting (excluding images, HTM
Individual events in the Workflow's Event History display their associated summaries when available.

Workflow, Activity and Timer summaries appear in purple text next to their corresponding events, providing immediate context without requiring you to expand the Event details.
When you do expand an Event, the summary is also prominently displayed in the detailed view.
When you do expand an Event, the summary is also prominently displayed in the detailed view.
12 changes: 0 additions & 12 deletions docs/develop/java/temporal-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ However, it is acceptable and common to use a Temporal Client inside an Activity
:::

<!--SNIPSTART javasdk-build-caller-app-using-local-client {"selectedLines": ["11-17"]}-->

[sample-apps/java/client/devserver-client-sample/src/main/java/clientsample/YourCallerApp.java](https://github.com/temporalio/documentation/blob/main/sample-apps/java/client/devserver-client-sample/src/main/java/clientsample/YourCallerApp.java)

```java
// ...
// Create an instance that connects to a Temporal Service running on the local
Expand All @@ -68,7 +66,6 @@ However, it is acceptable and common to use a Temporal Client inside an Activity
// This application uses the Client to communicate with the local Temporal Service
WorkflowClient client = WorkflowClient.newInstance(serviceStub);
```

<!--SNIPEND-->

The Namespace is assumed to be 'default' unless otherwise specified.
Expand All @@ -81,9 +78,7 @@ Custom Namespaces on local development systems let you to build out new features
Namespaces are established by setting a Client's options to configure the new instance.

<!--SNIPSTART javasdk-build-caller-app-using-local-client-custom-namespace {"selectedLines": ["23-31"]}-->

[sample-apps/java/client/devserver-namespace-client-sample/src/main/java/clientsample/YourCallerApp.java](https://github.com/temporalio/documentation/blob/main/sample-apps/java/client/devserver-namespace-client-sample/src/main/java/clientsample/YourCallerApp.java)

```java
// ...
// Add the Namespace as a Client Option
Expand All @@ -96,7 +91,6 @@ Namespaces are established by setting a Client's options to configure the new in
// This application uses the Client to communicate with the Temporal Service
WorkflowClient client = WorkflowClient.newInstance(service, clientOptions);
```

<!--SNIPEND-->

## Connect to Temporal Cloud {#connect-to-temporal-cloud}
Expand Down Expand Up @@ -152,9 +146,7 @@ When you use a remote service, you don't use the `newLocalServicesStubs` conveni
Instead, set your connection details as stub configuration options:

<!--SNIPSTART javasdk-build-caller-app-using-temporal-cloud {"selectedLines": ["46-54"]}-->

[sample-apps/java/client/cloudserver-client-sample/src/main/java/clientsample/YourCallerApp.java](https://github.com/temporalio/documentation/blob/main/sample-apps/java/client/cloudserver-client-sample/src/main/java/clientsample/YourCallerApp.java)

```java
// ...
// Set the Service Stub options (SSL context and gRPC endpoint)
Expand All @@ -167,7 +159,6 @@ Instead, set your connection details as stub configuration options:
// Create a stub that accesses a Temporal Service
WorkflowServiceStubs serviceStub = WorkflowServiceStubs.newServiceStubs(stubsOptions);
```

<!--SNIPEND-->

Each Temporal Cloud service Client has four prerequisites.
Expand All @@ -184,9 +175,7 @@ Along with the gRPC endpoint, this information configures a service stub for Tem
Add the Namespace to your Client build options and initialize the new Client:

<!--SNIPSTART javasdk-build-caller-app-using-temporal-cloud {"selectedLines": ["41-64"]}-->

[sample-apps/java/client/cloudserver-client-sample/src/main/java/clientsample/YourCallerApp.java](https://github.com/temporalio/documentation/blob/main/sample-apps/java/client/cloudserver-client-sample/src/main/java/clientsample/YourCallerApp.java)

```java
// ...
// Generate an SSL context
Expand Down Expand Up @@ -214,7 +203,6 @@ Add the Namespace to your Client build options and initialize the new Client:
// This application uses the Client to communicate with the Temporal Service
WorkflowClient client = WorkflowClient.newInstance(serviceStub, clientOptions);
```

<!--SNIPEND-->

## Start a Workflow Execution {#start-workflow-execution}
Expand Down
12 changes: 6 additions & 6 deletions docs/develop/java/temporal-nexus.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ The `OperationHandler.sync` method is for exposing simple RPC handlers.
Its handler function can access an SDK client that can be used for signaling, querying, and listing Workflows.
However, implementations are free to make arbitrary calls to other services or databases, or perform computations such as this one:

<!--SNIPSTART samples-java-nexus-handler {"selectedLines": ["1-16", "40"]}-->
{/* SNIPSTART samples-java-nexus-handler {"selectedLines": ["1-16", "43"]} */}
[core/src/main/java/io/temporal/samples/nexus/handler/NexusServiceImpl.java](https://github.com/temporalio/samples-java/blob/nexus-snip-sync/core/src/main/java/io/temporal/samples/nexus/handler/NexusServiceImpl.java)
```java
// To create a service implementation, annotate the class with @ServiceImpl and provide the
Expand All @@ -211,19 +211,19 @@ However, implementations are free to make arbitrary calls to other services or d
public class NexusServiceImpl {
@OperationImpl
public OperationHandler<NexusService.EchoInput, NexusService.EchoOutput> echo() {
// OperationHandler.sync is intended for exposing simple RPC handlers.
// OperationHandler.sync is a meant for exposing simple RPC handlers.
return OperationHandler.sync(
// The method is for making arbitrary short calls to other services or databases, or
// performing simple computations such as this one. Users can also access a workflow client by
// perform simple computations such as this one. Users can also access a workflow client by
// calling
// Nexus.getOperationContext().getWorkflowClient(ctx) to make arbitrary Temporal client
// calls such as signaling, querying, or listing workflows.
// Nexus.getOperationContext().getWorkflowClient(ctx) to make arbitrary calls such as
// signaling, querying, or listing workflows.
(ctx, details, input) -> new NexusService.EchoOutput(input.getMessage()));
}
// ...
}
```
<!--SNIPEND-->
{/* SNIPEND */}

### Develop an Asynchronous Nexus Operation handler to start a Workflow

Expand Down
6 changes: 0 additions & 6 deletions docs/develop/php/asynchronous-activity-completion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ There are two parts to implementing an asynchronously completed Activity:
The following example demonstrates the first part:

<!--SNIPSTART samples-php-async-activity-completion-activity-class-->

[app/src/AsyncActivityCompletion/GreetingActivity.php](https://github.com/temporalio/samples-php/blob/main/app/src/AsyncActivityCompletion/GreetingActivity.php)

```php
class GreetingActivity implements GreetingActivityInterface
{
Expand Down Expand Up @@ -108,15 +106,12 @@ class GreetingActivity implements GreetingActivityInterface
}
}
```

<!--SNIPEND-->

The following code demonstrates how to complete the Activity successfully using `WorkflowClient`:

<!--SNIPSTART samples-php-async-activity-completion-completebytoken-->

[app/src/AsyncActivityCompletion/CompleteCommand.php](https://github.com/temporalio/samples-php/blob/main/app/src/AsyncActivityCompletion/CompleteCommand.php)

```php
$client = $this->workflowClient->newActivityCompletionClient();
// Complete the Activity.
Expand All @@ -125,7 +120,6 @@ $client->completeByToken(
$input->getArgument('message')
);
```

<!--SNIPEND-->

To fail the Activity, you would do the following:
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/ruby/enriching-ui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ All Workflow details support standard Markdown formatting (excluding images, HTM

Individual events in the Workflow's Event History display their associated summaries when available:

Workflow, Activity and Timer summaries appear in purple text next to their corresponding Events, providing immediate context without requiring you to expand the event details. When you do expand an event, the summary is also prominently displayed in the detailed view.
Workflow, Activity and Timer summaries appear in purple text next to their corresponding Events, providing immediate context without requiring you to expand the event details. When you do expand an event, the summary is also prominently displayed in the detailed view.
Loading