One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on sendTask. If you are using a connector, make sure theconnect process engine plugin is registered with the process engine

Hello @Ingo_Richtsmeier,

I have a requirement to send an email, so I created a process model using send Task (tried using service task too) as follows

But I am getting following error (same error using Service Task):
ENGINE-16004 Exception while closing command context: ENGINE-09005 Could not parse BPMN process. Errors:

  • One of the attributes ‘class’, ‘delegateExpression’, ‘type’, or ‘expression’ is mandatory on sendTask. If you are using a connector, make sure theconnect process engine plugin is registered with the process engine.

I searched for this error in the forum and found similar topics. Tried the solutions suggested but nothing helped.

I have added following dependencies to my pom
camunda-bpm-mail-core
camunda-connect-core
camunda-connect-connectors-all
camunda-engine-plugin-connect
javax.mail
slf4j-api

I am able to see connector providers in my console:
org.camunda.bpm.engine.cfg : ENGINE-12003 Plugin ‘ConnectProcessEnginePlugin’ activated on process engine ‘default’
2023-02-13 10:10:11.075 INFO 4352 — [ main] org.camunda.bpm.connect : CNCT-01004 Discovered provider for connector id ‘mail-send’ and class ‘org.camunda.bpm.extension.mail.send.SendMailConnector’: ‘org.camunda.bpm.extension.mail.send.SendMailProvider’
2023-02-13 10:10:11.076 INFO 4352 — [ main] org.camunda.bpm.connect : CNCT-01004 Discovered provider for connector id ‘mail-poll’ and class etc

Also, added a bean for ConnectProcessEnginePlugin in config class and mail-config.properties file.
@Bean
public ConnectProcessEnginePlugin getConnectProcessEnginePlugin() {
return new ConnectProcessEnginePlugin();
}

SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
List processEnginePlugins = config.getProcessEnginePlugins().isEmpty() ?
new ArrayList<>() : config.getProcessEnginePlugins();
processEnginePlugins.add(getConnectProcessEnginePlugin());
config.setProcessEnginePlugins(processEnginePlugins);

Thanks in Advance,
Nikhitha

Hi @Nikhitha,

I assume you have a spring boot project.

The docs how to integrate camunda-7-mail is here: camunda-platform-7-mail/extension/spring-boot at main · camunda-community-hub/camunda-platform-7-mail · GitHub

Hope this helps, Ingo