Error in flow designer

s_renjarnbo
Tera Expert

Hi

 

I am new to Flow Designer, so bear with me 🙂

 

I need to create a flow that loops through all Assignment Groups where "Assignment Group Manager" Active is false and update the record with the group managers manager (provided he is active) otherwise loop to next manager level

 

I have managed to get all the assignment groups in the flow but after that my flow gives an error.

 

Flow looks like this:

s_renjarnbo_0-1674727997346.png

 

And the error is this: 

s_renjarnbo_1-1674728042704.png

 

I have tried and tried to find a solution for this. I have even created a system property as suggested in some of the articles I have found, but to no avail.

 

Kindly help me or point me in a direction 🙂

 

Kind Regards

Søren Jarnbo

1 ACCEPTED SOLUTION

Okay, fair enough. 🙂

Here is an example on how I would do it (without the looping in multiple levels), ask if you need additional details.

flow-set-managers-manager-on-group.png

View solution in original post

7 REPLIES 7

Soeren Maucher
Mega Sage

Hello Søren,

 

in your error message, Flow Designer is telling you that the maximum iteration limit is exceeded (See screenshot): 

SoerenMaucher_0-1674740761338.png

So most likely your loop got somehow stuck in an infinite loop, which is why Flow Designer is canceling the execution after 1000 iterations. 
It looks like there is an issue with your condition in the "do the following until" flow logic, which is causing the loop to go on forever. If you send a more detailed screenshot of the condition, as well as the flow variable updates, I might be able to help further.

 

Greetings, 
Sören

 

 

 

 

 

 

Hi Soeren

 

Thanks for replying - much appreciated 🙂

 

I also had that thought myself (infinite) - just havent been able to figure out why.

 

Here is my "do" loop:

s_renjarnbo_0-1674743558285.png

 

.... and "check manager active"

s_renjarnbo_1-1674743599050.png

Flow variables are set before the "do" loop but after the "for each" loop

s_renjarnbo_2-1674743667016.png

 

Thanks in advance - hope it clarifies

OlaN
Giga Sage
Giga Sage

Hi,

Although I can understand the need to rearrange managers on groups whenever a person leaves (is set to inactive), but this kind of logic will also have a risk that all groups end up with the manager at the top of the tree.

And also, what should happen if any groups have a manager that already is at the top, ie CEO, and that CEO-person leaves, then there is no higher manager to move on to.

 

Instead I would suggest only to move one step up if that manager exists, and is active, otherwise it should generate a ticket to the sysadm/ServiceNow admin team, for a manual change of manager on that specific group.

Hi OlaN

 

Thanks for replying - much appreciated.

 

I completely agree to your points above and I might also introduce some kind of "limitations" on how far up the chain we want to go.

 

BUT that being said I wanted to initially get the flow to work. The group managers manager is active so the flow should only loop once and insert the new manager.