Skip to content

Commit 5746ea9

Browse files
committed
add InstanceId to Start-DurableOrchestration
1 parent 5fee443 commit 5746ea9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Modules/Microsoft.Azure.Functions.PowerShellWorker/Microsoft.Azure.Functions.PowerShellWorker.psm1

+10-2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ function Get-DurableStatus {
8080
The input value that will be passed to the orchestration Azure Function.
8181
.PARAMETER DurableClient
8282
The orchestration client object.
83+
.PARAMETER InstanceId
84+
The InstanceId for the new orchestration.
8385
#>
8486
function Start-DurableOrchestration {
8587
[CmdletBinding()]
@@ -98,7 +100,11 @@ function Start-DurableOrchestration {
98100

99101
[Parameter(
100102
ValueFromPipelineByPropertyName=$true)]
101-
[object] $DurableClient
103+
[object] $DurableClient,
104+
105+
[Parameter(
106+
ValueFromPipelineByPropertyName=$true)]
107+
[string] $InstanceId
102108
)
103109

104110
$ErrorActionPreference = 'Stop'
@@ -107,7 +113,9 @@ function Start-DurableOrchestration {
107113
$DurableClient = GetDurableClientFromModulePrivateData
108114
}
109115

110-
$InstanceId = (New-Guid).Guid
116+
if (-not $InstanceId) {
117+
$InstanceId = (New-Guid).Guid
118+
}
111119

112120
$Uri =
113121
if ($DurableClient.rpcBaseUrl) {

0 commit comments

Comments
 (0)