Today we went into a deadlock situation in our project. I like to share this case so that other Cordys developers are aware of this potential problem.
We have defined the following Long Lived Process.
So we have 1 subprocess and a webservice call.
There is 1 BPM Service Container that handles BPMs and Cases.
The problem is with the webservice call. This is also a call that is handled by a BPM container, however NOT on the same thread as the one that started this BPM instance. So in case the long-lived thread pool is full, the webservice can not be handled by the BPM container and all BPM instances are locked.
SolutionDefine a separate BPM Service Container for the Case Management handling and in this case the call is handled by a different thread pool.
In general keep aware that in LongLived BPMs it can be dangerous to call BPM Webservices (like BPM generated webservices, case webservices, executeProcess webservice).
More can be found also on the Cordys Wiki: https://wiki.cordys.com/display/dp/Process+Execution+Modes+and+Thread+Pool+usage