Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
I have a need to send an email out to a list of selected roles. A user selects one or more values from a multivalued attribute on the change object. This get's read in and stored in an arraylist. I then have a method that takes a role and populates another role with the members of the fromRole.
This works great from the perspective that I can see that the team instance has been updated with the new people in the role, but when I add that role to the recipient of an email robot, the users are not emailed. If assign the role to an assigned activity, they do get the assigned activity.
Below is the method that I'm using to copy the participants from one role to another. Any idea why the email robot would work differently?
staticsetRoleParticipants(ObjectReference self, String toRole, String fromRole){
tryparticipants = team.getPrincipalTarget(from_role);
(participants.hasMoreElements()){TeamHelper.
service}
(WTException e) {e.printStackTrace();
}
}
Has anybody done anything similar to this, where the populate a role programatically during a workflow, and then use a Notification Robot, to email to that role?
The issue has been resolved. My development environment was the culprit (desperately in need of a refresh..) Moving the code to my validation environment, everything functioned as expected.
Thanks to those who replied.