Class MailActivityBehavior
- java.lang.Object
-
- org.flowable.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
-
- org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
-
- org.flowable.engine.impl.bpmn.behavior.MailActivityBehavior
-
- All Implemented Interfaces:
Serializable,ActivityBehavior,TriggerableActivityBehavior
public class MailActivityBehavior extends AbstractBpmnActivityBehavior
- Author:
- Joram Barrez, Frederik Heremans, Tim Stephenson, Filip Hrisafov
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMailActivityBehavior.ContentItemDataSourceWrapper
-
Field Summary
Fields Modifier and Type Field Description protected Expressionattachmentsprotected Expressionbccprotected Expressionccprotected Expressioncharsetprotected ExpressionexceptionVariableNameprotected Expressionfromprotected Expressionheadersprotected Expressionhtmlprotected ExpressionhtmlVarprotected ExpressionignoreExceptionprotected Expressionsubjectprotected Expressiontextprotected ExpressiontextVarprotected Expressionto-
Fields inherited from class org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
multiInstanceActivityBehavior
-
Fields inherited from class org.flowable.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
bpmnActivityBehavior
-
-
Constructor Summary
Constructors Constructor Description MailActivityBehavior()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddBcc(org.apache.commons.mail.Email email, Collection<String> bcc, String tenantId)protected voidaddCc(org.apache.commons.mail.Email email, Collection<String> cc, String tenantId)protected voidaddExpressionValueToAttachments(Object value, List<File> files, List<DataSource> dataSources)protected voidaddHeader(org.apache.commons.mail.Email email, String headersStr)protected voidaddTo(org.apache.commons.mail.Email email, Collection<String> to, String tenantId)protected voidattach(org.apache.commons.mail.Email email, List<File> files, List<DataSource> dataSources)protected org.apache.commons.mail.EmailcreateEmail(String text, String html, boolean attachmentsExist)protected org.apache.commons.mail.HtmlEmailcreateHtmlEmail(String text, String html)protected org.apache.commons.mail.MultiPartEmailcreateMultiPartEmail(String text)protected org.apache.commons.mail.SimpleEmailcreateTextOnlyEmail(String text)voidexecute(DelegateExecution execution)Default behaviour: just leave the activity with no extra functionality.protected booleanfileExists(File file)protected CharsetgetDefaultCharSet(String tenantId)protected ExpressiongetExpression(DelegateExecution execution, Expression var)protected voidgetFilesFromFields(Expression expression, DelegateExecution execution, List<File> files, List<DataSource> dataSources)protected Collection<String>getForceTo(String tenantId)protected StringgetStringFromField(Expression expression, DelegateExecution execution)protected voidhandleException(DelegateExecution execution, String msg, Exception e, boolean doIgnoreException, String exceptionVariable)protected Collection<String>parseRecipients(Expression expression, DelegateExecution execution)protected voidsetCharset(org.apache.commons.mail.Email email, String charSetStr, String tenantId)protected voidsetEmailSession(org.apache.commons.mail.Email email, String mailSessionJndi)protected voidsetFrom(org.apache.commons.mail.Email email, String from, String tenantId)protected voidsetMailServerProperties(org.apache.commons.mail.Email email, String tenantId)protected voidsetSubject(org.apache.commons.mail.Email email, String subject)protected Collection<String>splitAndTrim(String str)-
Methods inherited from class org.flowable.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior
executeCompensateBoundaryEvents, findBoundaryEventsForFlowNode, getMultiInstanceActivityBehavior, getProcessDefinition, hasLoopCharacteristics, hasMultiInstanceCharacteristics, leave, setMultiInstanceActivityBehavior
-
Methods inherited from class org.flowable.engine.impl.bpmn.behavior.FlowNodeActivityBehavior
leaveIgnoreConditions, parseActivityType, trigger
-
-
-
-
Field Detail
-
to
protected Expression to
-
from
protected Expression from
-
cc
protected Expression cc
-
bcc
protected Expression bcc
-
headers
protected Expression headers
-
subject
protected Expression subject
-
text
protected Expression text
-
textVar
protected Expression textVar
-
html
protected Expression html
-
htmlVar
protected Expression htmlVar
-
charset
protected Expression charset
-
ignoreException
protected Expression ignoreException
-
exceptionVariableName
protected Expression exceptionVariableName
-
attachments
protected Expression attachments
-
-
Method Detail
-
execute
public void execute(DelegateExecution execution)
Description copied from class:FlowNodeActivityBehaviorDefault behaviour: just leave the activity with no extra functionality.- Specified by:
executein interfaceActivityBehavior- Overrides:
executein classFlowNodeActivityBehavior
-
addHeader
protected void addHeader(org.apache.commons.mail.Email email, String headersStr)
-
createEmail
protected org.apache.commons.mail.Email createEmail(String text, String html, boolean attachmentsExist)
-
createHtmlEmail
protected org.apache.commons.mail.HtmlEmail createHtmlEmail(String text, String html)
-
createTextOnlyEmail
protected org.apache.commons.mail.SimpleEmail createTextOnlyEmail(String text)
-
createMultiPartEmail
protected org.apache.commons.mail.MultiPartEmail createMultiPartEmail(String text)
-
addTo
protected void addTo(org.apache.commons.mail.Email email, Collection<String> to, String tenantId)
-
addCc
protected void addCc(org.apache.commons.mail.Email email, Collection<String> cc, String tenantId)
-
addBcc
protected void addBcc(org.apache.commons.mail.Email email, Collection<String> bcc, String tenantId)
-
attach
protected void attach(org.apache.commons.mail.Email email, List<File> files, List<DataSource> dataSources) throws org.apache.commons.mail.EmailException- Throws:
org.apache.commons.mail.EmailException
-
setSubject
protected void setSubject(org.apache.commons.mail.Email email, String subject)
-
setMailServerProperties
protected void setMailServerProperties(org.apache.commons.mail.Email email, String tenantId)
-
setEmailSession
protected void setEmailSession(org.apache.commons.mail.Email email, String mailSessionJndi)
-
setCharset
protected void setCharset(org.apache.commons.mail.Email email, String charSetStr, String tenantId)
-
splitAndTrim
protected Collection<String> splitAndTrim(String str)
-
getStringFromField
protected String getStringFromField(Expression expression, DelegateExecution execution)
-
parseRecipients
protected Collection<String> parseRecipients(Expression expression, DelegateExecution execution)
-
getFilesFromFields
protected void getFilesFromFields(Expression expression, DelegateExecution execution, List<File> files, List<DataSource> dataSources)
-
addExpressionValueToAttachments
protected void addExpressionValueToAttachments(Object value, List<File> files, List<DataSource> dataSources)
-
fileExists
protected boolean fileExists(File file)
-
getExpression
protected Expression getExpression(DelegateExecution execution, Expression var)
-
handleException
protected void handleException(DelegateExecution execution, String msg, Exception e, boolean doIgnoreException, String exceptionVariable)
-
getForceTo
protected Collection<String> getForceTo(String tenantId)
-
-