0
0
Azurecloud~20 mins

Durable Functions orchestration patterns in Azure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Durable Functions Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
What happens when a Durable Function orchestration calls an activity function that fails?

Consider a Durable Function orchestration that calls an activity function which throws an exception. What is the default behavior of the orchestration?

AThe orchestration retries the activity function automatically based on the retry policy if configured; otherwise, it fails and stops.
BThe orchestration ignores the failure and continues executing the next activity functions.
CThe orchestration immediately restarts from the beginning without any retries.
DThe orchestration pauses indefinitely until manual intervention.
Attempts:
2 left
💡 Hint

Think about how Durable Functions handle errors and retries in activity functions.

Architecture
intermediate
2:00remaining
Which orchestration pattern is best for running multiple activity functions in parallel and waiting for all to complete?

You want to run several independent activity functions at the same time and proceed only after all have finished. Which Durable Functions orchestration pattern should you use?

AAsync HTTP APIs pattern
BFunction chaining pattern
CFan-out/fan-in pattern
DMonitor pattern
Attempts:
2 left
💡 Hint

Consider which pattern allows parallel execution and aggregation of results.

Configuration
advanced
2:00remaining
What is the correct way to implement a Durable Function that waits for an external event before continuing?

You want your orchestration to pause and wait until it receives a specific external event named 'ApprovalReceived'. Which code snippet correctly implements this behavior?

Azure
public static async Task RunOrchestrator([OrchestrationTrigger] IDurableOrchestrationContext context)
{
    // Wait for external event
    var approval = await context.WaitForExternalEvent<bool>("ApprovalReceived");
    if (approval)
    {
        await context.CallActivityAsync("ProcessApproval", null);
    }
    else
    {
        await context.CallActivityAsync("RejectApproval", null);
    }
}
Aawait context.WaitForExternalEvent<bool>();
Bawait context.WaitForExternalEvent("ApprovalReceived");
Cawait context.WaitForExternalEvent<int>("ApprovalReceived");
Dawait context.WaitForExternalEvent<bool>("ApprovalReceived");
Attempts:
2 left
💡 Hint

Check the method signature and required parameters for waiting on external events.

security
advanced
2:00remaining
How can you securely pass sensitive data to an activity function in Durable Functions?

You need to send a secret API key to an activity function without exposing it in logs or storage. What is the best practice to handle this?

AStore the secret in Azure Key Vault and retrieve it inside the activity function at runtime.
BHardcode the secret inside the activity function code.
CInclude the secret in the orchestration input JSON to keep it encrypted automatically.
DPass the secret as a parameter directly from the orchestration function to the activity function.
Attempts:
2 left
💡 Hint

Think about secure storage and minimizing exposure of secrets.

🧠 Conceptual
expert
3:00remaining
What is the main advantage of Durable Functions' 'function chaining' pattern compared to traditional sequential function calls?

Durable Functions support a 'function chaining' pattern where one function calls another in sequence. What key benefit does this pattern provide over normal sequential calls in serverless environments?

AIt executes all functions in parallel to reduce total execution time.
BIt preserves state and checkpoints progress between function calls, allowing reliable long-running workflows.
CIt automatically scales the number of function instances based on CPU usage.
DIt encrypts all data passed between functions by default.
Attempts:
2 left
💡 Hint

Consider how Durable Functions manage state and reliability in workflows.