Process Flow - Durable Functions orchestration patterns
Start Orchestration
↓
Call Activity Function
↓
Wait for Activity Completion
↓
Decide Next Step
↓
Call Another
The orchestration starts, calls activity functions, waits for their results, decides next steps, and either continues or ends.
Execution Sample
Azure
1. Start orchestration
2. Call activity A
3. Wait for A to complete
4. If success, call activity B
5. End orchestration
This orchestration calls two activities in sequence, waiting for each to finish before continuing.
Process Table
Step
Action
Function Called
Status
Next Step
1
Start orchestration
Orchestrator
Running
Call activity A
2
Call activity
Activity A
Started
Wait for completion
3
Wait for completion
Activity A
Completed
Check result
4
Check result
Orchestrator
Success
Call activity B
5
Call activity
Activity B
Started
Wait for completion
6
Wait for completion
Activity B
Completed
End orchestration
7
End orchestration
Orchestrator
Completed
Stop
💡 Orchestration ends after all activities complete successfully.
Status Tracker
Variable
Start
After Step 3
After Step 6
Final
orchestrationStatus
Not started
Running
Running
Completed
activityAStatus
Not started
Completed
Completed
Completed
activityBStatus
Not started
Not started
Completed
Completed
Key Moments - 3 Insights
Why does the orchestration wait after calling an activity function?
Because Durable Functions orchestrator pauses until the activity function completes, ensuring reliable sequencing as shown in steps 2 and 3 of the execution_table.
What happens if an activity function fails?
The orchestration can catch the failure and decide next steps, but in this example, success is assumed at step 4 to continue calling the next activity.
Can orchestration call multiple activities in parallel?
Yes, but this example shows sequential calls. Parallel calls would involve starting multiple activities before waiting, changing the flow after step 2.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the orchestrationStatus after step 3?
ANot started
BRunning
CCompleted
DFailed
💡 Hint
Check the variable_tracker column 'After Step 3' for orchestrationStatus.
At which step does the orchestration decide to call activity B?
AStep 2
BStep 3
CStep 4
DStep 5
💡 Hint
Look at the 'Next Step' column in execution_table at step 4.
If activity A failed, how would the orchestration flow change?
AIt would handle failure and decide next steps
BIt would end immediately
CIt would call activity B anyway
DIt would restart activity A automatically
💡 Hint
Refer to key_moments about failure handling in orchestration.
Concept Snapshot
Durable Functions orchestrate workflows by calling activity functions.
They wait for each activity to complete before continuing.
Orchestrations can run activities sequentially or in parallel.
Failures can be caught and handled to control flow.
This ensures reliable, stateful serverless workflows.
Full Transcript
Durable Functions orchestration patterns involve starting an orchestration that calls activity functions. The orchestration waits for each activity to complete before deciding the next step. This can be sequential or parallel. The orchestration tracks status variables for each activity and itself. If an activity fails, the orchestration can catch the failure and decide how to proceed. This pattern ensures reliable and stateful workflows in serverless environments.