Skip to content

Commit 862e5aa

Browse files
committed
Updates to remove keywords (just for consistency with where we are going), fix some code blocks, and cross link in the feature guides to the quickstart at the end
1 parent 18f0814 commit 862e5aa

12 files changed

Lines changed: 60 additions & 104 deletions

docs/develop/dotnet/activities/standalone-activities-quickstart.mdx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ id: standalone-activities-quickstart
33
title: Standalone Activities .NET Quickstart
44
sidebar_label: Quickstart
55
description: Execute a Standalone Activity with the Temporal .NET SDK without writing a Workflow.
6-
keywords:
7-
- standalone activity
8-
- activity execution
9-
- execute activity
10-
- dotnet sdk
11-
- quickstart
12-
- getting started
136
tags:
147
- Activities
158
- Temporal Client
@@ -53,7 +46,7 @@ This documentation uses source code from the [StandaloneActivity](https://github
5346
</>
5447
}>
5548

56-
## Get Started with Standalone Activities {/* #get-started */}
49+
## Get started with Standalone Activities {/* #get-started */}
5750

5851
Prerequisites:
5952

docs/develop/dotnet/activities/standalone-activities.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,4 +239,4 @@ export TEMPORAL_NAMESPACE=<your-namespace>.<your-account-id>
239239
export TEMPORAL_API_KEY=<your-api-key>
240240
```
241241

242-
Then run the Worker and starter code as shown in the earlier sections.
242+
Then run the Worker and starter code as shown in the [Standalone Activities Quickstart](/develop/dotnet/activities/standalone-activities-quickstart).

docs/develop/go/activities/standalone-activities-quickstart.mdx

Lines changed: 35 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ id: standalone-activities-quickstart
33
title: Standalone Activities Go Quickstart
44
sidebar_label: Quickstart
55
description: Execute a Standalone Activity with the Temporal Go SDK without writing a Workflow.
6-
keywords:
7-
- standalone activity
8-
- activity execution
9-
- execute activity
10-
- go sdk
11-
- quickstart
12-
- getting started
136
tags:
147
- Activities
158
- Temporal Client
@@ -53,7 +46,7 @@ This documentation uses source code from the
5346
</>
5447
}>
5548

56-
## Get Started with Standalone Activities {/* #get-started */}
49+
## Get started with Standalone Activities {/* #get-started */}
5750

5851
Prerequisites:
5952

@@ -176,23 +169,10 @@ Leave this terminal running - the Worker needs to stay up to process activities.
176169

177170
</SetupStep>
178171

179-
<SetupStep>
180-
181-
## Execute a Standalone Activity {/* #execute-activity */}
182-
183-
Use [`client.ExecuteActivity()`](https://pkg.go.dev/go.temporal.io/sdk/client#Client) to start a Standalone Activity
184-
Execution. This is called from application code (for example, a starter program), not from inside a Workflow Definition.
185-
186-
`ExecuteActivity` returns an [`ActivityHandle`](https://pkg.go.dev/go.temporal.io/sdk/client#ActivityHandle) that you
187-
can use to get the result, describe, cancel, or terminate the Activity.
188-
189-
The following starter program demonstrates how to execute a Standalone Activity, get its result, list activities, and
190-
count activities:
191-
192-
[standalone-activity/helloworld/starter/main.go](https://github.com/temporalio/samples-go/blob/main/standalone-activity/helloworld/starter/main.go)
193-
194-
```go
195-
package main
172+
<SetupStep code={
173+
<>
174+
<CodeSnippet language="go" title="starter/main.go">
175+
{`package main
196176
197177
import (
198178
"context"
@@ -254,8 +234,34 @@ func main() {
254234
}
255235
256236
log.Println("Total activities:", resp1.Count)
257-
}
258-
```
237+
}`}
238+
</CodeSnippet>
239+
<CodeSnippet language="bash">
240+
{`go run standalone-activity/helloworld/starter/main.go`}
241+
</CodeSnippet>
242+
<CodeSnippet language="bash">
243+
{`temporal activity execute \\
244+
--type Activity \\
245+
--activity-id standalone_activity_helloworld_ActivityID \\
246+
--task-queue standalone-activity-helloworld \\
247+
--schedule-to-close-timeout 10s \\
248+
--input '"Temporal"'`}
249+
</CodeSnippet>
250+
</>
251+
}>
252+
253+
## Execute a Standalone Activity {/* #execute-activity */}
254+
255+
Use [`client.ExecuteActivity()`](https://pkg.go.dev/go.temporal.io/sdk/client#Client) to start a Standalone Activity
256+
Execution. This is called from application code (for example, a starter program), not from inside a Workflow Definition.
257+
258+
`ExecuteActivity` returns an [`ActivityHandle`](https://pkg.go.dev/go.temporal.io/sdk/client#ActivityHandle) that you
259+
can use to get the result, describe, cancel, or terminate the Activity.
260+
261+
The following starter program demonstrates how to execute a Standalone Activity, get its result, list activities, and
262+
count activities:
263+
264+
Create [standalone-activity/helloworld/starter/main.go](https://github.com/temporalio/samples-go/blob/main/standalone-activity/helloworld/starter/main.go).
259265

260266
You can pass the Activity as either a function reference or a string Activity type name:
261267

@@ -274,22 +280,9 @@ To run the starter:
274280

275281
1. Make sure the Temporal Server is running (from the [Get Started](#get-started) step above).
276282
2. Make sure the Worker is running (from the [Run a Worker](#run-worker) step above).
277-
3. Open a new terminal, navigate to the `samples-go` directory, and run:
283+
3. Open a new terminal, navigate to the `samples-go` directory, and run `go run standalone-activity/helloworld/starter/main.go`.
278284

279-
```
280-
go run standalone-activity/helloworld/starter/main.go
281-
```
282-
283-
Or use the Temporal CLI to execute a Standalone Activity:
284-
285-
```bash
286-
temporal activity execute \
287-
--type Activity \
288-
--activity-id standalone_activity_helloworld_ActivityID \
289-
--task-queue standalone-activity-helloworld \
290-
--schedule-to-close-timeout 10s \
291-
--input '"Temporal"'
292-
```
285+
Or use the Temporal CLI to execute a Standalone Activity.
293286

294287
</SetupStep>
295288

docs/develop/go/activities/standalone-activities.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ temporal activity count
157157

158158
## Run Standalone Activities with Temporal Cloud {/* #run-standalone-activities-temporal-cloud */}
159159

160-
The code samples on this page use `envconfig.MustLoadDefaultClientOptions()`, so the same code
161-
works against Temporal Cloud - just configure the connection via environment variables or a TOML
162-
profile. No code changes are needed.
160+
The Worker and Client code in the [Standalone Activities Quickstart](/develop/go/activities/standalone-activities-quickstart)
161+
use `envconfig.MustLoadDefaultClientOptions()`, so the same code works against Temporal Cloud -
162+
configure the connection via environment variables or a TOML profile. No code changes are needed.
163163

164164
For a step-by-step guide on connecting to Temporal Cloud, including Namespace creation, certificate
165165
generation, and authentication setup in the Cloud UI, see
@@ -186,4 +186,4 @@ export TEMPORAL_NAMESPACE=<your-namespace>.<your-account-id>
186186
export TEMPORAL_API_KEY=<your-api-key>
187187
```
188188

189-
Then run the Worker and starter code as shown in the earlier sections.
189+
Then run the Worker and starter code as shown in the [Standalone Activities Quickstart](/develop/go/activities/standalone-activities-quickstart).

docs/develop/java/activities/standalone-activities-quickstart.mdx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ id: standalone-activities-quickstart
33
title: Standalone Activities Java Quickstart
44
sidebar_label: Quickstart
55
description: Execute a Standalone Activity with the Temporal Java SDK without writing a Workflow.
6-
keywords:
7-
- standalone activity
8-
- activity execution
9-
- execute activity
10-
- java sdk
11-
- quickstart
12-
- getting started
136
tags:
147
- Activities
158
- Temporal Client
@@ -55,7 +48,7 @@ sample.
5548
</>
5649
}>
5750

