As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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())