Skip to content

Commit 724ca35

Browse files
authored
Merge pull request #280366 from ktoliver/266456
[AQ] edit pass of Durable Functions quickstarts (work item 266456)
2 parents 69715b0 + 33c6697 commit 724ca35

File tree

58 files changed

+1260
-1329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1260
-1329
lines changed

.openpublishing.redirection.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
{
7979
"source_path": "articles/expressroute/expressroute-howto-set-global-reach-cli.md",
8080
"redirect_url": "/previous-versions/azure/expressroute/expressroute-howto-set-global-reach-cli",
81+
"redirect_document_id": false
8182
},
8283
{
8384
"source_path": "articles/digital-twins/how-to-integrate-maps.md",
@@ -4402,6 +4403,11 @@
44024403
"redirect_url": "/azure/azure-functions",
44034404
"redirect_document_id": false
44044405
},
4406+
{
4407+
"source_path_from_root": "/articles/azure-functions/durable/durable-functions-create-first-csharp.md",
4408+
"redirect_url": "/azure/azure-functions/durable/durable-functions-isolated-create-first-csharp.md",
4409+
"redirect_document_id": false
4410+
},
44054411
{
44064412
"source_path_from_root": "/articles/twilio-dotnet-how-to-use-for-voice-sms.md",
44074413
"redirect_url": "https://www.twilio.com/docs/usage/tutorials/serverless-webhooks-azure-functions-and-csharp",

articles/azure-functions/durable/TOC.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,29 @@
1717
- name: Quickstarts
1818
expanded: true
1919
items:
20-
- name: Create durable function - C#
21-
items:
22-
- name: In-process
23-
href: durable-functions-create-first-csharp.md
24-
displayName: get started, chaining
25-
- name: Isolated worker process
26-
href: durable-functions-isolated-create-first-csharp.md
27-
displayName: get started, chaining
28-
- name: Create durable function - JavaScript
20+
- name: Create a Durable Functions app - C#
21+
displayName: get started, chaining
22+
href: durable-functions-isolated-create-first-csharp.md
23+
- name: Create a Durable Functions app - JavaScript
2924
displayName: get started, chaining
3025
href: quickstart-js-vscode.md
31-
- name: Create durable function - TypeScript
26+
- name: Create a Durable Functions app - TypeScript
3227
displayName: get started, chaining
3328
href: quickstart-ts-vscode.md
34-
- name: Create durable function - Python
29+
- name: Create a Durable Functions app - Python
3530
displayName: get started, chaining
3631
href: quickstart-python-vscode.md
37-
- name: Create durable function - PowerShell
32+
- name: Create a Durable Functions app - PowerShell
3833
displayName: get started, chaining
3934
href: quickstart-powershell-vscode.md
40-
- name: Create durable function - Java
35+
- name: Create a Durable Functions app - Java
4136
displayName: get started, chaining
4237
href: quickstart-java.md
43-
- name: Configure storage provider - Netherite
38+
- name: Configure a storage provider - Netherite
4439
href: quickstart-netherite.md
45-
- name: Configure storage provider - MSSQL
40+
- name: Configure a storage provider - MSSQL
4641
href: quickstart-mssql.md
47-
- name: Configure Durable Functions with Microsoft Entra ID
42+
- name: Authenticate a Durable Functions app
4843
href: durable-functions-configure-durable-functions-with-credentials.md
4944
- name: Tutorials
5045
items:

articles/azure-functions/durable/durable-functions-configure-durable-functions-with-credentials.md

Lines changed: 130 additions & 85 deletions
Large diffs are not rendered by default.

articles/azure-functions/durable/durable-functions-create-first-csharp.md

Lines changed: 0 additions & 289 deletions
This file was deleted.

articles/azure-functions/durable/durable-functions-create-portal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The [Durable Functions](durable-functions-overview.md) extension for Azure Funct
1515

1616
> [!NOTE]
1717
>
18-
> * If you are developing durable functions in C#, you should instead consider [Visual Studio 2019 development](durable-functions-create-first-csharp.md).
18+
> * If you are developing durable functions in C#, you should instead consider [Visual Studio 2019 development](durable-functions-isolated-create-first-csharp.md).
1919
> * If you are developing durable functions in JavaScript, you should instead consider [Visual Studio Code development](./quickstart-js-vscode.md).
2020
2121
## Create a function app

articles/azure-functions/durable/durable-functions-isolated-create-first-csharp.md

Lines changed: 121 additions & 115 deletions
Large diffs are not rendered by default.

articles/azure-functions/durable/durable-functions-monitor.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The monitor pattern refers to a flexible *recurring* process in a workflow - for
1616

1717
# [C#](#tab/csharp)
1818

19-
* [Complete the quickstart article](durable-functions-create-first-csharp.md)
19+
* [Complete the quickstart article](durable-functions-isolated-create-first-csharp.md)
2020
* [Clone or download the samples project from GitHub](https://github.com/Azure/azure-functions-durable-extension/tree/main/samples/precompiled)
2121

2222
# [JavaScript](#tab/javascript)
@@ -30,7 +30,7 @@ The monitor pattern refers to a flexible *recurring* process in a workflow - for
3030

3131
This sample monitors a location's current weather conditions and alerts a user by SMS when the skies are clear. You could use a regular timer-triggered function to check the weather and send alerts. However, one problem with this approach is **lifetime management**. If only one alert should be sent, the monitor needs to disable itself after clear weather is detected. The monitoring pattern can end its own execution, among other benefits:
3232

33-
* Monitors run on intervals, not schedules: a timer trigger *runs* every hour; a monitor *waits* one hour between actions. A monitor's actions will not overlap unless specified, which can be important for long-running tasks.
33+
* Monitors run on intervals, not schedules: a timer trigger *runs* every hour; a monitor *waits* one hour between actions. A monitor's actions won't overlap unless specified, which can be important for long-running tasks.
3434
* Monitors can have dynamic intervals: the wait time can change based on some condition.
3535
* Monitors can terminate when some condition is met or be terminated by another process.
3636
* Monitors can take parameters. The sample shows how the same weather-monitoring process can be applied to any requested location and phone number.
@@ -47,7 +47,7 @@ This sample monitors a location's current weather conditions and alerts a user b
4747

4848
This sample involves using the Weather Underground API to check current weather conditions for a location.
4949

50-
The first thing you need is a Weather Underground account. You can create one for free at [https://www.wunderground.com/signup](https://www.wunderground.com/signup). Once you have an account, you will need to acquire an API key. You can do so by visiting [https://www.wunderground.com/weather/api](https://www.wunderground.com/weather/api/?MR=1), then selecting Key Settings. The Stratus Developer plan is free and sufficient to run this sample.
50+
The first thing you need is a Weather Underground account. You can create one for free at [https://www.wunderground.com/signup](https://www.wunderground.com/signup). Once you have an account, you need to acquire an API key. You can do so by visiting [https://www.wunderground.com/weather/api](https://www.wunderground.com/weather/api/?MR=1), then selecting Key Settings. The Stratus Developer plan is free and sufficient to run this sample.
5151

5252
Once you have an API key, add the following **app setting** to your function app.
5353

@@ -69,30 +69,30 @@ This article explains the following functions in the sample app:
6969

7070
[!code-csharp[Main](~/samples-durable-functions/samples/precompiled/Monitor.cs?range=41-78,97-115)]
7171

72-
The orchestrator requires a location to monitor and a phone number to send a message to when the whether becomes clear at the location. This data is passed to the orchestrator as a strongly typed `MonitorRequest` object.
72+
The orchestrator requires a location to monitor and a phone number to send a message to when the weather becomes clear at the location. This data is passed to the orchestrator as a strongly typed `MonitorRequest` object.
7373

7474
# [JavaScript](#tab/javascript)
7575

7676
The **E3_Monitor** function uses the standard *function.json* for orchestrator functions.
7777

7878
:::code language="javascript" source="~/azure-functions-durable-js/samples/E3_Monitor/function.json":::
7979

80-
Here is the code that implements the function:
80+
Here's the code that implements the function:
8181

8282
:::code language="javascript" source="~/azure-functions-durable-js/samples/E3_Monitor/index.js":::
8383

8484
---
8585

8686
This orchestrator function performs the following actions:
8787

88-
1. Gets the **MonitorRequest** consisting of the *location* to monitor and the *phone number* to which it will send an SMS notification.
88+
1. Gets the **MonitorRequest** consisting of the *location* to monitor and the *phone number* to which it sends an SMS notification.
8989
2. Determines the expiration time of the monitor. The sample uses a hard-coded value for brevity.
9090
3. Calls **E3_GetIsClear** to determine whether there are clear skies at the requested location.
9191
4. If the weather is clear, calls **E3_SendGoodWeatherAlert** to send an SMS notification to the requested phone number.
9292
5. Creates a durable timer to resume the orchestration at the next polling interval. The sample uses a hard-coded value for brevity.
9393
6. Continues running until the current UTC time passes the monitor's expiration time, or an SMS alert is sent.
9494

95-
Multiple orchestrator instances can run simultaneously by calling the orchestrator function multiple times. The location to monitor and the phone number to send an SMS alert to can be specified. Finally, do note that the orchestrator function is *not* running while waiting for the timer, so you will not get charged for it.
95+
Multiple orchestrator instances can run simultaneously by calling the orchestrator function multiple times. The location to monitor and the phone number to send an SMS alert to can be specified. Finally, do note that the orchestrator function isn't* running while waiting for the timer, so you won't get charged for it.
9696
### E3_GetIsClear activity function
9797

9898
As with other samples, the helper activity functions are regular functions that use the `activityTrigger` trigger binding. The **E3_GetIsClear** function gets the current weather conditions using the Weather Underground API and determines whether the sky is clear.
@@ -107,7 +107,7 @@ The *function.json* is defined as follows:
107107

108108
:::code language="javascript" source="~/azure-functions-durable-js/samples/E3_GetIsClear/function.json":::
109109

110-
And here is the implementation.
110+
And here's the implementation.
111111

112112
:::code language="javascript" source="~/azure-functions-durable-js/samples/E3_GetIsClear/index.js":::
113113

@@ -130,7 +130,7 @@ Its *function.json* is simple:
130130

131131
:::code language="javascript" source="~/azure-functions-durable-js/samples/E3_SendGoodWeatherAlert/function.json":::
132132

133-
And here is the code that sends the SMS message:
133+
And here's the code that sends the SMS message:
134134

135135
:::code language="javascript" source="~/azure-functions-durable-js/samples/E3_SendGoodWeatherAlert/index.js":::
136136

@@ -157,7 +157,7 @@ RetryAfter: 10
157157
{"id": "f6893f25acf64df2ab53a35c09d52635", "statusQueryGetUri": "https://{host}/runtime/webhooks/durabletask/instances/f6893f25acf64df2ab53a35c09d52635?taskHub=SampleHubVS&connection=Storage&code={systemKey}", "sendEventPostUri": "https://{host}/runtime/webhooks/durabletask/instances/f6893f25acf64df2ab53a35c09d52635/raiseEvent/{eventName}?taskHub=SampleHubVS&connection=Storage&code={systemKey}", "terminatePostUri": "https://{host}/runtime/webhooks/durabletask/instances/f6893f25acf64df2ab53a35c09d52635/terminate?reason={text}&taskHub=SampleHubVS&connection=Storage&code={systemKey}"}
158158
```
159159

160-
The **E3_Monitor** instance starts and queries the current weather conditions for the requested location. If the weather is clear, it calls an activity function to send an alert; otherwise, it sets a timer. When the timer expires, the orchestration will resume.
160+
The **E3_Monitor** instance starts and queries the current weather conditions for the requested location. If the weather is clear, it calls an activity function to send an alert; otherwise, it sets a timer. When the timer expires, the orchestration resumes.
161161

162162
You can see the orchestration's activity by looking at the function logs in the Azure Functions portal.
163163

@@ -177,15 +177,15 @@ You can see the orchestration's activity by looking at the function logs in the
177177
2018-03-01T01:14:54.030 Function completed (Success, Id=561d0c78-ee6e-46cb-b6db-39ef639c9a2c, Duration=62ms)
178178
```
179179

180-
The orchestration completes once its timeout is reached or clear skies are detected. You can also use the `terminate` API inside another function or invoke the **terminatePostUri** HTTP POST webhook referenced in the 202 response above. To use the webhook, replace `{text}` with the reason for the early termination. The HTTP POST URL will look roughly as follows:
180+
The orchestration completes once its timeout is reached or clear skies are detected. You can also use the `terminate` API inside another function or invoke the **terminatePostUri** HTTP POST webhook referenced in the preceding 202 response. To use the webhook, replace `{text}` with the reason for the early termination. The HTTP POST URL looks roughly as follows:
181181

182182
```
183183
POST https://{host}/runtime/webhooks/durabletask/instances/f6893f25acf64df2ab53a35c09d52635/terminate?reason=Because&taskHub=SampleHubVS&connection=Storage&code={systemKey}
184184
```
185185

186186
## Next steps
187187

188-
This sample has demonstrated how to use Durable Functions to monitor an external source's status using [durable timers](durable-functions-timers.md) and conditional logic. The next sample shows how to use external events and [durable timers](durable-functions-timers.md) to handle human interaction.
188+
This sample demonstrates how to use Durable Functions to monitor an external source's status using [durable timers](durable-functions-timers.md) and conditional logic. The next sample shows how to use external events and [durable timers](durable-functions-timers.md) to handle human interaction.
189189

190190
> [!div class="nextstepaction"]
191-
> [Run the human interaction sample](durable-functions-phone-verification.md)
191+
> [Run the human interaction sample](durable-functions-phone-verification.md)

articles/azure-functions/durable/durable-functions-overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Durable Functions is designed to work with all Azure Functions programming langu
3838
> This article uses tabs to support multiple versions of the Python programming model. The v2 model is generally available and is designed to provide a more code-centric way for authoring functions through decorators. For more details about how the v2 model works, refer to the [Azure Functions Python developer guide](../functions-reference-python.md).
3939
::: zone-end
4040

41-
Like Azure Functions, there are templates to help you develop Durable Functions using [Visual Studio](durable-functions-create-first-csharp.md), [Visual Studio Code](quickstart-js-vscode.md), and the [Azure portal](durable-functions-create-portal.md).
41+
Like Azure Functions, there are templates to help you develop Durable Functions using [Visual Studio](durable-functions-isolated-create-first-csharp.md), [Visual Studio Code](quickstart-js-vscode.md), and the [Azure portal](durable-functions-create-portal.md).
4242

4343
## Application patterns
4444

@@ -479,7 +479,7 @@ The async HTTP API pattern addresses the problem of coordinating the state of lo
479479

480480
![A diagram of the HTTP API pattern](./media/durable-functions-concepts/async-http-api.png)
481481

482-
Durable Functions provides **built-in support** for this pattern, simplifying or even removing the code you need to write to interact with long-running function executions. For example, the Durable Functions quickstart samples ([C#](durable-functions-create-first-csharp.md), [JavaScript](quickstart-js-vscode.md), [TypeScript](quickstart-ts-vscode.md), [Python](quickstart-python-vscode.md), [PowerShell](quickstart-powershell-vscode.md), and [Java](quickstart-java.md)) show a simple REST command that you can use to start new orchestrator function instances. After an instance starts, the extension exposes webhook HTTP APIs that query the orchestrator function status.
482+
Durable Functions provides **built-in support** for this pattern, simplifying or even removing the code you need to write to interact with long-running function executions. For example, the Durable Functions quickstart samples ([C#](durable-functions-isolated-create-first-csharp.md), [JavaScript](quickstart-js-vscode.md), [TypeScript](quickstart-ts-vscode.md), [Python](quickstart-python-vscode.md), [PowerShell](quickstart-powershell-vscode.md), and [Java](quickstart-java.md)) show a simple REST command that you can use to start new orchestrator function instances. After an instance starts, the extension exposes webhook HTTP APIs that query the orchestrator function status.
483483

484484
The following example shows REST commands that start an orchestrator and query its status. For clarity, some protocol details are omitted from the example.
485485

@@ -1501,7 +1501,7 @@ Durable Functions are billed the same as Azure Functions. For more information,
15011501

15021502
You can get started with Durable Functions in under 10 minutes by completing one of these language-specific quickstart tutorials:
15031503

1504-
* [C# using Visual Studio 2019](durable-functions-create-first-csharp.md)
1504+
* [C# using Visual Studio 2019](durable-functions-isolated-create-first-csharp.md)
15051505
* [JavaScript using Visual Studio Code](quickstart-js-vscode.md)
15061506
* [TypeScript using Visual Studio Code](quickstart-ts-vscode.md)
15071507
* [Python using Visual Studio Code](quickstart-python-vscode.md)

articles/azure-functions/durable/durable-functions-sequence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.custom: devx-track-js
1212

1313
# Function chaining in Durable Functions - Hello sequence sample
1414

15-
Function chaining refers to the pattern of executing a sequence of functions in a particular order. Often the output of one function needs to be applied to the input of another function. This article describes the chaining sequence that you create when you complete the Durable Functions quickstart ([C#](durable-functions-create-first-csharp.md), [JavaScript](quickstart-js-vscode.md), [TypeScript](quickstart-ts-vscode.md), [Python](quickstart-python-vscode.md), [PowerShell](quickstart-powershell-vscode.md), or [Java](quickstart-java.md)). For more information about Durable Functions, see [Durable Functions overview](durable-functions-overview.md).
15+
Function chaining refers to the pattern of executing a sequence of functions in a particular order. Often the output of one function needs to be applied to the input of another function. This article describes the chaining sequence that you create when you complete the Durable Functions quickstart ([C#](durable-functions-isolated-create-first-csharp.md), [JavaScript](quickstart-js-vscode.md), [TypeScript](quickstart-ts-vscode.md), [Python](quickstart-python-vscode.md), [PowerShell](quickstart-powershell-vscode.md), or [Java](quickstart-java.md)). For more information about Durable Functions, see [Durable Functions overview](durable-functions-overview.md).
1616

1717
[!INCLUDE [durable-functions-prerequisites](../../../includes/durable-functions-prerequisites.md)]
1818

articles/azure-functions/durable/durable-functions-types-features-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ In addition to triggering orchestrator or entity functions, the *durable client*
5757

5858
## Next steps
5959

60-
To get started, create your first durable function in [C#](durable-functions-create-first-csharp.md), [JavaScript](quickstart-js-vscode.md), [Python](quickstart-python-vscode.md), [PowerShell](quickstart-powershell-vscode.md), or [Java](quickstart-java.md).
60+
To get started, create your first durable function in [C#](durable-functions-isolated-create-first-csharp.md), [JavaScript](quickstart-js-vscode.md), [Python](quickstart-python-vscode.md), [PowerShell](quickstart-powershell-vscode.md), or [Java](quickstart-java.md).
6161

6262
> [!div class="nextstepaction"]
6363
> [Read more about Durable Functions orchestrations](durable-functions-orchestrations.md)

0 commit comments

Comments
 (0)