DEV Community

Cover image for Sending email using flowable workflow engine
Arjun Shetty
Arjun Shetty

Posted on

Sending email using flowable workflow engine

Integrating Email task in Flowable. If doing from flowable-UI follow this.

Alt Text

Once you are done with the filing To, From, Html/HtmlVar, etc,. Configure the email server configuration in your spring application.



# email config
flowable.mail.server.host=smtp.google.com
flowable.mail.server.port=587
flowable.mail.server.username=arjun
flowable.mail.server.password=arjun
flowable.mail.server.use-tls=true


Enter fullscreen mode Exit fullscreen mode

In case you want to add the email task manually paste this node to your workflow bpmn file.



<serviceTask id="RejectionEmail" name="Rejection Email" flowable:type="mail">
      <extensionElements>
        <flowable:field name="to">
          <flowable:string><![CDATA[arjun@bitmonkey.in]]></flowable:string>
        </flowable:field>
        <flowable:field name="subject">
          <flowable:string><![CDATA[Rejection]]></flowable:string>
        </flowable:field>
        <flowable:field name="html">
          <flowable:string><![CDATA[<a href="http://bitsmonkey.in">Rejection reason</a>
<input type="textarea">Dummy Message</input>]]></flowable:string>
        </flowable:field>
      </extensionElements>
    </serviceTask>


Enter fullscreen mode Exit fullscreen mode

Code On!

Originally posted on Bitsmonkey

Top comments (2)

Collapse
 
luonganhtu19 profile image
luonganhtu19

Please,could you help me? I had config project same you. But not run project. it error

2022-08-08 13:24:35.276 ERROR 8592 --- [nio-8080-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.flowable.common.engine.api.FlowableException: Could not send e-mail in execution 25015] with root cause

javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25, response: 421

Collapse
 
srinathidm profile image
srinathidm

Can i get sample project for mail using flowable in spring-boot