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
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
1 change: 1 addition & 0 deletions docs/develop/dotnet/activities/basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebar_label: Activity basics
description: This section explains Activity basics with the .NET SDK
toc_max_heading_level: 4
tags:
- Activities
- .NET SDK
- Temporal SDKs
---
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/dotnet/activities/benign-exceptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: benign-exceptions
title: Benign exceptions - .NET SDK
sidebar_label: Benign exceptions
description: Mark expected or non-severe Activity errors as benign to reduce noise in logs, metrics, and OpenTelemetry traces.
description: Mark expected or non-severe Activity errors as benign in .NET to reduce noise in logs, metrics, and OpenTelemetry traces.
toc_max_heading_level: 2
tags:
- Activities
Expand Down
1 change: 1 addition & 0 deletions docs/develop/dotnet/activities/dynamic-activity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebar_label: Dynamic Activity
description: This section explains Dynamic Activities with the .NET SDK
toc_max_heading_level: 4
tags:
- Activities
- .NET SDK
- Temporal SDKs
---
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/dotnet/activities/execution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ sidebar_label: Activity execution
slug: /develop/dotnet/activities/execution
toc_max_heading_level: 3
tags:
- Activities
- .NET SDK
- Temporal SDKs
- Activity
---

## Start Activity Execution {/* #activity-execution */}
Expand Down
1 change: 1 addition & 0 deletions docs/develop/dotnet/activities/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebar_label: Activities
description: This section explains how to implement Activities with the .NET SDK
toc_max_heading_level: 4
tags:
- Activities
- .NET SDK
- Temporal SDKs
---
Expand Down
4 changes: 2 additions & 2 deletions docs/develop/dotnet/activities/timeouts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: timeouts
title: Activity Timeouts - .NET SDK
sidebar_label: Timeouts
description: Optimize Workflow Execution with Temporal .NET SDK - Set Activity Timeouts and Retry Policies efficiently.
description: Set the Schedule-To-Close, Start-To-Close, and Heartbeat Timeouts on a .NET Activity, tune its Retry Policy, and override the next retry delay.
toc_max_heading_level: 4
tags:
- Activities
Expand Down Expand Up @@ -57,7 +57,7 @@ return await Workflow.ExecuteActivityAsync(
});
```

### Override the Retry interval with `nextRetryDelay` {/* #next-retry-delay */}
### Override the retry interval with `nextRetryDelay` {/* #next-retry-delay */}

When you throw an [Application Failure](/references/failures#application-failure) and assign the `nextRetryDelay` field, its value replaces and overrides the Retry interval defined in the active Retry Policy.

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

## How to develop an Activity Definition in Go {/* #activity-definition */}
## Develop an Activity Definition {/* #activity-definition */}

In the Temporal Go SDK programming model, an Activity Definition is an exportable function or a `struct` method.

Expand Down Expand Up @@ -71,7 +72,7 @@ func (a *YourActivityObject) YourActivityDefinition(ctx context.Context, param Y
}
```

### How to develop Activity Parameters {/* #activity-parameters */}
### Develop Activity parameters {/* #activity-parameters */}

There is no explicit limit to the total number of parameters that an [Activity Definition](/activity-definition) may support.
However, there is a limit to the total size of the data that ends up encoded into a gRPC message Payload.
Expand Down Expand Up @@ -122,7 +123,7 @@ func (a *YourActivityObject) YourActivityDefinition(ctx context.Context, param Y
}
```

### How to define Activity return values {/* #activity-return-values */}
### Define Activity return values {/* #activity-return-values */}

All data returned from an Activity must be serializable.

Expand Down Expand Up @@ -155,7 +156,7 @@ func (a *YourActivityObject) YourActivityDefinition(ctx context.Context, param Y
}
```

### How to customize Activity Type in Go {/* #customize-activity-type */}
### Customize Activity Type {/* #customize-activity-type */}

To customize the Activity Type, set the `Name` parameter with `RegisterOptions` when registering your Activity with a Worker.

