How to send an email with a send task?

Hello all,

I have a requirement to send an email to a client during the process execution from the workflow engine.

I have deployed my process on engine and I have to specify the execution semantics for a send task.

I want the send task automatically to send a confirmation email to an external user.

  1. Is there an example on GitHub related to send task implementation with an external worker? If so, I would appreciate it if you could provide it to me.
  2. do you recommend another way of implementation for sending emails from workflow engine to external users?

Your assistance and your ideas would be so valuable for me.

Thank you all in advance.

Regards,
Nick.

Hi Nick,

there are many ways to send an email… heres one way you could do it…

regards

Rob

Hey @Webcyberrob,
thanks for your answer!

I just found some time to try out the implementation that you proposed.

Based on your experience and your knowledge you might be able to help me on the following.

I do not have created a maven project, I just have modeled a BPMN model on Modeler and deployed it on the engine. So, I do not have dependencies, etc.

I just want to configure the modeler and the engine for every BPMN model that I will have email sending.

Following the directions that I found in the proposed implementation, 1) I inserted the camunda-bpm-mail-core-1.2.0.jar and the following dependencies: camunda-connect-core, JavaMail, slf4j-api.
All of the above have been inserted on server–>apache–>lib folder.

  1. Then, I have created a mail-config.properties file and I have inserted it in server–>apache–>conf folder.

  2. I have set my task, as a service task implemented by a connector and I configured the mail-send connector.

However, when I deploy it in the engine and I run some process instances, I have an error 500,("no connector found for connector id ‘mail-send’ ") that is described below.

Do I miss something??

Thank you in advance.

Hi,

It could be that this library needs to initialise installing itself into the connector architecture via an engine plugin or similar. Hence whilst copying the libraries is correct, the initilisation may be missing…

An alternate approach not using the connector architecture is to include the java mail library and use a native java implementation as a service delegate. Example java code to use the java mail library can be found here

regards
Rob