forLoop action in workflow taking huge time


Badge +2

All these days for loop action in a workflow was working smoothly, all of a sudden the for loop action is taking huge time and often hanging forcing to cancel the workflow or its going in infinite loop, how to control this behavior.

below is the screenshot of my workflow


3 replies

Badge +9

Hi Altaf Hussain‌,

Its surely depends on the query list action result collection, how many items you are trying to retrieving. And also can show what you are doing with multiple collection operations using run parallel actions.

My suggestion is try to minimize your result set by using suitable filter conditions in query list action. And instead of multiple collection operations use single query list operation to get all the required fields and do your build string, math operations.

Thanks,

Userlevel 5
Badge +14

what's exactly in your meaning 'slow'? can you quantify that? isn't it just matter of safe looping?

have you identified which action within the loop causes the delay?

Badge +2

Its not the query or the loop (though in the statistics it was looping continuously) the root cause was the collection operation where in I was trying to add array data to a txtvariable which i am assuming causing the issue, after troubleshooting step by step instead of using add i should have populated the variable with get option which solved the problem in this case.

There is no safe loop option available in Nintex Adminstration for Sharepoint 2016.

Reply