SIGN IN SIGN UP

Remove historic entity link orphans on task, process and case deletion

Historic entity-link cleanup only deleted rows where the deleted entity
appeared as the SCOPE_ID_, leaving orphan rows where it appeared as the
REFERENCE_SCOPE_ID_. Subsequent reads of those links could return entries
pointing at scopes that no longer exist.

Add deleteHistoricEntityLinksByScopeIdOrReferenceScopeIdAndScopeType and
bulkDeleteHistoricEntityLinksForScopeTypeAndScopeIdsOrReferenceScopeIds
on HistoricEntityLinkService and use them from
TaskHelper#deleteHistoricTask (BPMN and CMMN, single and bulk),
DefaultHistoryManager#recordProcessInstanceDeleted /
recordBulkDeleteProcessInstances,
DefaultCmmnHistoryManager#recordHistoricCaseInstanceDeleted, and
CmmnHistoryHelper#bulkDeleteHistoricCaseInstances. A single SQL delete
now removes every row mentioning the deleted entity in either direction.
F
Filip Hrisafov committed
fd1c4fc4cf1322de2d325eb26f89aa2736d6bcec
Parent: 888eef6