You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> This change applies only to the standalone [Durable Functions PowerShell SDK](https://www.powershellgallery.com/packages/AzureFunctions.PowerShell.Durable.SDK), which is currently [in preview](durable-functions-powershell-v2-sdk-migration-guide.md).
779
+
> This feature is available in the standalone [Durable Functions PowerShell SDK](https://www.powershellgallery.com/packages/AzureFunctions.PowerShell.Durable.SDK) only. If you are not using it yet, see the [migration guide](durable-functions-powershell-v2-sdk-migration-guide.md) for usage instructions.
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-packages.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ ms.reviewer: azfuncdf
20
20
21
21
**Storage providers packages**:
22
22
23
-
By default, Durable Functions uses Azure Storage as it's backing store. However, alternative [storage providers](./durable-functions-storage-providers.md) are available as well. To use them, you need to reference their packages _in addition to_ the WebJobs extension in your `.csproj`. Those packages are:
23
+
By default, Durable Functions uses Azure Storage as its backing store. However, alternative [storage providers](./durable-functions-storage-providers.md) are available as well. To use them, you need to reference their packages _in addition to_ the WebJobs extension in your `.csproj`. Those packages are:
24
24
25
25
* The Netherite storage provider: [Microsoft.Azure.DurableTask.Netherite.AzureFunctions](https://www.nuget.org/packages/Microsoft.Azure.DurableTask.Netherite.AzureFunctions).
26
26
* The MSSQL storage provider: [Microsoft.DurableTask.SqlServer.AzureFunctions](https://www.nuget.org/packages/Microsoft.DurableTask.SqlServer.AzureFunctions)
@@ -52,10 +52,10 @@ Users of [Extension Bundles](../extension-bundles.md) (the recommended Azure Fun
52
52
* Node (JavaScript / TypeScript): The [durable-functions](https://www.npmjs.com/package/durable-functions) npm package.
53
53
* Python: The [azure-functions-durable](https://pypi.org/project/azure-functions-durable/) PyPI package.
54
54
* Java: The [durabletask-azure-functions](https://mvnrepository.com/artifact/com.microsoft/durabletask-azure-functions) Maven package.
55
-
* PowerShell: The current GA SDK is built in to Azure Functions PowerShell language worker, so no installation is needed. See the following _note_ for details.
55
+
* PowerShell: The [AzureFunctions.PowerShell.Durable.SDK](https://www.powershellgallery.com/packages/AzureFunctions.PowerShell.Durable.SDK) module.
56
56
57
57
> [!NOTE]
58
-
> For PowerShell users: we have a [_preview_ SDK standalone package](./durable-functions-powershell-v2-sdk-migration-guide.md) under [AzureFunctions.PowerShell.Durable.SDK](https://www.powershellgallery.com/packages/AzureFunctions.PowerShell.Durable.SDK)in the PowerShell gallery. The latter will be preferred in the future.
58
+
> For PowerShell users: the standalone [AzureFunctions.PowerShell.Durable.SDK](https://www.powershellgallery.com/packages/AzureFunctions.PowerShell.Durable.SDK)module is now generally available (GA) and is the recommended approach. See the [migration guide](./durable-functions-powershell-v2-sdk-migration-guide.md) for details. The legacy SDK is also built into the Azure Functions PowerShell language worker for backward compatibility, but it will not receive new features or bug fixes, and it will be eventually removed from the worker.
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-powershell-v2-sdk-migration-guide.md
+34-16Lines changed: 34 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ ms.reviewer: azfuncdf
9
9
10
10
# Guide to the standalone Durable Functions PowerShell SDK
11
11
12
-
The Durable Functions (DF) PowerShell SDK is now available, _in preview_, as a standalone package in the PowerShell Gallery: [`AzureFunctions.PowerShell.Durable.SDK`](https://www.powershellgallery.com/packages/AzureFunctions.PowerShell.Durable.SDK).
13
-
Once this SDK package is GA, it will be the recommended means of authoring Durable Functions apps with PowerShell. In this article, we explain the benefits of this change, and what changes you can expect when adopting this new package.
12
+
The Durable Functions (DF) PowerShell SDK is now availableas a standalone module in the PowerShell Gallery: [`AzureFunctions.PowerShell.Durable.SDK`](https://www.powershellgallery.com/packages/AzureFunctions.PowerShell.Durable.SDK).
13
+
This SDK is now generally available (GA) and is the recommended approach for authoring Durable Functions apps with PowerShell. In this article, we explain the benefits of this change, and what changes you can expect when adopting this new package.
14
14
15
15
> [!NOTE]
16
-
> This package is currently in **preview.**
16
+
> This package is now **generally available (GA)**.
17
17
18
18
## Motivation behind the standalone SDK
19
19
@@ -30,7 +30,7 @@ By creating a standalone DF PowerShell SDK package, we're able to overcome these
30
30
31
31
## Deprecation plan for the built-in DF PowerShell SDK
32
32
33
-
The built-in DF SDK in the PowerShell worker will remain available for PowerShell 7.4, 7.2, and prior releases.
33
+
The built-in DF SDK in the PowerShell worker will remain available for PowerShell 7.4 and prior releases.
34
34
35
35
We plan to eventually release a new **major** version of the PowerShell worker without the built-in SDK. At that point, users would need to install the SDK separately using this standalone package; the installation steps are described below.
36
36
@@ -44,7 +44,7 @@ The standalone PowerShell SDK requires the following minimum versions:
- Azure Functions PowerShell app for PowerShell 7.2 or greater
47
+
- Azure Functions PowerShell app for PowerShell 7.4 or greater
48
48
49
49
50
50
### Opt in to the standalone DF SDK
@@ -53,7 +53,7 @@ The following application setting is required to run the standalone PowerShell S
53
53
- Name: `ExternalDurablePowerShellSDK`
54
54
- Value: `"true"`
55
55
56
-
This application setting will disable the built-in Durable SDK for PowerShell versions 7.2 and above, forcing the worker to use the external SDK.
56
+
This application setting will disable the built-in Durable SDK for PowerShell versions 7.4 and above, forcing the worker to use the external SDK.
57
57
58
58
If you're running locally using [Azure Functions Core Tools](../functions-run-local.md), you should add this setting to your `local.settings.json` file. If you're running in Azure, follow these steps with the tool of your choice:
59
59
@@ -113,13 +113,13 @@ Then you simply need to specify an entry for the DF SDK in your `requirements.ps
113
113
#
114
114
@{
115
115
# For latest supported version, go to 'https://www.powershellgallery.com/packages/AzureFunctions.PowerShell.Durable.SDK/'.
116
-
'AzureFunctions.PowerShell.Durable.SDK' = '1.*'
116
+
'AzureFunctions.PowerShell.Durable.SDK' = '2.*'
117
117
}
118
118
```
119
119
120
-
#### Installation option 2: Use custom modules
120
+
#### Installation option 2: Include the SDK module in your app content
121
121
122
-
To install the standalone DF SDK as a custom module, you need to follow the [guidance regarding including modules in app content](./../functions-reference-powershell.md#including-modules-in-app-content). Make sure to review the aforementioned docs for details.
122
+
To include the standalone DF SDK in your app content, you need to follow the [guidance regarding including modules in app content](./../functions-reference-powershell.md#including-modules-in-app-content). Make sure to review the aforementioned docs for details.
123
123
In summary, you'll need to place the SDK package inside a `".\Modules"` directory located at the root of your app.
124
124
125
125
For example, from within your application's root, and after creating a `".\Modules"` directory, you may download the standalone SDK into the modules directory as such:
These are all the steps needed to utilize the next PowerShell SDK. Run your app as normal, via `func host start` in your terminal to start using the SDK.
165
165
166
+
### SDK reference
167
+
168
+
See [AzureFunctions.PowerShell.Durable.SDK Module](https://github.com/Azure/azure-functions-durable-powershell/blob/main/src/Help/AzureFunctions.PowerShell.Durable.SDK.md) for the complete reference of the SDK cmdlets and their parameters.
169
+
170
+
You can also use the `Get-Help` cmdlet to get detailed descriptions of the SDK cmdlets. In order to do this, you need to import the module first, as shown in the previous section. After that, you can run the following command to get the entire list of cmdlets:
171
+
172
+
```powershell
173
+
Get-Help *-Durable*
174
+
```
175
+
176
+
In order to get detailed help on a specific cmdlet, including usage examples, run:
177
+
178
+
```powershell
179
+
Get-Help Invoke-DurableOrchestration -Full
180
+
```
181
+
166
182
### Migration guide
167
183
168
184
In this section, we describe the interface and behavioral changes you can expect when utilizing the new SDK.
169
185
170
-
#### New CmdLets
186
+
#### New cmdlets
171
187
172
-
*`Invoke-DurableSubOrchestrator -FunctionName <Name> -Input <Input>` is a new CmdLet that allows users to utilize suborchestrators in their workflows.
188
+
*`Invoke-DurableSubOrchestrator` is a new cmdlet that allows users to utilize suborchestrators in their workflows.
189
+
*`Suspend-DurableOrchestration` and `Resume-DurableOrchestration` are new cmdlets that allow users to suspend and resume orchestrations, respectively.
173
190
174
-
#### Modified CmdLets
191
+
#### Modified cmdlets
175
192
176
-
* The CmdLet `Get-DurableTaskResult -Task <task>` now only accepts a single Task as it's argument, instead of accepting a list of Tasks.
193
+
* The cmdlet `Get-DurableTaskResult` now only accepts a single Task as it's argument, instead of accepting a list of Tasks.
194
+
* The `New-DurableRetryOptions` cmdlet is renamed to `New-DurableRetryPolicy` (an alias for the old cmdlet is provided for backward compatibility).
177
195
178
196
#### Behavioral changes
179
197
180
-
* Exceptions thrown by activities scheduled with `Wait-DurableTask` (as in the Fan-Out/Fan-In pattern) are no longer silently ignored. Instead, on an exception, the CmdLet propagates that exception to the orchestrator so that it may be handled by user-code.
198
+
* Exceptions thrown by activities scheduled with `Wait-DurableTask` (as in the Fan-Out/Fan-In pattern) are no longer silently ignored. Instead, on an exception, the cmdlet propagates that exception to the orchestrator so that it may be handled by user-code.
181
199
* Null values are no longer dropped from the result list of a `Wait-DurableTask` (i.e., WhenAll) invocation. This means that a successful invocation of `Wait-DurableTask` without the `-Any` flag should return an array of the same size as the number of tasks it scheduled.
182
200
183
-
####Where to get support, provide feedback, and suggest changes
201
+
### Where to get support, provide feedback, and suggest changes
184
202
185
-
During the preview phase of this release, the standalone SDK may introduce a few more changes. These changes can be influenced by the community so report any feedback and suggestions to the SDK's [_new GitHub repo_](https://github.com/Azure/azure-functions-durable-powershell).
203
+
Please report any feedback and suggestions to the SDK's [_GitHub repo_](https://github.com/Azure/azure-functions-durable-powershell).
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-sub-orchestrations.md
+50-2Lines changed: 50 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,8 @@ An orchestrator function can call another orchestrator function using the *"call
16
16
Sub-orchestrator functions behave just like activity functions from the caller's perspective. They can return a value and throw an exception as the parent orchestrator function anticipates them.
17
17
18
18
> [!NOTE]
19
-
> Sub-orchestrations aren't yet supported in PowerShell.
20
-
19
+
> In PowerShell, sub-orchestrations are currently supported in the [standalone Durable Functions PowerShell SDK](durable-functions-powershell-v2-sdk-migration-guide.md) only.
This orchestrator function can be used as-is for one-off device provisioning or it can be part of a larger orchestration. In the latter case, the parent orchestrator function can schedule instances of `DeviceProvisioningOrchestration` using the *"call-sub-orchestrator"* API.
@@ -296,6 +319,31 @@ public void provisionNewDevices(
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/quickstart-powershell-vscode.md
+28-5Lines changed: 28 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,21 +56,42 @@ Visual Studio Code installs Azure Functions Core Tools if it's required to creat
56
56
57
57
A *package.json* file is also created in the root folder.
58
58
59
-
### Configure the function app to use PowerShell 7
59
+
### Configure the function app to use PowerShell 7.4 and the standalone Durable Functions SDK
60
60
61
-
Open the *local.settings.json* file and confirm that a setting named `FUNCTIONS_WORKER_RUNTIME_VERSION` is set to `~7`. If it's missing or if it's set to another value, update the contents of the file.
61
+
Open the *local.settings.json* file and confirm that a setting named `FUNCTIONS_WORKER_RUNTIME_VERSION` is set to `7.4` and a setting named `ExternalDurablePowerShellSDK` is set to `true`. If they are missing or if they are set to other values, update the contents of the file.
62
62
63
63
```json
64
64
{
65
65
"IsEncrypted": false,
66
66
"Values": {
67
67
"AzureWebJobsStorage": "",
68
68
"FUNCTIONS_WORKER_RUNTIME": "powershell",
69
-
"FUNCTIONS_WORKER_RUNTIME_VERSION" : "~7"
69
+
"FUNCTIONS_WORKER_RUNTIME_VERSION" : "7.4",
70
+
"ExternalDurablePowerShellSDK": "true"
70
71
}
71
72
}
72
73
```
73
74
75
+
Next, specify an entry for the DF SDK in your `requirements.psd1` file, as in the example below:
76
+
77
+
```PowerShell
78
+
# This file enables modules to be automatically managed by the Functions service.
79
+
# See https://aka.ms/functionsmanageddependency for additional information.
80
+
#
81
+
@{
82
+
# For latest supported version, go to 'https://www.powershellgallery.com/packages/AzureFunctions.PowerShell.Durable.SDK/'.
83
+
'AzureFunctions.PowerShell.Durable.SDK' = '2.*'
84
+
}
85
+
```
86
+
87
+
Make sure you use the latest version of the [AzureFunctions.PowerShell.Durable.SDK](https://www.powershellgallery.com/packages/AzureFunctions.PowerShell.Durable.SDK) module. The `2.*` version specifier ensures you get the latest stable 2.x version.
88
+
89
+
Append the following line to the end of your `profile.ps1` file:
The most basic Durable Functions app has three functions:
@@ -127,8 +148,8 @@ You added an HTTP-triggered function that starts an orchestration. Open *HttpSta
127
148
128
149
You now have a Durable Functions app that you can run locally and deploy to Azure.
129
150
130
-
> [!NOTE]
131
-
> The next version of the Durable Functions PowerShell application is now in preview. You can download it from the PowerShell Gallery. Learn more about it and learn how to try it out in the [guide to the standalone PowerShell SDK](./durable-functions-powershell-v2-sdk-migration-guide.md). You can follow the guide's [installation section](./durable-functions-powershell-v2-sdk-migration-guide.md#install-and-enable-the-sdk) for instructions that are compatible with this quickstart to enable it.
151
+
> [!TIP]
152
+
> This quickstart uses the standalone Durable Functions PowerShell SDK, which is now generally available and provides the best performance and latest features. For more information about the SDK and migration from the built-in version, see the [standalone PowerShell SDKguide](./durable-functions-powershell-v2-sdk-migration-guide.md).
132
153
133
154
## Test the function locally
134
155
@@ -194,6 +215,8 @@ After you verify that the function runs correctly on your local computer, it's t
194
215
195
216
## Test your function in Azure
196
217
218
+
1. Make sure the app setting named `ExternalDurablePowerShellSDK` is set to `true`.
219
+
197
220
1. Copy the URL of the HTTP trigger from the output panel. The URL that calls your HTTP-triggered function should be in this format:
0 commit comments