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 TypeMethodDescriptiongetEmailAddresses
(String expression) Retrieves the email addresses from a comma separated string of user expressions.getEmailAddressesForUserNames
(String userNames) Retrieves the email addresses from a comma separated string of usernames.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 mailtemplate
- the name of the template that should be used to generate the mailsection
- the name of the section that should be used to generate the mail (optional), default is the current workflow's process idexecutionEntity
- current execution entity
-
getEmailAddresses
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
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
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 containertaskId
- the id fo the user task to set the sending of notification email forenabled
-true
if notification mail sending should be true,false
otherwise
-