One of the most advanced extensions to the Azure Functions are durable functions. A durable function is a technique to implement stateful functions inside a serverless computing environment. There are additional concepts for state management, checkpoints, and restarts provided by this durable extension. What we get from this kind of function is a stateful workflow, and there will be a driver that acts as the orchestrator to call other functions, as shown in the following diagram:
When it has finished calling other functions, both in synchronous or asynchronous ways, the orchestrator function will be allowed to save states as local variables. There is also a checkpointing technique to continue/resume the orchestrator's states when the calling process has to start over, or the virtual machine running this orchestrator function gets rebooted.