Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is the main purpose of Durable Functions orchestration?
Durable Functions orchestration manages and coordinates long-running workflows in Azure Functions, allowing reliable execution of complex processes that can pause and resume without losing state.
Click to reveal answer
beginner
Explain the 'Function Chaining' pattern in Durable Functions.
Function Chaining runs functions one after another in a sequence. Each function waits for the previous one to finish before starting, like following steps in a recipe.
Click to reveal answer
intermediate
What does the 'Fan-out/Fan-in' pattern do in Durable Functions?
Fan-out/Fan-in runs many functions at the same time (fan-out) and then waits for all to finish before continuing (fan-in), similar to sending many letters and waiting for all replies.
Click to reveal answer
intermediate
Describe the 'Async HTTP APIs' pattern in Durable Functions.
Async HTTP APIs let clients start a long process and check back later for results. The orchestration runs in the background, so the client doesn’t have to wait.
Click to reveal answer
advanced
How does the 'Human Interaction' pattern work in Durable Functions?
Human Interaction pauses the workflow to wait for a human to provide input or approval before continuing, like waiting for a signature on a form.
Click to reveal answer
Which Durable Functions pattern runs tasks one after another in a fixed order?
AAsync HTTP APIs
BFunction Chaining
CFan-out/Fan-in
DHuman Interaction
✗ Incorrect
Function Chaining runs functions sequentially, one after the other.
What pattern should you use to run many tasks in parallel and then wait for all to complete?
AFunction Chaining
BHuman Interaction
CFan-out/Fan-in
DAsync HTTP APIs
✗ Incorrect
Fan-out/Fan-in runs tasks in parallel and waits for all to finish before continuing.
Which pattern allows a client to start a long process and check back later for the result?
AAsync HTTP APIs
BFunction Chaining
CFan-out/Fan-in
DHuman Interaction
✗ Incorrect
Async HTTP APIs let clients start processes asynchronously and poll for results.
In Durable Functions, how is human input handled in workflows?
AHuman Interaction
BFan-out/Fan-in
CAsync HTTP APIs
DFunction Chaining
✗ Incorrect
Human Interaction pattern pauses the workflow to wait for human input before continuing.
What is a key benefit of using Durable Functions orchestration?
AOnly works with HTTP triggers
BRuns only short tasks
CRequires manual state management
DManages state for long-running workflows
✗ Incorrect
Durable Functions automatically manages state for long-running workflows.
Describe the Fan-out/Fan-in pattern and give a real-life example.
Think about doing many things at once and then gathering all results.
You got /3 concepts.
Explain how Durable Functions handle human interaction in workflows.
Imagine waiting for a signature before continuing a process.
You got /3 concepts.
Practice
(1/5)
1. What is the main role of an orchestrator function in Azure Durable Functions?
easy
A. To perform the actual work like processing data
B. To coordinate and manage the workflow of multiple tasks
C. To store data permanently in the cloud
D. To send notifications to users
Solution
Step 1: Understand the function types in Durable Functions
Durable Functions use orchestrator functions to manage workflows and activity functions to perform tasks.
Step 2: Identify the role of the orchestrator function
The orchestrator function controls the order and timing of tasks but does not do the actual work itself.
Final Answer:
To coordinate and manage the workflow of multiple tasks -> Option B
Quick Check:
Orchestrator = workflow manager [OK]
Hint: Orchestrator controls flow; activity does the work [OK]
Common Mistakes:
Confusing orchestrator with activity function
Thinking orchestrator stores data
Assuming orchestrator sends notifications
2. Which of the following is the correct way to call an activity function named ProcessOrder from an orchestrator function in C#?
easy
A. await context.CallActivityAsync("ProcessOrder", orderId);
B. context.CallActivity("ProcessOrder", orderId);
C. await CallActivityAsync("ProcessOrder", orderId);
D. context.CallActivityAsync("ProcessOrder");
Solution
Step 1: Recall the syntax for calling activity functions
In Durable Functions, the orchestrator calls activities using await context.CallActivityAsync with the function name and input.
Step 2: Check each option for correctness
await context.CallActivityAsync("ProcessOrder", orderId); uses the correct method with await, context, function name, and input parameter.
Final Answer:
await context.CallActivityAsync("ProcessOrder", orderId); -> Option A
A. An array with results from TaskA and TaskB in order
B. A single result from TaskB only
C. An empty array
D. A promise object instead of results
Solution
Step 1: Analyze the code execution flow
The orchestrator calls TaskA and waits for its result, then calls TaskB and waits for its result, pushing both into the outputs array.
Step 2: Understand the return value
Since both calls are awaited, outputs will contain the results of TaskA and TaskB in order.
Final Answer:
An array with results from TaskA and TaskB in order -> Option A
Quick Check:
Awaited calls return results in array [OK]
Hint: Await each call to get results in order [OK]
Common Mistakes:
Assuming only last result is returned
Thinking outputs is empty without awaits
Confusing promise with resolved value
4. You wrote this orchestrator function in C#:
public async Task<string> RunOrchestrator(IDurableOrchestrationContext context)
{
var result = context.CallActivityAsync<string>("DoWork", null);
return result.Result;
}
What is the problem with this code?
medium
A. It calls the wrong method for activity
B. It correctly returns the activity result
C. It misses the await keyword causing a compile error
D. It blocks the orchestrator causing a deadlock
Solution
Step 1: Identify async call usage
The code calls CallActivityAsync but does not await it, instead accesses result.Result synchronously.
Step 2: Understand deadlock risk in orchestrators
Accessing Result blocks the thread and can cause deadlocks in async orchestrator functions.
Final Answer:
It blocks the orchestrator causing a deadlock -> Option D
Quick Check:
Use await, not .Result, to avoid deadlocks [OK]
Hint: Always await async calls in orchestrators [OK]
Common Mistakes:
Using .Result instead of await
Ignoring async method patterns
Assuming synchronous access works fine
5. You want to run three activity functions Task1, Task2, and Task3 in parallel and wait for all to finish before continuing. Which orchestrator pattern correctly achieves this in JavaScript Durable Functions?
hard
A. await context.callActivity('Task1');
await context.callActivity('Task2');
await context.callActivity('Task3');
Step 1: Understand parallel execution in JavaScript
To run tasks in parallel, start them without awaiting immediately, collect promises, then await all together.
Step 2: Analyze each option
const tasks = [
context.callActivity('Task1'),
context.callActivity('Task2'),
context.callActivity('Task3')
];
const results = await Promise.all(tasks); creates an array of promises and awaits them all with Promise.all, running tasks concurrently.
Final Answer:
Use Promise.all with array of activity calls for parallel execution -> Option C
Quick Check:
Parallel = start all, then await all [OK]
Hint: Use Promise.all to await multiple tasks in parallel [OK]