07-17-2019 04:24 PM
I am building out a workflow where the user can select multiple groups of people for a later Mail Task process. I need to convert the Group of People to a collection of email addresses and preferably via a Script Task listener in either javascript or groovy.
Does anyone have any pointers on how to do this?
Thanks,
Colin.
07-18-2019 09:11 AM
So I see I should use a REST call to the APS REST services, like
activiti-app/api/enterprise/groups/<group id>/users
And this will give me the list of users. In the Response Mapping I can do things like data[0].email and place into a variable. Is there a way to pull all data[X].email into a variable/array or can this be done via a Groovy script?
Thanks.
07-19-2019 06:07 AM
You can also try (from a spring bean) groupService.getFunctionalGroup(groupId).getUsers().stream().map(user -> user.getEmail()).collect(Collectors.toList())
Explore our Alfresco products with the links below. Use labels to filter content by product module.