I am deploying the bpmn files into camunda using the
DeploymentBuilder
API. The bpmn files have the reference to java classes as delegates/listeners.Here is the same code I use to deploy
deploymentBuilder.addInputStream(file.getName(), new FileInputStream(outputFolder+File.separator+file.getName()));
deploymentBuilder.enableDuplicateFiltering(true).deploy().getId();
I get the class not found error for the listener classes when i run the process. I think the issue is related to the classloader, but I am not sure how to associate the deployments done using the API with the classloader.
I am implementing a feature where we need the flexibility of modifying the BPMN files out side the deployment java war file. Our processes run for long (more than a year) and there could some process changes required during that time, so is the need for updating the BPMN files without redeploying the whole java application.
I figured out the issue. The process application needs to have at least one BPMN file to register and load the related classes, so that the deployment id from it can be obtained and the new BPMN deployment can be registered against this deployment. I was missing the registration part