💡 Learn more : Azure Functions Documentation.
Durable Functions addresses the task of managing state for an application. They are intended to address a variety of patterns and scenarios that would quickly get complicated using triggers, timers, etc. especially when orchestrating a range of activities with a set of tasks that need to happen each time a particular event occurs.
Here is one example: I have one task, that causes another task to occur, and so on with some conditional statements and other business logic to fork the workflow but I’m trying to go from point a to point b. An example of this is called Function chaining. This refers to the pattern of executing a sequence of functions in a particular order.
Head over to our docs for more info or follow along with this tutorial and it might make sense.
Log into the Azure Portal and create a new Azure Function project like the following:
Configure the function app to use the 2.0 runtime version in the Function app settings tab.
Create a new custom function.
Search for the Durable Functions Http Starter - C# template.
Install the extention when prompted.
Give the orchestration client function a name HttpStart that is created by selecting Durable Functions Http Starter - C# template.
Once this is complete, then copy the URL as we'll use it later on.
Create a new orchestration function named HelloSequence and select Durable Functions Orchestrator template.
Create another function named Hello and use the Durable Functions Activity template.
Install Postman, and create a POST request and use the following URL (after suppling the new Azure Function Name) :
You should see the following:
Click on one of the statusQueryGetUri URLs and you see the status of the Durable Function :