cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dorinda
Super User
Super User

Cascading Flows one at a time

I have 6 flows that run on the same list at the same time.  This is causing Microsoft to throttle my site since it is running them at the same time.

 

Is there a way to run them one after the other.  

 

What they are doing is getting the Employees Supervisor then the Supervisors Manager then the Managers Sr Manager along up the food chain.  These are used for approval of performance evaluations.  I need to have the information prepopulated in the list so that I can trigger other things that happen outside of the flows.

 

Any direction would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

 

I tried to reproduce the use case in my personal tenant.

 

Created Evaluations list with following columns:

EvaluationsList.JPG

 

 

Flow created to update the manages:

Flow1.JPGFlow2.JPG 

 

 

 

Can you please check if this resolves the issue.

 

Please let me know how if this works for you.

View solution in original post

17 REPLIES 17
rsaikrishna
Community Champion
Community Champion

Can you provide more details of each flow?

If getting only hierarchy of users based on the item, did you try doing it in the same flow? 

Instead of creating separate flows, can you try using Parallel processing the flows to perform multiple branches? 

https://flow.microsoft.com/en-us/blog/parallel-actions/

Please provide additional details for further help.

The first one get the department and Job Title as well as set the SharePoint Title field with a compose of two fields

 

wf1.JPG

The next one and the next 4 get the manager of each of the previous managers.

wf2.JPG

So i have Approver 1-5 that will be responding to and approving the evaluations I would like the to not all run at the same time like i mentioned as it is killing my tenant.  Just dont know how to get them to run in a specific order or based on the previous field not being empty.  I also need to ensure that if the person changes manager or department the cascading management is updated as well.

 

Thank you for your help.

 

I highly recommend merging all the 5 flows into a single simple flow to improve the performance.

 

In the first flow, Get Item action - are you getting the same item which you have access from the trigger "When an item is created or modified" . You can find all the columns from the trigger. You do not need to call Get Item again.

1.JPG

 

I have few additional questions:

a. How are you handling approvals? I mean, on approval, are you updating any status field to check the level of the approvals.

b. In the 2nd screen shot shown, can share Update Item action screen shot by expanding.

 

Pls provide additional details.

Here is the updated item, I repeat this for every manager, but if i wait until the end i can update them all at once.

 

I am going to try this now.

wf3.JPG

Is this the right approach?

 

wf5.JPGwf6.JPG

 

wf7.JPG

 

 

So i tried this all in one and it doenst find the supervisor to lookup because the field hasnt populated yet.  Do i need to put a "wait" until it is populated?  Not sure how to fix this.

supervisor.JPG

 

I see Supervisor 2 times. You may need to delete one.

 

Can you give a try with Delay action with 2 secs? Pls, share the screen shot of the Run History of the flow by masking any sensitive data.

its actually onwf8.JPGce just the way the screen snip was taken sorry about that.

Hi,

 

I tried to reproduce the use case in my personal tenant.

 

Created Evaluations list with following columns:

EvaluationsList.JPG

 

 

Flow created to update the manages:

Flow1.JPGFlow2.JPG 

 

 

 

Can you please check if this resolves the issue.

 

Please let me know how if this works for you.

v-alzhan-msft
Community Support
Community Support

Hi @Dorinda ,

 

@rsaikrishna 's solution is perfect, please take a try to create the flow and please feel free to ask here if you have any problem.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

So this is almost working!! However, how does it handle if there i not 5 levels of manager?  It throws an error Resource not found.  Is there a way to tell it to ignore that?

Modified the flow to handle the issue.

 

Here is the updated flow:

 

In this flow, created 3 variables:

varManagerExists : This helps to check if the manager exists.

varManagers: This stores all managers in an array

varManager:  This stores the current manager.

 

Created a Do Until loop to thru the managers for all the users. 

 

EVFlow1.JPG

EVFlow2.JPG

 

Here is the expanded Do Until loop:

 

EVFlow3.JPG

EVFlow4.JPG

Here are the formulas for Manager fields:

Manager2 Claims: if(greaterOrEquals(length(variables('varManagers')),1),variables('varManagers')[1],'')
Manager3 Claims: if(greaterOrEquals(length(variables('varManagers')),2),variables('varManagers')[2],'')
Manager4 Claims: if(greaterOrEquals(length(variables('varManagers')),3),variables('varManagers')[3],'')

 

If you like the solution, please accept the solution.

 

Regards

So I am trying the Configure After Setting as this handles the error pretty well.  If i continue to have challenges I will do your solution.

 

I am going to mark the previous solution before the variables as the solution i used.  However, I may be back with additional questions.

 

Thank you so much for your help!  You saved me!

what type of VAR are you using for these.

 

And I have a weird issue where the Job Title and Department didnt complete even though the information is there for 92 people.

 

Any idea why?

Hi @Dorinda 

varManagerExists : This helps to check if the manager exists. - String ( you can use boolean also)

varManagers: This stores all managers in an array - Array

varManager:  This stores the current manager.  - String

 

Regards

any idea why the dept and job title didnt populate?

@Dorinda

In the flow execution result, is the Job and Dept showing up? If they are NOT, then, we need to see why it is not. Can you share the flow execute result if you cannot able to find it. 

 

If job and dept showing up but not setting the values in the list, then try setting these values into variables and place the variables into the list fields in the Update item.

 

Let me know if you need further help.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,385)