Cannot launch JUNIT test with BPMN

Hi

i tried to launch an simple BPM in an Junit test and i have following error message
This is just an empty BPMN with an Service task

Blockquote
06:56:51.334 [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. | diagram_1.bpmn | line 8 | column 41
    org.camunda.bpm.engine.ProcessEngineException: ENGINE-09005 Could not parse BPMN process. Errors:
  • One of the attributes ‘class’, ‘delegateExpression’, ‘type’, or ‘expression’ is mandatory on serviceTask. | diagram_1.bpmn | line 8 | column 41
    at org.camunda.bpm.engine.impl.util.EngineUtilLogger.exceptionDuringParsing(EngineUtilLogger.java:62)

diagram_1.bpmn (2.3 KB) Nouveau document texte.txt (85.6 KB) testDiag2.java.TXT (1.6 KB)

Have a look at the error message. It tells you exactly what is wrong:

One of the attributes ‘class’, ‘delegateExpression’, ‘type’, or ‘expression’ is mandatory on serviceTask. | diagram_1.bpmn | line 8 | column 41
org.camunda.bpm.engine.ProcessEngineException: ENGINE-09005 Could not parse BPMN process. Errors:
One of the attributes ‘class’, ‘delegateExpression’, ‘type’, or ‘expression’ is mandatory on serviceTask. | diagram_1.bpmn | line 8 | column 41
at org.camunda.bpm.engine.impl.util.EngineUtilLogger.exceptionDuringParsing(EngineUtilLogger.java:62)

A service task needs to have an implementation. (Java class, expression, etc) Otherwise the engine wouldn’t know what to do with it.
You can add this via the Camunda modeler. Highlight the task and add the implementation in the properties panel. More information on that can be found in the docs.

If you just want to test out starting a process, maybe consider using user tasks instead of service tasks.

Cheers,
Miklas

Hi this simple BPMN has no argument