Interface WorkflowMail


  • public interface WorkflowMail
    A bean to provide easy access to mail related functionalities. Don't use this outside of a workflow. The bean will be accessible by using 'mail' in your workflow expressions.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> getEmailAddresses​(java.lang.String expression)
      Retrieves the email addresses from a comma separated string of user expressions.
      java.util.Set<java.lang.String> getEmailAddressesForUserNames​(java.lang.String userNames)
      Retrieves the email addresses from a comma separated string of usernames.
      java.lang.String getEmailAddressForUserName​(java.lang.String userName)
      Retrieves the primary email address for a single user, empty string if none found.
      void sendMails​(java.util.Collection<java.util.UUID> usersIds, java.lang.String template, java.lang.String section, org.flowable.engine.impl.persistence.entity.ExecutionEntity executionEntity)
      Sending mails from the workflow.
      void setNotificationEmail​(org.flowable.common.engine.api.variable.VariableContainer variableContainer, java.lang.String taskId, boolean enabled)
      Sets notification email sending to the given value for the given task id.
    • Method Detail

      • sendMails

        void sendMails​(java.util.Collection<java.util.UUID> usersIds,
                       java.lang.String template,
                       java.lang.String section,
                       org.flowable.engine.impl.persistence.entity.ExecutionEntity executionEntity)
        Sending mails from the workflow.
        Parameters:
        usersIds - ids of users that should receive the mail
        template - the name of the template that should be used to generate the mail
        section - the name of the section that should be used to generate the mail (optional), default is the current workflow's process id
        executionEntity - current execution entity
      • getEmailAddresses

        java.util.Set<java.lang.String> getEmailAddresses​(java.lang.String expression)
        Retrieves the email addresses from a comma separated string of user expressions.
        Parameters:
        expression - a comma separated list of user expressions.
        Returns:
        A set of email addresses for the users.
      • getEmailAddressesForUserNames

        java.util.Set<java.lang.String> getEmailAddressesForUserNames​(java.lang.String userNames)
        Retrieves the email addresses from a comma separated string of usernames.
        Parameters:
        userNames - a comma separated list of user names.
        Returns:
        A set of email addresses for the users.
      • getEmailAddressForUserName

        java.lang.String getEmailAddressForUserName​(java.lang.String userName)
        Retrieves the primary email address for a single user, empty string if none found.
        Parameters:
        userName - the username
        Returns:
        The default email address of the user.
      • setNotificationEmail

        void setNotificationEmail​(org.flowable.common.engine.api.variable.VariableContainer variableContainer,
                                  java.lang.String taskId,
                                  boolean enabled)
        Sets notification email sending to the given value for the given task id.
        Parameters:
        variableContainer - the current workflow variable container
        taskId - the id fo the user task to set the sending of notification email for
        enabled - true if notification mail sending should be true, false otherwise