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.
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.
You can also try (from a spring bean) groupService.getFunctionalGroup(groupId).getUsers().stream().map(user -> user.getEmail()).collect(Collectors.toList())
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.