Skip to content

Commit

Permalink
Added condition check for enabled entity link before deleting (#3746)
Browse files Browse the repository at this point in the history
* Added condition check for enabled entity link before deleting

* Update modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/cmd/DeleteRelatedDataOfRemovedHistoricCaseInstancesCmd.java

Co-authored-by: David B Malkovsky <[email protected]>

---------

Co-authored-by: Shubhendu <[email protected]>
Co-authored-by: Filip Hrisafov <[email protected]>
Co-authored-by: David B Malkovsky <[email protected]>
  • Loading branch information
4 people authored Sep 20, 2023
1 parent 6872141 commit 39d2fc0
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ public Object execute(CommandContext commandContext) {
IdentityLinkServiceConfiguration identityLinkServiceConfiguration = cmmnEngineConfiguration.getIdentityLinkServiceConfiguration();
identityLinkServiceConfiguration.getHistoricIdentityLinkService().deleteHistoricCaseIdentityLinksForNonExistingInstances();
identityLinkServiceConfiguration.getHistoricIdentityLinkService().deleteHistoricTaskIdentityLinksForNonExistingInstances();
HistoricEntityLinkService historicEntityLinkService = cmmnEngineConfiguration.getEntityLinkServiceConfiguration().getHistoricEntityLinkService();
if (historicEntityLinkService != null) {
historicEntityLinkService.deleteHistoricEntityLinksForNonExistingCaseInstances();
if (cmmnEngineConfiguration.isEnableEntityLinks()) {
HistoricEntityLinkService historicEntityLinkService = cmmnEngineConfiguration.getEntityLinkServiceConfiguration().getHistoricEntityLinkService();
if (historicEntityLinkService != null) {
historicEntityLinkService.deleteHistoricEntityLinksForNonExistingCaseInstances();
}
}
cmmnEngineConfiguration.getTaskServiceConfiguration().getHistoricTaskService().deleteHistoricTaskLogEntriesForNonExistingCaseInstances();
cmmnEngineConfiguration.getVariableServiceConfiguration().getHistoricVariableService().deleteHistoricVariableInstancesForNonExistingCaseInstances();
Expand Down

0 comments on commit 39d2fc0

Please sign in to comment.