Workflow: Remove Role from Activity Participants if Role is empty
Hi everyone, I have a “Setup CRB” activity. This activity edit has the ability to see the 10 different roles (purchasing, QA, Engineering Lead etc) that are the participants in the FOLLOWING activity which of course is the “CRB Review”. So during the “Setup CRB” activity, the assignee gets the tasks and looks at the participant members list. He/She will see all of the roles filled out (they are populated context roles) and then remove the various personnel not required for this CRB review. Now this works well enough BUT if a role is empty it then fails over and sends that task to the responsible role. This creates an issue. So here is the solution I’m thinking of using:
I am trying to build a snippet of code that I can place in the start transition of the “CRB Review” activity that will grab all of the participant roles, cycle through them and if they are empty, they will be simply be removed from the required participant list.
If this is too big of a code issue there is a plan B that would allow the CRB Review activity to be broken out into 10 different tasks with a code check that looks to see if a desired role is populated or not and if not, then simply route around the activity and skip it. I have the code to handle that.
Any thoughts? Thanks in advance!
Regards,