58-
## Get Started with Standalone Activities {/* #get-started */}
51+
## Get started with Standalone Activities {/* #get-started */}
5952

6053
Prerequisites:
6154

docs/develop/java/activities/standalone-activities.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ Or use the Temporal CLI:
207207

208208
## Run Standalone Activities with Temporal Cloud {/* #run-standalone-activities-temporal-cloud */}
209209

210-
The code samples on this page use `ClientConfigProfile.load()`, so the same code works against
211-
Temporal Cloud — just configure the connection via environment variables or a TOML profile. No code
212-
changes are needed.
210+
The Worker and Client code in the [Standalone Activities Quickstart](/develop/java/activities/standalone-activities-quickstart)
211+
use `ClientConfigProfile.load()`, so the same code works against Temporal Cloud — configure the
212+
connection via environment variables or a TOML profile. No code changes are needed.
213213

214214
For a step-by-step guide on connecting to Temporal Cloud, including Namespace creation, certificate
215215
generation, and authentication setup in the Cloud UI, see
@@ -236,4 +236,4 @@ export TEMPORAL_NAMESPACE=<your-namespace>.<your-account-id>
236236
export TEMPORAL_API_KEY=<your-api-key>
237237
```
238238

239-
Then run the Worker and starter code as shown in the earlier sections.
239+
Then run the Worker and starter code as shown in the [Standalone Activities Quickstart](/develop/java/activities/standalone-activities-quickstart).

docs/develop/python/activities/standalone-activities-quickstart.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ id: standalone-activities-quickstart
33
title: Standalone Activities Python Quickstart
44
sidebar_label: Quickstart
55
description: Execute a Standalone Activity with the Temporal Python SDK without writing a Workflow.
6-
keywords:
7-
- standalone activity
8-
- activity execution
9-
- execute activity
10-
- python sdk
11-
- quickstart
12-
- getting started
136
tags:
147
- Activities
158
- Temporal Client
@@ -59,7 +52,7 @@ This documentation uses source code from the [hello_standalone_activity](https:/
5952
</>
6053
}>
6154

62-
## Get Started with Standalone Activities
55+
## Get started with Standalone Activities
6356

6457
Prerequisites:
6558

@@ -129,7 +122,7 @@ def compose_greeting(input: ComposeGreetingInput) -> str:
129122
</>
130123
}>
131124

132-
## Write an Activity Function
125+
## Write an Activity function
133126

134127
An Activity in the Temporal Python SDK is just a normal function with the `@activity.defn`
135128
decorator. It can optionally be an `async def`. The way you write a Standalone Activity is identical

docs/develop/python/activities/standalone-activities.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,4 @@ export TEMPORAL_NAMESPACE=<your-namespace>.<your-account-id>
251251
export TEMPORAL_API_KEY=<your-api-key>
252252
```
253253

