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
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ Lastly, the `DepositAsync()` Activity method looks almost identical to the `With
:::tip Why you use Activities


At first glance, you might think you can incorporate your logic into the Workflow Definition. However, Temporal Workflows have certain [deterministic constraints](https://docs.temporal.io/workflows#deterministic-constraints) and must produce the same output each time, given the same input. This means that any non-deterministic work such as interacting with the outside world, like accessing files or network resources, must be done by Activities.
At first glance, you might think you can incorporate your logic into the Workflow Definition. However, Temporal Workflows have certain [deterministic constraints](https://docs.temporal.io/workflow-definition#deterministic-constraints) and must produce the same output each time, given the same input. This means that any non-deterministic work such as interacting with the outside world, like accessing files or network resources, must be done by Activities.


In addition, by using Activities, you can take advantage of Temporal's ability to retry Activities indefinitely, which you'll explore later in this tutorial.
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/go/first_program_in_go/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ This Activity function is almost identical to the `Deposit` function, except tha

:::tip Why you use Activities

At first glance, you might think you can incorporate your logic into the Workflow Definition. However, Temporal Workflows have certain [deterministic constraints](https://docs.temporal.io/workflows#deterministic-constraints). For example, they need to be replayable, and making changes to the Workflow code makes it much harder to replay.
At first glance, you might think you can incorporate your logic into the Workflow Definition. However, Temporal Workflows have certain [deterministic constraints](https://docs.temporal.io/workflow-definition#deterministic-constraints). For example, they need to be replayable, and making changes to the Workflow code makes it much harder to replay.

In addition, by using Activities, you can take advantage of Temporal's ability to retry Activities indefinitely, which you'll explore later in this tutorial.

Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/go/hello_world_in_go/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ With the project created, you'll create the application's core logic.

Your application will make two HTTP requests. The first request will return your current public IP, while the second request will use that IP to provide city, state, and country information.

You'll use Temporal Activities to make these requests. You use Activities in your Temporal Applications to execute [non-deterministic](https://docs.temporal.io/workflows#deterministic-constraints) code or perform operations that may fail, such as API requests or database calls.
You'll use Temporal Activities to make these requests. You use Activities in your Temporal Applications to execute [non-deterministic](https://docs.temporal.io/workflow-definition#deterministic-constraints) code or perform operations that may fail, such as API requests or database calls.

If an Activity fails, Temporal can automatically retry it until it succeeds or reaches a specified retry limit. This ensures that transient issues, like network glitches or temporary service outages, don't result in data loss or incomplete processes.

Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/java/first_program_in_java/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public class AccountActivityImpl implements AccountActivity {
:::tip Why you use Activities


At first glance, you might think you can incorporate your logic into the Workflow Definition. However, Temporal Workflows have certain [deterministic constraints](https://docs.temporal.io/workflows#deterministic-constraints) and must produce the same output each time, given the same input. This means that any non-deterministic work such as interacting with the outside world, like accessing files or network resources, must be done by Activities.
At first glance, you might think you can incorporate your logic into the Workflow Definition. However, Temporal Workflows have certain [deterministic constraints](https://docs.temporal.io/workflow-definition#deterministic-constraints) and must produce the same output each time, given the same input. This means that any non-deterministic work such as interacting with the outside world, like accessing files or network resources, must be done by Activities.


In addition, by using Activities, you can take advantage of Temporal's ability to retry Activities indefinitely, which you'll explore later in this tutorial.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Lastly, the `deposit()` Activity method looks almost identical to the `withdraw(

:::tip Why you use Activities

At first glance, you might think you can incorporate your logic into the Workflow Definition. However, Temporal Workflows have certain [deterministic constraints](https://docs.temporal.io/workflows#deterministic-constraints) and must produce the same output each time, given the same input. This means that any non-deterministic work such as interacting with the outside world, like accessing files or network resources, must be done by Activities.
At first glance, you might think you can incorporate your logic into the Workflow Definition. However, Temporal Workflows have certain [deterministic constraints](https://docs.temporal.io/workflow-definition#deterministic-constraints) and must produce the same output each time, given the same input. This means that any non-deterministic work such as interacting with the outside world, like accessing files or network resources, must be done by Activities.

In addition, by using Activities, you can take advantage of Temporal's ability to retry Activities indefinitely, which you'll explore later in this tutorial.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ With your Workflow Definition created, you're ready to create the `say_hello` Ac

## Create an Activity

In a Temporal Application, Activities are where you execute [non-deterministic](https://docs.temporal.io/workflows#deterministic-constraints) code or perform operations that may fail, such as API requests or database calls. Your Workflow Definitions call Activities and process the results. Complex Temporal Applications have Workflows that invoke many Activities, using the results of one Activity to execute another.
In a Temporal Application, Activities are where you execute [non-deterministic](https://docs.temporal.io/workflow-definition#deterministic-constraints) code or perform operations that may fail, such as API requests or database calls. Your Workflow Definitions call Activities and process the results. Complex Temporal Applications have Workflows that invoke many Activities, using the results of one Activity to execute another.

For this tutorial, your Activity won't be complex; you'll define an Activity that takes a string as input and uses it to create a new string as output, which is then returned to the Workflow. This will let you see how Workflows and Activities work together without building something complicated.

Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started/ruby/hello_world_in_ruby/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ With the project created, you'll create the application's core logic.

Your application will make two HTTP requests. The first request will return your current public IP, while the second request will use that IP to provide city, state, and country information.

You'll use Temporal Activities to make these requests. You use Activities in your Temporal Applications to execute [non-deterministic](https://docs.temporal.io/workflows#deterministic-constraints) code or perform operations that may fail, such as API requests or database calls.
You'll use Temporal Activities to make these requests. You use Activities in your Temporal Applications to execute [non-deterministic](https://docs.temporal.io/workflow-definition#deterministic-constraints) code or perform operations that may fail, such as API requests or database calls.

If an Activity fails, Temporal can automatically retry it until it succeeds or reaches a specified retry limit. This ensures that transient issues, like network glitches or temporary service outages, don't result in data loss or incomplete processes.

Expand Down Expand Up @@ -209,7 +209,7 @@ You've created your two Activities. Now you'll coordinate them using a Temporal

Workflows are where you configure and organize the execution of Activities. You define a Workflow by writing a *Workflow Definition* using one of the Temporal SDKs.

Temporal Workflows [must be deterministic](https://docs.temporal.io/workflows#deterministic-constraints) so that Temporal can replay your Workflow in the event of a crash. That's why you call Activities from your Workflow code. Activities don't have the same determinism constraints that Workflows have.
Temporal Workflows [must be deterministic](https://docs.temporal.io/workflow-definition#deterministic-constraints) so that Temporal can replay your Workflow in the event of a crash. That's why you call Activities from your Workflow code. Activities don't have the same determinism constraints that Workflows have.

Create the file `get_address_from_ip_workflow.rb` in the `ip_geolocate` folder:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ This Activity function is almost identical to the `deposit` function, except tha

:::tip Why you use Activities

At first glance, you might think you can incorporate your logic into the Workflow Definition. However, Temporal Workflows have certain [deterministic constraints](https://docs.temporal.io/workflows#deterministic-constraints). For example, they need to be replayable, and making changes to the Workflow code makes it much harder to replay.
At first glance, you might think you can incorporate your logic into the Workflow Definition. However, Temporal Workflows have certain [deterministic constraints](https://docs.temporal.io/workflow-definition#deterministic-constraints). For example, they need to be replayable, and making changes to the Workflow code makes it much harder to replay.

In addition, by using Activities, you can take advantage of Temporal's ability to retry Activities indefinitely, which you'll explore later in this tutorial.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ const { getIP, getLocationInfo} = workflow.proxyActivities<typeof activities>({
```
<!--SNIPEND-->

The Temporal TypeScript SDK requires that Workflows and Activities run in separate environments. Temporal Workflows [must be deterministic](https://docs.temporal.io/workflows#deterministic-constraints) so that Temporal can replay your Workflow in the event of a crash, and the TypeScript SDK runs Workflows in a sandbox that checks code for determinism to enforce this.
The Temporal TypeScript SDK requires that Workflows and Activities run in separate environments. Temporal Workflows [must be deterministic](https://docs.temporal.io/workflow-definition#deterministic-constraints) so that Temporal can replay your Workflow in the event of a crash, and the TypeScript SDK runs Workflows in a sandbox that checks code for determinism to enforce this.

Since you run your non-deterministic operations in Activities, you configure your Workflow to call Activities through a proxy. That's why you import their types rather than the functions themselves.

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/go/audiobook/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ It's essentially a sequence of steps written in your programming language.

[Workflows](https://docs.temporal.io/workflows) coordinate [Activities](https://docs.temporal.io/activities), which are the methods you created in the previous section.
You use Activities to make API requests, access the file system, invoke LLMs and other AI services, or perform other non-deterministic operations.
In contrast, every Workflow [must be deterministic](https://docs.temporal.io/workflows#deterministic-constraints) so you perform all your non-deterministic work in Activities.
In contrast, every Workflow [must be deterministic](https://docs.temporal.io/workflow-definition#deterministic-constraints) so you perform all your non-deterministic work in Activities.
This separation is also what makes Temporal a strong fit for AI applications: LLM calls, tool use, and agent steps are non-deterministic by nature, so you place them in Activities while the Workflow reliably orchestrates the sequence.

Create `TTSWorkflow.go` in your root folder and add the following code.
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/java/audiobook/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ The function returns the file output path for the generated mp3 results.

[Workflows](https://docs.temporal.io/workflows) coordinate [Activities](https://docs.temporal.io/activities), which are the methods you created in the previous section.
You use Activities to make API requests, access the file system, invoke LLMs and other AI services, or perform other non-deterministic operations.
In contrast, every Workflow [must be deterministic](https://docs.temporal.io/workflows#deterministic-constraints) so you perform all your non-deterministic work in Activities.
In contrast, every Workflow [must be deterministic](https://docs.temporal.io/workflow-definition#deterministic-constraints) so you perform all your non-deterministic work in Activities.
This separation is also what makes Temporal a strong fit for AI applications: LLM calls, tool use, and agent steps are non-deterministic by nature, so you place them in Activities while the Workflow reliably orchestrates the sequence.

This is the complete business logic code for this application:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ error.
To return a value of the Workflow function, use `Promise<something>`. The
Promise is used to make asynchronous calls and comes with guarantees.

Workflow logic is constrained by [deterministic execution requirements](https://docs.temporal.io/workflows#deterministic-constraints).
Workflow logic is constrained by [deterministic execution requirements](https://docs.temporal.io/workflow-definition#deterministic-constraints).
Therefore, each language is limited to the use of certain idiomatic techniques.
However, each Temporal SDK provides a set of APIs that can be used inside your Workflow to interact with external (to the Workflow) application code.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export async function oneClickBuy(id: string): Promise<string> {

This Workflow calls the `purchase` Activity and then uses `await sleep()` to create an artificial delay in the Workflow. A more complex Workflow would call more Activities.

[Workflows must be deterministic](https://docs.temporal.io/workflows#deterministic-constraints), so you perform non-deterministic work in Activities.
[Workflows must be deterministic](https://docs.temporal.io/workflow-definition#deterministic-constraints), so you perform non-deterministic work in Activities.
The TypeScript SDK bundles Workflow code and runs it inside a [deterministic sandbox](https://docs.temporal.io/develop/typescript/workflows/basics#workflow-logic-requirements). This sandbox can help detect if you're using nondeterministic code.
This is why you must separate Workflow code from Activity code, and why you have to use the `proxyActivities` function to load your Activity functions instead of directly importing them. The Activities will be nondeterministic, so you can't run in the same sandbox as the Workflow code.

Expand Down
Loading