I have a complex workflow that updates a Nintex group to match the membership of a corresponding AD group.
It works most of the time, but it runs many steps and for 1 specific group, the workflow terminates, probably because it reaches some limit.
I was wondering if you can take a look and see if you can help me optimize this workflow so it won’t run into these problems.
Here is my workflow:
The inputs are the Name of AD Group & the Name of Nintex Group (which are often the same).
Action 1 - Get all the members of the AD group.
Action 2 - Get all the Nintex Groups in the tenant (because I don’t yet know a method to get a Nintex Group by name without looping through all the groups).
Action 3 - Get all the Nintex users in the tenant (because I don’t yet know a method to get a Nintex user by name without looping through all the users).
Action 4 - Loop through each Nintex Group.
Action 5 - If one Nintex Group name matches the group name we want, then run this next step:
Action 6 - Loop through each member of the AD group.
Action 7 - Set a Flag to False.
Action 8 - Loop for each Nintex user in tenant (until the Flag is set to true).
Action 9 - if that user in the AD group matches the Nintex user in the tenant, then run this next step:
Action 10 - We found the user, so set the Flag, so that we can exit the loop above when done processing this user.
Action 11 - Set another Flag for this next loop.
Action 12 - Loop for each member of the Nintex group.
Action 13 - Get the Nintex user, using the ID found previously, so that I can get the email address for the next step.
Action 14 - Set the Flag so we can exit the loop.
Action 15 - If we did not find that the user was a member of the Nintex group, run the next step.
Action 16 - Add user into Nintex group.
That completes all the loops. The error happens when it runs through the “Loop through each user in the tenant” (Action and continues to loop and perform “Branch by condition if user found in users_all” dozens of times until it terminates for an unspecified reason.
Any suggestions?