File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -255,10 +255,14 @@ function Receive-CippOrchestrationTrigger {
255255 Write-Information " Durable Mode: $DurableMode "
256256
257257 $RetryOptions = New-DurableRetryOptions @DurableRetryOptions
258- if (! $OrchestratorInput.Batch -or ($OrchestratorInput.Batch | Measure-Object ).Count -eq 0 -and $OrchestratorInput.QueueFunction ) {
259- $Batch = (Invoke-ActivityFunction - FunctionName ' CIPPActivityFunction' - Input $OrchestratorInput.QueueFunction - ErrorAction Stop) | Where-Object { $null -ne $_.FunctionName }
260- } elseif ($OrchestratorInput.Batch ) {
258+
259+ $HasBatch = $OrchestratorInput.Batch -and @ ($OrchestratorInput.Batch ).Count -gt 0
260+ $HasQueueFunction = $null -ne $OrchestratorInput.QueueFunction -and $OrchestratorInput.QueueFunction -ne ' '
261+
262+ if ($HasBatch ) {
261263 $Batch = $OrchestratorInput.Batch | Where-Object { $null -ne $_.FunctionName }
264+ } elseif ($HasQueueFunction ) {
265+ $Batch = (Invoke-ActivityFunction - FunctionName ' CIPPActivityFunction' - Input $OrchestratorInput.QueueFunction - ErrorAction Stop) | Where-Object { $null -ne $_.FunctionName }
262266 } else {
263267 Write-Information ' No batch or queue function provided to orchestrator input'
264268 $Batch = @ ()
You can’t perform that action at this time.
0 commit comments