Power AppsTutorial

How to deploy Durable Functions in Microsoft Power Platform

In this video, Lee Baker (Business Applications Technical Lead for MS) tells us about Durable Functions and how to deploy them in Microsoft Power Platform.

In this video, Lee Baker (Business Applications Technical Lead for MS) tells us about Durable Functions and how to deploy them in Microsoft Power Platform.

At 00:08, he defines Durable Functions as kind of a layer that is going to sit on top of Azure Functions that lets us do these kind of orchestration areas.

So, if we build ourselves an orchestration function that says, I work in financial services and I work for a bank so let’s think about bank account opening. What if we want to fill in a lot of fields on a form and we want to click a button. We want to go away and do a credit check, address checking or something else.

Then the orchestration part of Durable Functions lets us do that.

Durable Functions is an extension of Azure Functions that lets you write stateful functions in a serverless compute environment. The extension lets you define stateful workflows by writing orchestrator functions and stateful entities by writing entity functions using the Azure Functions programming model.

From 00:48, he tells us that in Durable Functions, other functions can easily be called both synchronously and asynchronously. Output from functions can then be saved to local variables and used later in the execution. This is one of the advantages of being in-code that there is complete way we can customize that. And because our functions are stateful, we can get to the Azure tables that are managing the state for our functions behind the scenes and query them if we need to.

At 02:00, Lee takes us to have a look on how easy the Durable Functions are to write actually in the code. He then takes us to the bottom of the coded page to ‘HttpStart’ function, where we can see how easy it is to set up an Azure Function here. We can see the get and the post methods.

We can also see it calling our account opening function which is our orchestrator, which is calling out and waiting on the different tasks from the different functions here. Then we have got all of our data back we’ve made our decision.

We can then go onto open the bank account or we can pass back what problems came back to be dealt with by another system. Here just in about 70-lines code, we have a fully working deployable Azure function.

From 03:05, he tells us how we can deploy or manage Functions.

These are really easy to build. Azure DevOps or whether it is different build processing tools, anything is going to deploy these without a problem and with very little configuration. If anyone is new to this sort of deployment, ALM SDLC processes, Azure Functions is a great place to start.

From 03:42, Lee mentions application insights. All of the functions have this is straight out of the box all our telemetry, all our login there and are ready to go. If we want an alert sent out when our function fails a hundred times in five minutes. Once we hit that, we can have those sorts of things built straight in.

At 04:02, he brings the Functions into the Platform and tells how can we get and call functions from the power platform. First of all, from the Common Data Service. There are few areas we can call them from there. Then we have Power Automate Flows and after that the Plugins. Plugins are part of the Common Data Service and just allow us to trigger bits of code on change of a few places.

The last one is JavaScript, which is the real getting to the front-end, making that user experience better and being able to empower things to be built quicker and deployed quicker from the actual app-side of things.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button