Service Task Class Not Found Exception


#1

Hello, i have an issue with the camunda service task :

I’m using camunda docker image (https://github.com/camunda/docker-camunda-bpm-platform) and provide him a war (ProcessApplication containing bpmn file and JavaDelegate class which execute the service task). When i deploy my application with the bpmn file ,it is working , the service task call my java delegate and it’s executed with no error.

Now i provide the war process application withtout the bpmn file and i deploy the bpmn process via REST API. I start the process and when it comes to the service task i have an error : 'ClassNotFoundException : com. … ’

It’s seems like when i’m deploying my app with the bpnm files , theyre are linked to my JavaDelegate Class but when i’m deploying my app without the bpmn files and sending them via REST API , they are not linked to my JavaDelegate Class

What i need to do to call my JavaDelegate Class ? Thanks.


#2

If you want JavaDelegate code to be called from your process you must deploy them together as part of a WAR file.

Deploying a BPMN process via the REST API i used when your code is either all embedded scripts (yuck! :slight_smile: ) or when you’re using the External Task Pattern and your workers are running independently to the process.

So if you want the process to access your JavaDelegates you cannot deploy your process via the REST API.


#3

Thanks for the quick reply , i understand , will there be a difference if i deploy my process using BPNM Model API (https://docs.camunda.org/manual/7.7/user-guide/model-api/bpmn-model-api/create-a-model/) ? Or the only way is to deploy the process with the war file? Thanks : )


#4

If you’re deploying to an application server like tomcat or wildfly - it generally has to be in a WAR file.


#5

Ok i’ll deal with that , thanks you again for your support : ) !