I created a project which creates a war file based on https://github.com/camunda/camunda-bpm-examples/tree/master/deployment/servlet-pa.
If I deploy this war to Wildfly 10 everything works fine. I can use the defined JavaDelegate in the provided bpm file.
But if I redeploy the provided bpm as version 2 with another name I will get a NoClassFoundException for the JavaDelegate in my war file. Same happens if I only deploy the JavaDelegate without a provided bpm file.
I think its caused by the classloading of the war file. If the bpm is only used, its context is the war file. By redeploying it the context changes.
Is it correct that by redeploying the bpm the context changes and the JavaDelegate will be searched “somewhere” else?
If so, is it possible to expose the JavaDelegate while deploytime so its usable in all new created service tasks?