In order to determine whether a context-switch is necessary or not, the process engine tries to get the target process application for a process definition. If no target process application is found, the engine loads the previous version of the process definition. If the previous process definition is not cached in the DeploymentCache, then the corresponding deployment is fetched and deployed. This happens in a loop until a target process application is found or there is no further previous process definition.
In an embedded process engine scenario it is not necessary to do a lookup for a target process application, because it does not exist.
- the lookup for a target process application is not performed in an embedded process engine scenario
In a scenario with a huge amount of existing process definitions it can happen that they all are fetched, which can lead to an OutOfMemory exception.