Send Email to a list of users with role as Admin

Showing results for 
Search instead for 
Did you mean: 
Member II

Send Email to a list of users with role as Admin

I have users who have a list of authorities defined in my SpringBoot application

I have the flow given below, here instead of sending it to a particular email, I want to send it all admin users with the role as "ROLE_ADMIN.. is that possible through activiti?  I have added my User class here as well 

public class User implements UserDetails, AuthenticatedPrincipal {

  @Id private String email;
  private String firstName;
  private String lastName;
  private String phone;
<sequenceFlow id="flow1" sourceRef="leaveRequest" targetRef="sendMail" />
        <serviceTask id="sendMail" activiti:type="mail">
                <activiti:field name="from" stringValue="" />
                <activiti:field name="to" expression="${emailId}" />
                <activiti:field name="subject" expression="Leave request from ${name}" />
                <activiti:field name="html">
                                Hello ${name}, is requesting for ${days} of leave.
                                Kind regards,<br/>