Package com.collibra.dgc.workflow.api.bean

# 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

  Modifier and Type
  Method
  Description
  `Set<String>`
  `getEmailAddresses(String expression)`
  Retrieves the email addresses from a comma separated string of user expressions.
  `Set<String>`
  `getEmailAddressesForUserNames(String userNames)`
  Retrieves the email addresses from a comma separated string of usernames.
  `String`
  `getEmailAddressForUserName(String userName)`
  Retrieves the primary email address for a single user, empty string if none found.
  `void`
  `sendMails(Collection<UUID> usersIds, String template, 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, String taskId, boolean enabled)`
  Sets notification email sending to the given value for the given task id.

- ## Method Details

  - ### sendMails

    void sendMails(Collection<UUID> usersIds, String template, 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

    Set<String> getEmailAddresses(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

    Set<String> getEmailAddressesForUserNames(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

    String getEmailAddressForUserName(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, 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