254-
Then run the Worker and starter code as shown in the earlier sections.
254+
Then run the Worker and starter code as shown in the [Standalone Activities Quickstart](/develop/python/activities/standalone-activities-quickstart).

docs/develop/ruby/activities/standalone-activities-quickstart.mdx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ id: standalone-activities-quickstart
33
title: Standalone Activities Ruby Quickstart
44
sidebar_label: Quickstart
55
description: Execute a Standalone Activity with the Temporal Ruby SDK without writing a Workflow.
6-
keywords:
7-
- standalone activity
8-
- activity execution
9-
- execute activity
10-
- ruby sdk
11-
- quickstart
12-
- getting started
136
tags:
147
- Activities
158
- Temporal Client
@@ -55,7 +48,7 @@ sample.
5548
</>
5649
}>
5750

58-
## Get Started with Standalone Activities {/* #get-started */}
51+
## Get started with Standalone Activities {/* #get-started */}
5952

6053
Prerequisites:
6154

docs/develop/ruby/activities/standalone-activities.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,9 @@ temporal activity count
196196

197197
## Run Standalone Activities with Temporal Cloud {/* #run-standalone-activities-temporal-cloud */}
198198

199-
The code samples on this page use [`Temporalio::EnvConfig::ClientConfig.load_client_connect_options`](https://ruby.temporal.io/Temporalio/EnvConfig/ClientConfig.html#load_client_connect_options-class_method),
200-
so the same code works against Temporal Cloud — just configure the connection via environment
199+
The Worker and Client code in the [Standalone Activities Quickstart](/develop/ruby/activities/standalone-activities-quickstart)
200+
use [`Temporalio::EnvConfig::ClientConfig.load_client_connect_options`](https://ruby.temporal.io/Temporalio/EnvConfig/ClientConfig.html#load_client_connect_options-class_method),
201+
so the same code works against Temporal Cloud — configure the connection via environment
201202
variables or a TOML profile. No code changes are needed.
202203

203204
For a step-by-step guide on connecting to Temporal Cloud, including Namespace creation, certificate
@@ -225,4 +226,4 @@ export TEMPORAL_NAMESPACE=<your-namespace>.<your-account-id>
225226
export TEMPORAL_API_KEY=<your-api-key>
226227
```
227228

228-
Then run the Worker and starter code as shown in the earlier sections.
229+
Then run the Worker and starter code as shown in the [Standalone Activities Quickstart](/develop/ruby/activities/standalone-activities-quickstart).

0 commit comments

Comments
 (0)