Skip to Content

Microsoft AZ-204: What Azure Durable Function Types Should You Use to Manage an Online Ordering Process?

Learn about the Azure Durable Function types, including Orchestrator, Entity, Client, and Activity functions, and discover which ones to use when implementing an online ordering process that requires calling an external API for product discount information.

Table of Contents

Question

You are developing an Azure Durable Function to manage an online ordering process.
The process must call an external API to gather product discount information.
You need to implement the Azure Durable Function.
Which Azure Durable Function types should you use? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

A. Orchestrator
B. Entity
C. Client
D. Activity

Answer

To implement an Azure Durable Function for managing an online ordering process that calls an external API to gather product discount information, you should use the following Azure Durable Function types:

A. Orchestrator (1 point)
D. Activity (1 point)

Explanation

The Durable Functions extension exposes a set of built-in HTTP APIs that can be used to perform management tasks on orchestrations, entities, and task hubs.

These HTTP APIs are extensibility webhooks that are authorized by the Azure Functions host but handled directly by the Durable Functions extension.

Orchestrator functions are responsible for defining the workflow and coordinating the execution of other functions, such as Activity functions. In this scenario, the Orchestrator function would manage the overall online ordering process and call the appropriate Activity function to interact with the external API for gathering product discount information.

Activity functions are used to perform specific tasks or actions within the Durable Function workflow. They can execute long-running operations, such as calling external APIs or performing computations. In this case, an Activity function would be responsible for making the API call to retrieve the product discount information and returning the result to the Orchestrator function.

Client functions are used to start new instances of Orchestrator functions and interact with running instances, but they are not directly involved in the workflow execution. Therefore, Client functions are not necessary for this specific scenario.

Entity functions are used to manage and persist state across multiple function invocations. They are useful for scenarios that require maintaining and updating state, such as aggregating data or implementing a stateful workflow. However, in this case, the focus is on calling an external API to gather product discount information, which does not require persisting state across invocations. Therefore, Entity functions are not needed for this specific task.

In summary, to implement an Azure Durable Function for managing an online ordering process that calls an external API for product discount information, you should use an Orchestrator function to define the workflow and coordinate the execution, along with an Activity function to perform the API call and retrieve the discount information.

Microsoft AZ-204 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft AZ-204 exam and earn Microsoft AZ-204 certification.