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. See the difference between the standalone SDK and the legacy built-in SDK along with [migration guide](durable-functions-powershell-v2-sdk-migration-guide.md).
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 recommended over the legacy SDK that is built into the Azure Functions PowerShell language worker. Going forward, the legacy SDK may not receive new features or bug fixes, and may eventually be removed from the worker. See [migration guide](./durable-functions-powershell-v2-sdk-migration-guide.md) for details on migrating to the standalone SDK.
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-powershell-v2-sdk-migration-guide.md
+33-18Lines changed: 33 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,8 @@ 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.
14
-
15
-
> [!NOTE]
16
-
> This package is currently in **preview.**
12
+
The Durable Functions (DF) PowerShell SDK is now available as 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.
17
14
18
15
## Motivation behind the standalone SDK
19
16
@@ -30,7 +27,7 @@ By creating a standalone DF PowerShell SDK package, we're able to overcome these
30
27
31
28
## Deprecation plan for the built-in DF PowerShell SDK
32
29
33
-
The built-in DF SDK in the PowerShell worker will remain available for PowerShell 7.4, 7.2, and prior releases.
30
+
The built-in DF SDK in the PowerShell worker will remain available for PowerShell 7.4 and prior releases.
34
31
35
32
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
33
@@ -44,7 +41,7 @@ The standalone PowerShell SDK requires the following minimum versions:
- Azure Functions PowerShell app for PowerShell 7.2 or greater
44
+
- Azure Functions PowerShell app for PowerShell 7.4 or greater
48
45
49
46
50
47
### Opt in to the standalone DF SDK
@@ -53,7 +50,7 @@ The following application setting is required to run the standalone PowerShell S
53
50
- Name: `ExternalDurablePowerShellSDK`
54
51
- Value: `"true"`
55
52
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.
53
+
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
54
58
55
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
56
@@ -113,13 +110,13 @@ Then you simply need to specify an entry for the DF SDK in your `requirements.ps
113
110
#
114
111
@{
115
112
# For latest supported version, go to 'https://www.powershellgallery.com/packages/AzureFunctions.PowerShell.Durable.SDK/'.
116
-
'AzureFunctions.PowerShell.Durable.SDK' = '1.*'
113
+
'AzureFunctions.PowerShell.Durable.SDK' = '2.*'
117
114
}
118
115
```
119
116
120
-
#### Installation option 2: Use custom modules
117
+
#### Installation option 2: Include the SDK module in your app content
121
118
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.
119
+
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
120
In summary, you'll need to place the SDK package inside a `".\Modules"` directory located at the root of your app.
124
121
125
122
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
162
163
+
### SDK reference
164
+
165
+
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.
166
+
167
+
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:
168
+
169
+
```powershell
170
+
Get-Help *-Durable*
171
+
```
172
+
173
+
In order to get detailed help on a specific cmdlet, including usage examples, run:
174
+
175
+
```powershell
176
+
Get-Help Invoke-DurableOrchestration -Full
177
+
```
178
+
166
179
### Migration guide
167
180
168
181
In this section, we describe the interface and behavioral changes you can expect when utilizing the new SDK.
169
182
170
-
#### New CmdLets
183
+
#### New cmdlets
171
184
172
-
*`Invoke-DurableSubOrchestrator -FunctionName <Name> -Input <Input>` is a new CmdLet that allows users to utilize suborchestrators in their workflows.
185
+
*`Invoke-DurableSubOrchestrator` is a new cmdlet that allows users to utilize suborchestrators in their workflows.
186
+
*`Suspend-DurableOrchestration` and `Resume-DurableOrchestration` are new cmdlets that allow users to suspend and resume orchestrations, respectively.
173
187
174
-
#### Modified CmdLets
188
+
#### Modified cmdlets
175
189
176
-
* The CmdLet `Get-DurableTaskResult -Task <task>` now only accepts a single Task as it's argument, instead of accepting a list of Tasks.
190
+
* The `Get-DurableTaskResult` cmdlet now only accepts a single Task as it's argument, instead of accepting a list of Tasks.
191
+
* The `New-DurableRetryOptions` cmdlet is renamed to `New-DurableRetryPolicy` (an alias for the old name is provided for backward compatibility).
177
192
178
193
#### Behavioral changes
179
194
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.
195
+
* 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
196
* 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
197
183
-
#### Where to get support, provide feedback, and suggest changes
198
+
###Get supportand provide feedbsck
184
199
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).
200
+
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 supported in the standalone SDK only: [`AzureFunctions.PowerShell.Durable.SDK`](https://www.powershellgallery.com/packages/AzureFunctions.PowerShell.Durable.SDK). See the difference between the standalone SDK and the legacy built-in SDK along with [migration guide](durable-functions-powershell-v2-sdk-migration-guide.md).
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
+
Add the following line to your `profile.ps1` file (typically, at the end of the 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 legacy 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