Skip to content

Commit

Permalink
Added condition check for enabled entity link before deleting
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhendu5shekhar committed Sep 19, 2023
1 parent 3f0c9a2 commit 440b0c6
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,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 440b0c6

Please sign in to comment.