Where does Camunda engine look for java delegates Classes?

Hi,
I’m new to Camunda so I hope I’m not asking a very obvious question. I’m trying to implement a simple Java delegate to be run on a service task within a process.
In order to do so, I implemented a class called “Test” that extends JavaDelegate according to the documentation and packed it in a JAR file. I checked first that the class was accessible from the JAR.
I also set up a simple camunda diagram that just calls a service task that references the delegate’s name and deployed it to the default Camunda server that runs with Tomcat. Now, I don’t seem to find the correct place to copy my Jar file in the Camunda’s directory structure. When I try to run the process I always get the message "

“Cannot instantiate process definition Process_1:4:b575f2ac-8968-11e8-8830-0242172e193e: ENGINE-09008 Exception while instantiating class ‘com.wenance.cashio.bpm.delegates.TestDelegate’: ENGINE-09017 Cannot load class ‘com.wenance.cashio.bpm.delegates.TestDelegate’: com.wenance.cashio.bpm.delegates.TestDelegate”" .

What would be the best way to deploy the delegate? Is the Jar packaging a correct approach?
Thanks in advance,
Bernabé

Finally I found it. It must be deployed in %camunda_dist%/server/apache-tomcat-XXX/webapps/engine-rest/WEB-INF/lib

Hi Bernabé,

While this may work in this instance, modifying the Camunda REST API application is not a good practice and you will likely run into further problems down the road. The recommended way of providing Java classes for a process, is to bundle both Java class and process in a Java web application (war) that is a process application. You can find a simple example project for this here: camunda-bpm-examples/deployment/servlet-pa at master · camunda/camunda-bpm-examples · GitHub.

Cheers,
Thorben

Great! I tried the WAR approach and It worked. Thank you!