Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Workflow getting stuck

varanyas024
Tera Contributor

The workflow is created for creating a group after 2 stage of approval then add users in that group. The change_manager role should be granted to them. But while assigning these role the flow is workong fine when 3 people are added but the worflow is getting timeout error when more than 3 is there.

 

1 REPLY 1

Brad Bowman
Mega Patron

You'll need to post screenshots of the flow and detailed activities, and post the script(s) using the insert code icon (</>).  It is best practice to assign a role to a group, not users.  When users are added as members of a group, they inherit the roles of that group, and when a new role is added to a group, each member inherits the role - both of these already happening out of box, so your workflow should not also be doing anything with roles.  Also, due to this out of box activity, it would be best if the workflow adds all of the users at once, not in an iteration, so that the business rule/script to inherit the group roles only runs once for all members, not once for each new member.