Skip to content
demo of waiting for multiple approvals with durable functions
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Demo application to show waiting for multiple approvals in Durable Functions with timeout.

Submit an approval request

$approvalRequest = "{ approverCount: 5, requiredApprovals: 3, timeoutMinutes: 2 }"
$starterUri = "http://localhost:7071/api/RequestApproval"
$statusUris = Invoke-RestMethod -Method Post -Body $approvalRequest -Uri $starterUri

Request approval status

Invoke-RestMethod -Method Get -Uri $statusUris.statusQueryGetUri

Submit Approval

$submitUri = "http://localhost:7071/api/SubmitApproval/$($"
Invoke-RestMethod -Method Post -Uri $submitUri -Body '{ approved: true, approver: "approver 1" }'

Flows to test:

  • Timeout
  • Approved
  • Same approver submits more than one (their vote should only be counted once)
  • Race condition (we should not miss any votes) - should be fixed in v1.8.0
  • Approval rejected (also allows same user to send a reject after initally approving)
You can’t perform that action at this time.