I have replicated this issue and uploaded the code in Github. Please find the URL.
Steps to replicate
- Deploy Process1 war.
- Deploy Process2 war.
- Start Process1. (This would give the error mentioned above. If not make a small change in process2 and deploy it again. then start Process1 again)
Could someone please help me out on this. It would be of much help to me.
Could someone please help me out. This issue has not yet resolved and it is critical for us.
This is my Process 1 and Process 2 ( both process applications uploaded in Github). I have sendMail.bpmn in both process applications. The issue occurs when Process 2 is deployed (sometimes second deployment of Process 2) after Process 1 deployment.
Can you let me know if this works correctly on bother applications if they are deployed on their own?
And that the problem only occurs when both are deployed inside the same application server?
This works perfectly fine when they are deployed only one at a time. Once they are deployed together inside tomcat , the issue occurs. Basically after Process 02 is deployed, Process 1 is not able to find scripts that are present only in Process 1.
And does this specifically happen to scripts that are present in both application classes?
Yes. This happens specifically to scripts. If you remove the common bpmn file. ie sendMail.bpmn file from
one of the War file , the issue wont occur. So what I understand is the existence of a common bpmn file. having same content. I understand once war file is deployed , script context is lost for the other application.
Ok, i see the problem here.
You can’t have two different processes with the same process key running against the same database.
If you deploy two different models with the same ID the engine is going to assume they’re two different versions of the same process.
So, i think you’re going to need to change the name of one of the processes or keep only one of the processes.
Ok got it. My assumption was , we can have same process (same process key ) in multiple process applications as long as their content remains same, which was totally wrong. There is a similar post to this Ref:- Process Deployments with failing startup of process application - #14 by thorben.
Anyway I will remove the common reusable processes from one of the war. Thank you @Niall for you detailed response.
I should also mention - that if you deploy the process in just one of the WAR files it will still be reachable by all processes, even ones deployed in other WAR files.
So it should just work if you remove it from one of them without any additional changes.