Triggering and Responding to Power Automate Flow steps in Business Process Flows

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody it's nick dolman here again and i just want to point out some stuff i learned this week on business process flows and i was working on a project uh similar to this but we wanted to add a business process flow to an application process in my particular customer they you know put in the application on a powerapps portal which created a record in dataverse and i have a model driven app where i'm managing that whole process now i'm not the biggest fan of business process flows but in this particular case i think it would work well for the staff to be able to go through this they have the application in here there's different steps verifying the date and then they have to verify the account maybe see if it already exists in the lookup now if it doesn't exist in lookup i wanted a process where they could create that account without having to navigate to a different thing in within the model driven app i could have done a quick create form but here i just thought it'd be cool now there's something in business process flows that has been around for a while is ability to run a workflow so let's take a quick look to see how we would set that up so i'm in the business process flow editor here and i'm going through my different steps and here we have our steps here what i can do is i can create this action step and i'm just going to drag that in let's just do that under here and then with this action step i need to pick a process now i can create a brand new workflow here but i have one i created earlier and it's just a very simple um classic workflow and we could or we could go in and create a brand new one so i'm here in the in the classic workflow editor i've it's triggering as an on-demand process and it's basically i'm creating an account based on the information that was in my application and then once i've done that i'm going to update the lookup with that particular account very simple classic workflow it is running synchronously that's something we can't do in power automate is run this uh not in the background but synchronously so that's why i chose a workflow in this particular case so back here in my business process flow editor i'm going to choose an action step so there was that workflow i created let's give it a name call this create account of course we have to hit that apply button something i seem to forget a lot of sometimes we've done that so this is great so we've we've now are able to update our business process flow and i'm in my steps i'm going to go create account and here i'm just going to execute that and that's processing that workflow and you'll saw that after a few seconds it was completed i have a little green check mark and i can continue on to the next stage if it's um there's not other fields required in the way i go in my business process flow now workflows are great but of course we want to take a look at power automate because with power automate there's a lot more things i could do i could create child records i could update other information or i could even integrate to other systems so i'm going to go here to this particular step and we have this flow step now it is in preview but what we can do on our components is we can drag over and create a flow preview step and from there we'd have to link that to a particular flow now i've created a flow earlier but what we would want to do here is let's just take a look at how we would create that specific flow that we would use within our business process flow so i'm going to create this within my solution of course i'm going to hit new let's choose a new flow there's a lot of things in that menu and that's going to launch power automate directly within my environment so we're going to need to choose a trigger so i'm going to choose the common data service it has not yet been renamed to dataverse but i am going to choose when a flow step is executed so that's the trigger that we want so we have that when flowstep is executed that's great we could add some inputs if we wanted i don't really want any inputs right now so as i'm going through this like in a workflow because we're triggered on a specific entity we know the record we're working on but in this case we're going to have to retrieve the record so normally what we do is we just go in with the common data service and get a record and we choose to get a record and here i actually want to find that application record i created i think it was competition applications now we have to determine the globally unique identifier and that's the identifier for the particular record so we're able to get that so immediately as i did that i am into my dynamic content and then from here we see when the flow step is executed being from the trigger we have a whole bunch of options so i can go and find the particular um entity record id i'm going to choose that and that's going to retrieve that the actual record from where i launched my flow from my business process flow so i've done that and then i can go through my next step and create a bunch of things and what i'm going to do is i'm going to create a new record in the common data service fill that in with some name and i can fill in some more information as i need it from that particular record of course i could do a whole bunch of different things here i could go through a loop i could talk to other systems but that's it so we wanna we have our flow created and that would be pretty cool so we're going to give this a name so black and back in my flow step i've done the same i dragged over that into my stage there and here i'm configuring this the properties window going to create the meat i'm going to now choose my flow and you'll see the flows have been created with that particular trigger create the power lifting me apply that and update my business process flow and we're going to be able to check that out so now i'm in the stage here i can run my flow and of course this is going to ask me a few other questions about running the flow talk about using that connection that's okay let's run that flow and then flow successfully started to monitor we can look at the flow runs page so let's just pop over and take a look at our flow runs so we're back here in our flow run our run history it ran 22 seconds ago it didn't take long took less than a minute and we've status has succeeded great so we can continue on with our business process flow so i'm here and i'm trying to go to my next stage but i'm getting a little explanation point it's still processing this flow is still processing i can't move to the next stage so there's something definitely missing here and how can we be able to make sure that flow is complete it's an asynchronous process we saw that it did run successfully but there's one thing that's a step that we need to add that it's not very well documented is the ability to update our business process flow with the status that this has completed properly so let's take a look at that so remember what we you know everything is stored in the dataverse so let's just add a new step and we're going to update a record this time so i'm going to choose the comma data service we're going to update a record here as our action the entity name now this is something that it's hard to find the documentation so we'll hope you find it here we're going to be looking for the process logs and the process logs table is what is actually storing information about our business process flow that's in progress now we're also going to have to identify the item id and now the item id is our the flows workflow log id so let's locate that or we can just do a search and here it is kink flows workflow log id i'm going to choose that and now we can set the status of that particular step in our stage so here we can choose canceled failed in progress succeeded waiting we want this to be succeeded so we've set that again i'm just going to save my flow here saving that step and now let's go back to our business process flow and see how this works out so now i mean here the finalize and if i were to run that flow again it's going to prompt me and this time i'm just going to hit done and one thing i have noticed is we are going to have to refresh our particular page and i'm just going to refresh the page and let's go back here this time we now see that we have the grill green check mark we have succeeded and we can move on to the next stage in our business process flow so anyways it's uh it's not all that intuitive but it's a little tip that i hope you'll help you help you out and by using flows and workflows and business process flows definitely makes it a lot more powerful a lot more usable and i think your end users are really gonna appreciate the process and the work you put in thanks a lot so for more training ideas and for more training courses please check out 365.training have a great day
Info
Channel: 365.Training
Views: 23,352
Rating: undefined out of 5
Keywords: Business Process Flows, Power Automate, Flow, Power Platform, Workflows, Dynamics 365
Id: RWanNSmv8FA
Channel Id: undefined
Length: 9min 3sec (543 seconds)
Published: Fri Dec 11 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.