Camunda Engine 7.13+
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
If DMN is disabled Camunda will not create the related tables, including ACT_RE_DECISION_REQ_DEF. However, on undeploying a process application the table will still be accessed by DeploymentCache.removeDeployment (last line):
With a fresh DB disable DMN using `config.setDmnEnabled(false)` and then deploy and undeploy a process application.
An exception is thrown because the table ACT_RE_DECISION_REQ_DEF does not exist.
No DMN tables are accessed when DMN is disabled.
The call to removeAllDecisionRequirementsDefinitionsByDeploymentId(..) should be moved up inside the `if (...isDmnEnabled())`.