PL-100 Microsoft Power Platform App Maker – Business logic using flows Part 2

  1. 3. 47. Create Dataverse business process flows – Flows and Classic Flows

In the previous video, we had to look at business process flaws and we saw you can have stages that can contain things like data steps and you can have conditions that allow you to branch and when you want to branch back, use a connector. Let’s just see what else we can do with business process flaws. Well, we can cut, copy and paste and delete items. We can add new items like we saw right at the end. So I can click on a particular item, so I can say what item I want first and then click on it rather than drag it in. I can have snapshots, so you can zoom in or out to a particular size and then create a snapshot and then that downloads it as a graphic. Now, what else can we do apart from data steps? Well, we can also add flaws. So we’ve got either workflows or action steps.

So if I put in an action step, for instance, I can put it in between data step one and data step two. I can execute a process. Now, notice what it says. You can only use supported processes that match the stage entity. So how does a floor match entity? Well, it does if you have put it in as a classic workflow. So we can see here we got the classic workflow email me as this action step. Additionally, we could have a workflow happening at the end or at the beginning of a particular stage. So suppose I wanted this particular workflow to happen when I leave the stage. I can do that. And again, what can I use? Classic workflows. So just 1 can’t do this at the beginning of a first stage.

So I can’t say on stage entry at the beginning of a first stage, nor can I say stage exit at the last stage. These are transitions between two stages. And so when you enter the first stage, there is no transition. When you leave the last stage, there is no transition. If you want any of those, then you can add a workflow to the global workflow that you can see down here. So this workflow, the trigger isn’t the start of a stage or the end of a stage, it’s whether the process has been applied. So in other words, when the business process floor has been applied to the record, whether it has been abandoned or reactivated, maybe you’ve gone on to something else and then come back.

Well, that would be the process abandoned and then the process reactivated. Or you can have the process completed. And look what it says. You can only use Active OnDemand workflows created for the primary entity of this business process. So in this case, yet again, we’ve got access to the email me, we haven’t got access to anything that we haven’t created using the classic workflow. But wait, we have a floor step. So this is the new workflow, this is the power Automate. So let’s drag that in as a step here. So let’s say we want a floor. We got lots of flaws in here, so look at all of these different cloud floors. It has to be an instant. So it’s one of these three floor Twitter language account and send email. And what we’ve got access to is nothing. Look up no records, which doesn’t show anything. Why is this? Well, the additional thing that it has to be is part of a solution.

Now, we’re going to have a look at solutions in the next section. But basically, all I have to do, instead of going to my flaws and new floor, I go to solutions. I pick a solution, I’m going to pick the default solution and I create a new cloud floor from there. So if I do that, I will put in a floor button for mobile as the trigger and then I will put in notify. So nothing amazing here. So this is my text and I’m going to call this my solution Flow and save. That. So this is now what’s called a solution aware floor. So once it’s finished saving, which took quite a few seconds, I can now go back into my business process flow and I can select a floor. And there we have my solution floor, so I can run it now as part of this step.

So, in this video, we’ve had a look at how you could expand the process flow, the business process flow, by looking at Power Automate flaws, but equally looking at the classic flaws. So the classic flaws can be done during the transition of one stage to another. You can also have work flaws that can happen when you have a process applied, reactivated, abandoned and completed. And you can also add in floor steps for any Power Automate flaws that have been created with Agile solution aware.

  1. Practice Activity Number 13 – The Solution

So how did you get on not waived this practice activity. So I’m going to start off in Power Automate because well, why not? I’ll be going later to the Power Apps portal and I’m going to create a business Process Flow. So I’m going to call this device Business Process Flow and the table I’m going to be using is the the device table. So it might just take the computer a second or so to get to this page. So first of all I want to ask for the device name and the original purchase value. So in a stage we are going to have various data steps. So the first step is to ask for the device name and then the second step so I will add a new data step just there is going to be asking for the original purchase price. Now notice I haven’t pressed apply to any of these.

So if that happens it does not get saved. So make sure you do click every time the apply. So there’s a little exclamation mark next to it but that’s hardly sufficient to actually remind you. But what could remind you is that these just say data step as opposed to device name. Now we need a condition because the next thing is an if. So if something happens. So if the original purchase price is above $500 so it could be that we don’t really care what the current value is for smaller amounts. We just want to give it an arbitrary sum perhaps. So if this field which is the original purchase value is greater than so you can choose greater than or equal if you want 500 to be called bite as well, a value as opposed to a field of $500. So I’m going to call this condition is above $500.

Click Apply. So your changes haven’t been applied yet. So if it’s above $500 then I want to ask for the current value. So we will have a new stage here which has a data step and so I will ask for the current value. So let’s change this new stage name to Current value. Now. I also want to ask for date purchased. So we add another data step into here and ask for Date Purchased and click Apply. Now it’s important that the original purchase value is entered because then if not the computer won’t know whether it’s above $500. And it might be that it is but I just forgot to enter it.

So let’s make it required. I’ll click on the required there. Now if it’s not then I don’t want to know what the current value is, I just want the date purchase. So I’m going to add a new stage to the not and this data step is just going to have the date purchased and then finally we need to ask for the serial number and user. So I’m going to add another stage here and that’s going to ask for the serial number, make sure you click apply and a new data step.

Notice I’m just adding these data steps and stages in lots of different ways just to show you that you can. And we’re going to ask for user. However, we got a bit of a problem if the condition is above $500. So if the original purchase price is above, then we go down here. If not we go to this stage. But then we want to get to this stage and we’re not doing that. So we need to use a connector. So we click on where we want to connect from, click connect and where we’re going to. So let’s validate this. Let’s make sure I haven’t actually missed anything. So if I was just to add a data step and not enter it in, you’ll get a big error if validate is shown. So validation is fine. Let’s click save. After that we’ll click Activate so we could add lots of workflows action steps and floor steps if you so wish.

And then we need to test it. So we’ll go to the PowerApps portal, go to our app, so our user and devices, model driven app, our plate, go to devices and a new device and then we see right at the top we’ve got all of these various stages. So here’s my new device 45671 original purchase price or $600. It’s then taking me to the current value and date purchased. If it was only $400, then it would be taking me just to the date purchased. So I’m putting the date purchase and then we’ve got the final steps. So you can see why it’s important that it doesn’t just say new stage all the time in here. So really name them because that’s what the end user is going to see.

So I’ll add a serial number and status reason. So there’s a typo there that should say user. But again, this is why it’s important to just test everything. So I’ll look for a user. So I’ll just type in plan. So there am I. So while all of this has been going on, all of this is being filled in and then I can save. Now notice that I can’t actually save just from all of this because I have additional fields that should be added. So you always need to make sure that your business process flow does follow your table requirement. If I’ve said that the device type is required, then it should be included in your business process flow.

Well, I hope you enjoyed this practice activity where we got to grips with practicing our business process flow. So we’ve gone through PowerApps canvas, PowerApps model driven views, forms, dashboards, charts, sitemaps and we’ve also now just gone through power auto Mate. In the next section we will be looking at solutions where we can contain all of these. Please join me there.

 

 

img