Whenever process definitions are fetched by the ProcessDefinitionQuery the corresponding bpmn model instances for each fetched process definition is added to the deployment cache (if it is not already contained by the deployment cache) - see [1]. This used to get the documentation from the bpmn model instance, so that the process definition description can be retrieved by ProcessDefinition#getDescription().
The problem is that when a huge amount of process definitions are fetched, then the used memory of the deployment cache grows sharply, which can lead to out of memory exceptions.
AT:
- the process engine configuration contains a flag which can be used to disable the retrieving of documentation for each fetched process definition
- in terms of backward compatibility retrieving of documentation is enabled