Expand Down
2 changes: 1 addition & 1 deletion docs/develop/go/activities/benign-exceptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: benign-exceptions
title: Benign exceptions - Go SDK
sidebar_label: Benign exceptions
description: Mark expected or non-severe Activity errors as benign to reduce noise in logs, metrics, and OpenTelemetry traces.
description: Mark expected or non-severe Activity errors as benign in Go to reduce noise in logs, metrics, and OpenTelemetry traces.
toc_max_heading_level: 2
tags:
- Activities
Expand Down
1 change: 1 addition & 0 deletions docs/develop/go/activities/dynamic-activity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebar_label: Dynamic Activity
description: This section explains Dynamic Activities with the Go SDK
toc_max_heading_level: 4
tags:
- Activities
- Go SDK
- Temporal SDKs
---
Expand Down
8 changes: 4 additions & 4 deletions docs/develop/go/activities/execution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ sidebar_label: Activity Execution
slug: /develop/go/activities/execution
toc_max_heading_level: 3
tags:
- Activities
- Go SDK
- Temporal SDKs
- Activity
---

## How to start an Activity Execution {/* #activity-execution */}
## Start an Activity Execution {/* #activity-execution */}

Calls to spawn [Activity Executions](/activity-execution) are written within a [Workflow Definition](/workflow-definition).
The call to spawn an Activity Execution generates the [ScheduleActivityTask](/references/commands#scheduleactivitytask) Command.
Expand Down Expand Up @@ -56,7 +56,7 @@ func YourWorkflowDefinition(ctx workflow.Context, param YourWorkflowParam) (*You
}
```

### How to set the required Activity Timeouts {/* #required-timeout */}
### Set the required Activity Timeouts {/* #required-timeout */}

Activity Execution semantics rely on several parameters.
The only required value that needs to be set is either a [Schedule-To-Close Timeout](/encyclopedia/detecting-activity-failures#schedule-to-close-timeout) or a [Start-To-Close Timeout](/encyclopedia/detecting-activity-failures#start-to-close-timeout).
Expand Down Expand Up @@ -288,7 +288,7 @@ if err != nil {
}
```

### How to get the results of an Activity Execution {/* #get-activity-results */}
### Get the results of an Activity Execution {/* #get-activity-results */}

The call to spawn an [Activity Execution](/activity-execution) generates the [ScheduleActivityTask](/references/commands#scheduleactivitytask) Command and provides the Workflow with an Awaitable.
Workflow Executions can either block progress until the result is available through the Awaitable or continue progressing, making use of the result when it becomes available.
Expand Down
1 change: 1 addition & 0 deletions docs/develop/go/activities/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebar_label: Activities
description: This section explains how to implement Activities with the Go SDK
toc_max_heading_level: 4
tags:
- Activities
- Go SDK
- Temporal SDKs
---
Expand Down
6 changes: 3 additions & 3 deletions docs/develop/go/activities/timeouts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: timeouts
title: Activity Timeouts - Go SDK
sidebar_label: Timeouts
description: Optimize Workflow Execution with Temporal Go SDK - Set Activity Timeouts and Retry Policies efficiently.
description: Set the Schedule-To-Close, Start-To-Close, and Heartbeat Timeouts on a Go Activity, tune its Retry Policy, and override the next retry delay.
toc_max_heading_level: 4
tags:
- Activities
Expand All @@ -13,7 +13,7 @@ tags:
- Temporal SDKs
---

## How to set Activity timeouts {/* #activity-timeouts */}
## Set Activity timeouts {/* #activity-timeouts */}

Each Activity timeout controls the maximum duration of a different aspect of an Activity Execution.

Expand Down Expand Up @@ -89,7 +89,7 @@ if err != nil {
}
```

### Overriding the retry interval with Next Retry Delay {/* #next-retry-delay */}
### Override the retry interval with `NextRetryDelay` {/* #next-retry-delay */}

You may return an [Application Failure](/references/failures#application-failure) with the `NextRetryDelay` field set.
This value will replace and override whatever the Retry interval would be on the Retry Policy.
Expand Down
7 changes: 4 additions & 3 deletions docs/develop/java/activities/basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
id: basics
title: Activity basics - Java SDK
sidebar_label: Activity basics
description: This section explains how to implement Activities with the Java SDK
description: This section explains Activity basics with the Java SDK
toc_max_heading_level: 4
tags:
- Activities
- Java SDK
- Temporal SDKs
---
Expand Down Expand Up @@ -157,7 +158,7 @@ public interface GreetingActivities {
- Method Name: `composeGreeting`
- Activity Type: `ComposeGreeting`

### Custom Prefix
### Custom prefix

Using the `namePrefix` parameter in the `@ActivityInterface` annotation adds a prefix to each Activity Type name mentioned in the interface, unless the prefix is specifically overridden:

Expand All @@ -178,7 +179,7 @@ public interface GreetingActivities {

The Activity Type is capitalized, even when using a prefix.

### Custom Name
### Custom name

To override the default name and any inherited prefixes, use the `name` parameter in the `@ActivityMethod` annotation:

Expand Down
2 changes: 1 addition & 1 deletion docs/develop/java/activities/benign-exceptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: benign-exceptions
title: Benign exceptions - Java SDK
sidebar_label: Benign exceptions
description: Mark expected or non-severe Activity errors as benign to reduce noise in logs, metrics, and OpenTelemetry traces.
description: Mark expected or non-severe Activity errors as benign in Java to reduce noise in logs, metrics, and OpenTelemetry traces.
toc_max_heading_level: 2
tags:
- Activities
Expand Down
20 changes: 4 additions & 16 deletions docs/develop/java/activities/execution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ sidebar_label: Activity Execution
slug: /develop/java/activities/execution
toc_max_heading_level: 3
tags:
- Activities
- Java SDK
- Temporal SDKs
- Activity
---

## Start an Activity Execution {/* #activity-execution */}
Expand Down Expand Up @@ -46,7 +46,7 @@ Calling a method on the Activity interface schedules the Activity invocation wit

Activities can be invoked synchronously or asynchronously.

### Invoking Activities Synchronously
### Invoke Activities synchronously

In the following example, we use the type-safe `Workflow.newActivityStub` within the "FileProcessingWorkflow" Workflow implementation to create a client-side stub of the `FileProcessingActivities` class. We also define `ActivityOptions` and set `setStartToCloseTimeout` option to one hour.

Expand Down Expand Up @@ -118,7 +118,7 @@ This is useful when the Activity type is not known at compile time, or to invoke
activity.execute("ComposeGreeting", String.class, "Hello World", "Spanish");
```

### Invoking Activities Asynchronously
### Invoke Activities asynchronously

Sometimes Workflows need to perform certain operations in parallel.
The Temporal Java SDK provides the `Async` class which includes static methods used to invoke any Activity asynchronously.
Expand Down Expand Up @@ -179,7 +179,7 @@ The following example shows how to call two Activity methods, "download" and "up
}
```

### Activity Execution Context
### ActivityExecutionContext

`ActivityExecutionContext` is a context object passed to each Activity implementation by default.
You can access it in your Activity implementations via `Activity.getExecutionContext()`.
Expand Down Expand Up @@ -292,9 +292,6 @@ This or `StartToCloseTimeout` must be set.
- Default: Unlimited.
Note that if `WorkflowRunTimeout` and/or `WorkflowExecutionTimeout` are defined in the Workflow, all Activity retries will stop when either or both of these timeouts are reached.

You can set Activity Options using an `ActivityStub` within a Workflow implementation, or per-Activity using `WorkflowImplementationOptions` within a Worker.
Note that if you define options per-Activity Type options with `WorkflowImplementationOptions.setActivityOptions()`, setting them again specifically with `ActivityStub` in a Workflow will override this setting.

- With `ActivityStub`

```java
Expand Down Expand Up @@ -325,9 +322,6 @@ To set a [Schedule-To-Start Timeout](/encyclopedia/detecting-activity-failures#s
- Type: `Duration`
- Default: Unlimited. This timeout is non-retryable.

You can set Activity Options using an `ActivityStub` within a Workflow implementation, or per-Activity using `WorkflowImplementationOptions` within a Worker.
Note that if you define options per-Activity Type options with `WorkflowImplementationOptions.setActivityOptions()`, setting them again specifically with `ActivityStub` in a Workflow will override this setting.

- With `ActivityStub`

```java
Expand Down Expand Up @@ -363,9 +357,6 @@ This or `ScheduleToClose` must be set.
- Type: `Duration`
- Default: Defaults to [`ScheduleToCloseTimeout`](#scheduletoclosetimeout) value

You can set Activity Options using an `ActivityStub` within a Workflow implementation, or per-Activity using `WorkflowImplementationOptions` within a Worker.
Note that if you define options per-Activity Type options with `WorkflowImplementationOptions.setActivityOptions()`, setting them again specifically with `ActivityStub` in a Workflow will override this setting.

- With `ActivityStub`

```java
Expand Down Expand Up @@ -397,9 +388,6 @@ To set a [Heartbeat Timeout](/encyclopedia/detecting-activity-failures#heartbeat
- Type: `Duration`
- Default: None

You can set Activity Options using an `ActivityStub` within a Workflow implementation, or per-Activity using `WorkflowImplementationOptions` within a Worker.
Note that if you define options per-Activity Type options with `WorkflowImplementationOptions.setActivityOptions()`, setting them again specifically with `ActivityStub` in a Workflow will override this setting.

- With `ActivityStub`

```java
Expand Down
1 change: 1 addition & 0 deletions docs/develop/java/activities/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sidebar_label: Activities
description: This section explains how to implement Activities with the Java SDK
toc_max_heading_level: 4
tags:
- Activities
- Java SDK
- Temporal SDKs
---
Expand Down
4 changes: 4 additions & 0 deletions docs/develop/java/activities/timeouts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ sidebar_label: Timeouts
description: This section explains how to set Activity Timeouts with the Java SDK
toc_max_heading_level: 4
tags:
- Activities
- Workflows
- Errors
- Failures
- Java SDK
- Temporal SDKs
---
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/php/activities/asynchronous-activity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description:
facilitating parallel operations in Workflows.
---

## How to asynchronously complete an Activity {/* #asynchronous-activity-completion */}
## Asynchronously complete an Activity {/* #asynchronous-activity-completion */}

[Asynchronous Activity Completion](/activity-execution#asynchronous-activity-completion) enables the Activity Function
to return without the Activity Execution completing.
Expand Down
15 changes: 8 additions & 7 deletions docs/develop/php/activities/basics.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
---
id: basics
title: Activity Basics - PHP SDK
sidebar_label: Activity Basics
description: This section explains Activity Basics with the PHP SDK
title: Activity basics - PHP SDK
sidebar_label: Activity basics
description: This section explains Activity basics with the PHP SDK
toc_max_heading_level: 4
tags:
- Activities
- PHP SDK
- Temporal SDKs
---

## How to develop a basic Activity {/* #develop-activities */}
## Develop a basic Activity {/* #develop-activities */}

One of the primary things that Workflows do is orchestrate the execution of Activities.
An Activity is a normal function or method execution that's intended to execute a single, well-defined action (either short or long-running), such as querying a database, calling a third-party API, or transcoding a media file.
Expand All @@ -36,7 +37,7 @@ interface FileProcessingActivities
}
```

### How to develop Activity Parameters {/* #activity-parameters */}
### Develop Activity parameters {/* #activity-parameters */}

There is no explicit limit to the total number of parameters that an [Activity Definition](/activity-definition) may support.
However, there is a limit to the total size of the data that ends up encoded into a gRPC message Payload.
Expand All @@ -59,7 +60,7 @@ A single Workflow can use more than one Activity interface and call more than on
The only requirement is that Activity method arguments and return values are serializable to a byte array using the provided [DataConverter](https://github.com/temporalio/sdk-php/blob/master/src/DataConverter/DataConverterInterface.php) interface.
The default implementation uses a JSON serializer, but an alternative implementation can be easily configured.

### How to define Activity return values {/* #activity-return-values */}
### Define Activity return values {/* #activity-return-values */}

All data returned from an Activity must be serializable.

Expand Down Expand Up @@ -91,7 +92,7 @@ class GreetingActivity implements GreetingActivityInterface
}
```

### How to customize your Activity Type {/* #activity-type */}
### Customize your Activity Type {/* #activity-type */}

Activities have a Type that are referred to as the Activity name.
The following examples demonstrate how to set a custom name for your Activity Type.
Expand Down
Loading