<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Send Email to a list of users with role as Admin in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/send-email-to-a-list-of-users-with-role-as-admin/m-p/40961#M17180</link>
    <description>&lt;P&gt;I have users who have a list of authorities defined in my SpringBoot application&lt;/P&gt;&lt;P&gt;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?&amp;nbsp; I have added my User class here as well&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public class User implements UserDetails, AuthenticatedPrincipal {

  @Id private String email;
  private String firstName;
  private String lastName;
  private String phone;
}&lt;/PRE&gt;&lt;PRE&gt;&amp;lt;sequenceFlow id="flow1" sourceRef="leaveRequest" targetRef="sendMail" /&amp;gt;
        &amp;lt;serviceTask id="sendMail" activiti:type="mail"&amp;gt;
            &amp;lt;extensionElements&amp;gt;
                &amp;lt;activiti:field name="from" stringValue="abc@gmail.com" /&amp;gt;
                &amp;lt;activiti:field name="to" expression="${emailId}" /&amp;gt;
                &amp;lt;activiti:field name="subject" expression="Leave request from ${name}" /&amp;gt;
                &amp;lt;activiti:field name="html"&amp;gt;
                    &amp;lt;activiti:expression&amp;gt;
                        &amp;lt;![CDATA[
                        &amp;lt;html&amp;gt;
                            &amp;lt;body&amp;gt;
                                Hello ${name}, is requesting for ${days} of leave.
                                &amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;
                                Kind regards,&amp;lt;br/&amp;gt;
                                TheCompany.
                            &amp;lt;/body&amp;gt;
                        &amp;lt;/html&amp;gt;
                        ]]&amp;gt;
                    &amp;lt;/activiti:expression&amp;gt;
                &amp;lt;/activiti:field&amp;gt;
            &amp;lt;/extensionElements&amp;gt;
        &amp;lt;/serviceTask&amp;gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 20 Mar 2024 11:53:18 GMT</pubDate>
    <dc:creator>Akruti</dc:creator>
    <dc:date>2024-03-20T11:53:18Z</dc:date>
    <item>
      <title>Send Email to a list of users with role as Admin</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/send-email-to-a-list-of-users-with-role-as-admin/m-p/40961#M17180</link>
      <description>&lt;P&gt;I have users who have a list of authorities defined in my SpringBoot application&lt;/P&gt;&lt;P&gt;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?&amp;nbsp; I have added my User class here as well&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public class User implements UserDetails, AuthenticatedPrincipal {

  @Id private String email;
  private String firstName;
  private String lastName;
  private String phone;
}&lt;/PRE&gt;&lt;PRE&gt;&amp;lt;sequenceFlow id="flow1" sourceRef="leaveRequest" targetRef="sendMail" /&amp;gt;
        &amp;lt;serviceTask id="sendMail" activiti:type="mail"&amp;gt;
            &amp;lt;extensionElements&amp;gt;
                &amp;lt;activiti:field name="from" stringValue="abc@gmail.com" /&amp;gt;
                &amp;lt;activiti:field name="to" expression="${emailId}" /&amp;gt;
                &amp;lt;activiti:field name="subject" expression="Leave request from ${name}" /&amp;gt;
                &amp;lt;activiti:field name="html"&amp;gt;
                    &amp;lt;activiti:expression&amp;gt;
                        &amp;lt;![CDATA[
                        &amp;lt;html&amp;gt;
                            &amp;lt;body&amp;gt;
                                Hello ${name}, is requesting for ${days} of leave.
                                &amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;
                                Kind regards,&amp;lt;br/&amp;gt;
                                TheCompany.
                            &amp;lt;/body&amp;gt;
                        &amp;lt;/html&amp;gt;
                        ]]&amp;gt;
                    &amp;lt;/activiti:expression&amp;gt;
                &amp;lt;/activiti:field&amp;gt;
            &amp;lt;/extensionElements&amp;gt;
        &amp;lt;/serviceTask&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Mar 2024 11:53:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/send-email-to-a-list-of-users-with-role-as-admin/m-p/40961#M17180</guid>
      <dc:creator>Akruti</dc:creator>
      <dc:date>2024-03-20T11:53:18Z</dc:date>
    </item>
  </channel>
</rss>

