Hello,
I am using Docker image of Tomcat distribution of Camunda. In which directory, I will need to copy the jar that contains the delegate classes? Also, where to copy the dependent jars?
First of all , you should understand that a web application ( process application that contains your java delegates) cannot be deployed through rest api.
You have to deploy it like any other web application
Ie through manager console or copy it to the webapps folder and restart the server.
You can copy the jar that contains delegates shared across the projects to the lib folder inside tomcat. You need not copy the dependencies if you are using maven. Because the war file itself contains the dependencies unless scope defined for the dependencies are changed.
It depends on the distribution, but a general answer would be “because of java classloaders”.
Wildfly has a decent mechanism to separate Classes loaded from different scopes, where the container managed engine is one of these scopes and each deployed application runs in a different scope.
Spring Boot has just a single class loader and uses the embedded engine. Here it may become more complex to organize different processes with different delegates in the same engine, but technically it would be simpler than in the Wildfly universe.
Thanks for the answer.
It is unfortunately not really helpful. If I deploy my processes via REST, they should run in the engine-rest context in Tomcat (I’m unsing Tomcat instead of Wildfly). Therefore, the question is: where do I have to put my jar, so that it can be loaded by the class loader in the engine-rest context. I tried camunda/lib, tomcat/lib, webapps/engine-rest/WEB-INF/lib but all without succes. I thought I would roughly understand how the Java class loader works, but obviously I do not understand enough about Camunda to understand which parts of the applications are used in which situations.
I don’t won’t to create an own process application, since I’m only working on a small demo with a single service task.
I have even tried to use the new feature of the camunda modeler to deploy “other files” together with a process, but that only seems to work for forms, not for JARs, which is really a pity.
If yes, you can put your jar file into the camunda-bpm-ee-tomcat-7.16.1-ee\server\apache-tomcat-9.0.52\lib folder. You can find the camunda-engine.jar in this folder, too.