I am using Camunda 7.6.0 with Wildfly 8 (we will shortly switch to Wildfly 10) with JavaEE integration.
I have a process application containing some processes that access some Java Delegates and some CDI beans (using CDI aware expressions) and everything works fine until here.
I am working on a new feature to allow the users to dynamically deploy process definitions at runtime. I need these dynamically deployed processes to access the Java Delegates and the CDI beans available in my process application.
I tried to deploy them as separate deployments using the RepositoryService java API, but when I start the processes from the Cockpit, neither the Java Delegates nor the CDI beans referenced in expressions can be found.
If I start the processes from within my process application, the Java Delegates are found but the CDI beans referenced in expressions are still not.
I know that the normal approach would be to use war archives and deploy everything as process applications, but it would be over complicated to implement a dynamic solution for it and it will force my application to authenticate on Wildfly as an admin user.
Is it possible to dynamically deploy/undeploy new process definitions at runtime inside the process application deployment that I already have? This way, all the Java Delegates and the CDI beans will be found correctly.
Or is there another simple approach I can use?
I was also thinking to deploy all my Java Delegates / CDI beans as Wildfly modules and add them as a dependency to the Camunda Engine module, but I am not sure it will work and it is a kinda “dirty” solution in my opinion.