cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Flow taking too long

Hi all Bit concerned about transitioning to flow. I have a batch process I run every night it uses fetchxml to grab an array of assets in dynamics field service. It then runs a workflow on all cases (incidents) via fetch that counts breakdowns in last x months and updates a field on the asset. It pulls around 1500 assets and goes for just under 2 minutes however lately may be once a month I have a failure when it breaches 2 minutes otherwise it works well. I have tested in sandbox with flow however can take approximately 15minutes to complete, basically it: 1. Reccuring schedule trigger 2. List Records with fetch for customer asset and gets customerassetid 3. Apply for each 4. List Records using fetch for incidents (cases) by dynamically passing customerassetid to fetch statement and filter on incident type and date. 5. Update Record by doing length on List Records. It works however is very slow compared to my batch / workflow method. Am I using a poor flow method to complete task? Thanks Antc
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Flow taking too long

@antc 

Go to the settings for each of your loops and turn on Concurrency control - this will allow the loops to run concurrently rather than sequentially.

 

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

6 REPLIES 6
Highlighted
Community Support
Community Support

Re: Flow taking too long

Hi @antc ,

 

Could you please share a screenshot of the configuration of your flow?

I suggest that you could add the filter query in the "Get items" action, it would take less time when run the flow.

The link below for the Filter query for your reference:

https://www.c-sharpcorner.com/article/apply-filter-query-with-get-items-sharepoint-action-in-microso...

https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/#:~:text=An%20OData%20filt....

 

Best regards,

Alice

Highlighted
Regular Visitor

Re: Flow taking too long

Hi Alice

 

Thanks for answering!

Basically in:

  • List assets is a fetch for certain assets ~ 1000 results
  • List cases is another fetch that gets passed the GUID and the returns those related cases that meet 1 of 3 conditions
  • Then the last action is update the asset with total cases per asset.

I don't think ODATA will help any more than my fetch as assets to cases is 1:M.


flow_1.JPG

 

Highlighted
Community Support
Community Support

Re: Flow taking too long

Hi @antc ,

 

Please move the List cases action outside the Apply to each, it would faster your flow.

1.png

 

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.

 

Highlighted
Regular Visitor

Re: Flow taking too long

I don't think I can as it needs to be in a loop as "List Assets" returns around 700 assets.

Highlighted
Super User III
Super User III

Re: Flow taking too long

@antc 

Go to the settings for each of your loops and turn on Concurrency control - this will allow the loops to run concurrently rather than sequentially.

 

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Highlighted
Regular Visitor

Re: Flow taking too long

@ScottShearer 

 

Fantastic solution went from 17 minutes to 1.2 minutes.

 

Any issues with setting parallelism t0 50 default seems to be 20?

 

Thanks Scott 😁

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (9,209)