Mail : Could not parse BPMN process

Hello Camunda community,
I am a newbie and I setup a Camunda envrionement (Eclipse, Camunda server and Modeller). The environment seems to work since I achieved tutorial 2 successfully.
Linux Xubuntu 18 last version, Eclipse Version: 2019-06 (4.12.0), JDK java-11-openjdk-amd64, Camunda modeler 3.1.2, Camunda server Community edition 7.10

I try to poll email from an imap server. I read the Github docs ( https://github.com/camunda/camunda-bpm-mail ) and try to apply…
I added the dependencies in the pom file and here they are

	<!-- https://mvnrepository.com/artifact/com.sun.mail/javax.mail -->
<dependency>
    <groupId>com.sun.mail</groupId>
    <artifactId>javax.mail</artifactId>
    <version>1.5.5</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.21</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.camunda.connect/camunda-connect-core -->
<dependency>
    <groupId>org.camunda.connect</groupId>
    <artifactId>camunda-connect-core</artifactId>
	<version>1.0.3</version>
</dependency>

I added the connector and in the process.bpmn file the connector section is as is

   <bpmn:serviceTask id="Task_102ffqx" name="CatchIncomingMail">
  <bpmn:extensionElements>
    <camunda:connector>
      <camunda:connectorId>mail-poll</camunda:connectorId>
    </camunda:connector>
  </bpmn:extensionElements>
  <bpmn:incoming>SequenceFlow_01tchsf</bpmn:incoming>
  <bpmn:outgoing>SequenceFlow_17f18gx</bpmn:outgoing>
  <bpmn:outgoing>SequenceFlow_1okbh8g</bpmn:outgoing>
</bpmn:serviceTask>

At build time, the tests fail : I get this error : 18:16:51.206 [main] ERROR org.camunda.bpm.engine.context - 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 serviceTask. | process.bpmn | line 12 | column 66

Could I expert advice me on how to solve the issue ? I read many mailing list but without success… Thanks a lot.
GB

You’ve got a service task that does not have an implementation type selected.

Thanks very much Niall. I thought that the implementation type was “connector” Isn’t it ? It’s what I set in the modeller ( see attached screen capture). Where shall I set the implementation type ?

Looks correct.
Sometimes if you’re using eclipse it doesn’t pick up changes made by external editors. you can fix it with this, for now try to refresh your project and re-build it.

I set the option in Eclipse but it had no effect, still the same error. I take car of doing a Maven clean and then a Maven install at each test. Is that correct ?

yup, that should do it. You can also upload the model so that i can check if it could be something else.

Thanks for your time Niall. Here are the model and the pom fileprocess.bpmn (3.2 KB)

pom.xml (7.9 KB)

So i was able to deploy that process, so there’s nothing wrong with the file. There must be a problem with your development environment

Thanks a lot. Is OpenJDK a potential problem ? Otherwise, I don’t see something out of standard. Could you tell me the JDK type and Eclipse versions you use ?

By the way I had the same problem on Windows 10.

Can you perhaps upload your project to github, i’ll try to built it locally and let you know how i get on.

Hi @GeekBot

(hopefully it’s a real person reading this, …)

The connector has to be configured in your engine: https://docs.camunda.org/manual/7.11/user-guide/process-engine/connectors/#configure-the-process-engine-plugin

This is done in the downloaded Camunda Server, but perhaps not in the engine used for the tests? Please double check your camunda.cfg.xml in the src/test/resources folder.

Hope this helps, Ingo

5 Likes

Thank you, Niall. I have found the cause of the problem. I explain below where is the issue and how to fix it.

Thank you very much @Ingo_Richtsmeier , your remark is totally true and lead to the solution. The problem comes form the camunda.cfg.xml in the Eclipse environment. It lacks this line :
<bean class="org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin" />
I attach the file with this modification. I also put the pom file after to show the necessary dependencies. Now tests are running without exception. Thanks again.
GeekBotcamunda.cfg.xml (901 Bytes)

4 Likes

Super - thanks for posting up your solution

The pom.xml file

pom.xml (8.3 KB)

So now, it compiles and passes the tests in Eclipse. The war deploys correctly in the server but when I start the process I still get the error (see screen capture attached). So, the situation is better but it still doesn’t work :roll_eyes:
Any idea is welcome.


GB

@GeekBot Camunda gives 2 types of Connector - http-connector and soap-connector. If you are trying to execute an HTTP endpoint in your connector, then set the connector id to http-connector as shown in the image.

Thanks,
Armaan

@GeekBot Please ensure the following files location :-

  1. camunda-bpm-mail-core-x.x.x.jar and all its dependencies under apache server > lib
  2. mail-config.properties under apache server > lib