diff --git a/docs/getting_started/dotnet/first_program_in_dotnet/index.md b/docs/getting_started/dotnet/first_program_in_dotnet/index.md index e3f7dc79..b1c06ed9 100644 --- a/docs/getting_started/dotnet/first_program_in_dotnet/index.md +++ b/docs/getting_started/dotnet/first_program_in_dotnet/index.md @@ -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. diff --git a/docs/getting_started/go/first_program_in_go/index.md b/docs/getting_started/go/first_program_in_go/index.md index 1c5b94c1..9ddda463 100644 --- a/docs/getting_started/go/first_program_in_go/index.md +++ b/docs/getting_started/go/first_program_in_go/index.md @@ -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. diff --git a/docs/getting_started/go/hello_world_in_go/index.md b/docs/getting_started/go/hello_world_in_go/index.md index 6e1d19be..a0e82171 100644 --- a/docs/getting_started/go/hello_world_in_go/index.md +++ b/docs/getting_started/go/hello_world_in_go/index.md @@ -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. diff --git a/docs/getting_started/java/first_program_in_java/index.md b/docs/getting_started/java/first_program_in_java/index.md index 070567f4..f76194c1 100644 --- a/docs/getting_started/java/first_program_in_java/index.md +++ b/docs/getting_started/java/first_program_in_java/index.md @@ -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. diff --git a/docs/getting_started/python/first_program_in_python/index.md b/docs/getting_started/python/first_program_in_python/index.md index 7c4a5e18..3370b9c5 100644 --- a/docs/getting_started/python/first_program_in_python/index.md +++ b/docs/getting_started/python/first_program_in_python/index.md @@ -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. diff --git a/docs/getting_started/python/hello_world_in_python/index.md b/docs/getting_started/python/hello_world_in_python/index.md index 557e5290..06fce35f 100644 --- a/docs/getting_started/python/hello_world_in_python/index.md +++ b/docs/getting_started/python/hello_world_in_python/index.md @@ -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. diff --git a/docs/getting_started/ruby/hello_world_in_ruby/index.md b/docs/getting_started/ruby/hello_world_in_ruby/index.md index 50667878..31e2bdea 100644 --- a/docs/getting_started/ruby/hello_world_in_ruby/index.md +++ b/docs/getting_started/ruby/hello_world_in_ruby/index.md @@ -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. @@ -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: diff --git a/docs/getting_started/typescript/first_program_in_typescript/index.md b/docs/getting_started/typescript/first_program_in_typescript/index.md index ac71f806..9059a4bc 100644 --- a/docs/getting_started/typescript/first_program_in_typescript/index.md +++ b/docs/getting_started/typescript/first_program_in_typescript/index.md @@ -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. diff --git a/docs/getting_started/typescript/hello_world_in_typescript/index.md b/docs/getting_started/typescript/hello_world_in_typescript/index.md index 9c1a0cb2..1652f133 100644 --- a/docs/getting_started/typescript/hello_world_in_typescript/index.md +++ b/docs/getting_started/typescript/hello_world_in_typescript/index.md @@ -265,7 +265,7 @@ const { getIP, getLocationInfo} = workflow.proxyActivities({ ``` -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. diff --git a/docs/tutorials/go/audiobook/index.md b/docs/tutorials/go/audiobook/index.md index b8ea86fc..b6a0c43d 100644 --- a/docs/tutorials/go/audiobook/index.md +++ b/docs/tutorials/go/audiobook/index.md @@ -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. diff --git a/docs/tutorials/java/audiobook/index.md b/docs/tutorials/java/audiobook/index.md index 33a5c61c..4c52924a 100644 --- a/docs/tutorials/java/audiobook/index.md +++ b/docs/tutorials/java/audiobook/index.md @@ -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: diff --git a/docs/tutorials/typescript/background-check/project-setup.mdx b/docs/tutorials/typescript/background-check/project-setup.mdx index a481813a..1d06a60d 100644 --- a/docs/tutorials/typescript/background-check/project-setup.mdx +++ b/docs/tutorials/typescript/background-check/project-setup.mdx @@ -420,7 +420,7 @@ error. To return a value of the Workflow function, use `Promise`. 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. diff --git a/docs/tutorials/typescript/build-one-click-order-app-nextjs/index.md b/docs/tutorials/typescript/build-one-click-order-app-nextjs/index.md index 56da279a..73e76cb9 100644 --- a/docs/tutorials/typescript/build-one-click-order-app-nextjs/index.md +++ b/docs/tutorials/typescript/build-one-click-order-app-nextjs/index.md @@ -211,7 +211,7 @@ export async function oneClickBuy(id: string): Promise { 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.