Unable to implement camunda-bpm-mail


#1

Hello,

I have been trying for the past couple of days to implement camunda-bpm-mail in order to be able to send (and receive) emails based on service tasks.

I have followed the Github documentation (https://github.com/camunda/camunda-bpm-mail) and imported in the ~/server/apache-tomcat-9.0.12/lib folder the following jar files:

  • camunda-bpm-mail-core-1.2.0.jar
  • javax.mail-1.5.5.jar
  • slf4j-api-1.7.21.jar

I have in addition configured my $MAIL_CONFIG variable to point to /root/server/apache-tomcat-9.0.12/conf/mail-config.properties and it seems like the logging is done correctly (gmail through an application password).

I have created a very simple diagram with a service task having the following attributes (copying the pizza example provided in the github):

  • Name: Test
  • Implementation: Connector
  • Connector ID: mail-send
  • Input Parameters:
    • to : Text : “@gmail.com
    • subject : Text : “Testing subject field”
    • text : Script (freemarker) : “Testing text field”

When I try to start the process from the Tasklist I have a popup “The service has started” but when inspecting the catalina logs I have the following error messages:

“28-Feb-2019 16:06:37.139 SEVERE [pool-2-thread-3] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: javax/activation/DataSource
java.lang.NoClassDefFoundError: javax/activation/DataSource”

(…)

“Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)”

I downloaded the “Full-version” of camunda (bundle with Tomcat and the h2 DB) which is currently running from a Debian machine.

Could you please give me a hand in order to make this work?

Thank you in advance!

EDIT 28-02-2019

I realized that Java 11 removes the java.activation dependency. Downgrading to Java 8 fixed the issue ! It could be interesting to update the documentation with a warning about this topic. Should I make a pull request?


#2

Why not just use element templates. https://docs.camunda.org/manual/latest/modeler/camunda-modeler/element-templates/