Deploy a war with global visibility

Hello,
I have a problem with my process engine.

I have created a project that contains a few JavaDelegates. I also created the .war for this project and uploaded to the wildfly server.
It all works fine because there is a test process inside the process, and when i start it, it works fine.

Here is the problem I’m trying to solve:
I created a single .bpmn file that contains a service task that calls one of the delegates from the project I created. But when I start this new deployed process I get ClassNotFoundException.

Is there a way to make the .war visible to all processes?

Ask me if more details are needed.
Thank you.

Hi @Leonardo_Chirivi,

have a look at this post, please: Register process application for process definitions deployed by REST API.

Hope this helps, Ingo

Hi @Ingo_Richtsmeier , thanks for your response.
However I don’t think this is what I need. I’ll try to give a better explanation:

I have a java project that contains several delegates, and I’m going to deploy it to wildfly.
After that I need users to be able to create a bpmn file using the modeler and create services task in wich
the ‘details’ field is filled with the qualified java class name the task need to use.
In this way different processes can be created based on the supplied delegates in the project.

The problem is that the new uploaded process can’t reach those delegates when I start the process.
I need somehow to make the java project visible to all processes. Is it possible?

Hope is clearer now.
How could I solve this?

Many thanks.

Hi @Leonardo_Chirivi,

the barrier to overcome is the classloader isolation.

When you use the shared engine approach (https://docs.camunda.org/manual/7.10/user-guide/process-engine/process-engine-bootstrapping/#shared-container-managed-process-engine), you build separated process applications using their own classloader from the application server implementation (https://docs.camunda.org/manual/7.10/user-guide/process-applications/).

Because of this approach you have to register your deployment of new process definitions with a process application afterwards .

There are two alternatives to reach your goal:

  1. Move your delegate implementations on the same level as the shared engine. If you use tomcat, it’s quite easy: package your project as a normal jar file and put it into the tomcat/libs folder next to the camunda-engine.jar. For wildfly you have to create a module and wire this module to the camunda engine module.
  2. Use the embedded engine approach and put the process engine jar into your war file with your delegate implementations and deploy it to a vanilla application server without preinstalled process engine: https://docs.camunda.org/manual/7.10/user-guide/process-engine/process-engine-bootstrapping/#application-managed-process-engine.

Hope this helps, Ingo

1 Like

Hi @Ingo_Richtsmeier,
This seems ok!
But I can’t figure out how to wire the jar to the engine module.
I tried adding the reference in the standalone.xml but still I get the same issue.

Any suggestions perhaps?
Thank you very much.

Hi @Leonardo_Chirivi,

I did it a long time ago (old Jboss times) with the help of this maven plugin: https://www.smartics.eu/smartics-jboss-modules-maven-plugin/. Today there seem to be better support for Wildfly as I got a lot of results googeling for “maven wildfly module”.

You can find some insight into extending the process engine here: https://docs.camunda.org/manual/7.10/user-guide/runtime-container-integration/jboss/#manage-classpath-dependencies.

Hope this helps, Ingo