From be2fd8eeff7af7a6d0d7335473c35f70c0173fff Mon Sep 17 00:00:00 2001 From: wcgunter Date: Mon, 27 Nov 2023 14:18:38 -0500 Subject: [PATCH] Remove unnecessary logic for historyTimeToLive in CwsConsoleService --- .../jpl/cws/service/CwsConsoleService.java | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java b/cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java index 77774375..5b921c3b 100644 --- a/cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java +++ b/cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java @@ -325,15 +325,6 @@ public String deployProcessDefinition(String bpmnXml, BpmnModelInstance model, S deployedProcDef.getKey(), deployedProcDef.getDeploymentId()); } - String historyTimeToLive = getHistoryTimeToLive(bpmnXml); - log.info("New process definition has historyTimeToLive of: " + historyTimeToLive); - if (historyTimeToLive == null) { - log.info("Setting historyTimeToLive to default value: " + historyDaysToLive); - historyTimeToLive = historyDaysToLive; - } - - repositoryService.updateProcessDefinitionHistoryTimeToLive(deployedProcDef.getId(), Integer.parseInt(historyTimeToLive)); - // Notify workers that there has been a change // to the set of deployed process definitions // @@ -370,22 +361,6 @@ private boolean containsProcessStartAsync(BpmnModelInstance model) { return acc; } - private String getHistoryTimeToLive(String xml) { - if (!xml.contains("camunda:historyTimeToLive")) { - return null; - } else { - String value = xml.substring(xml.indexOf("camunda:historyTimeToLive=") + 27); - value = value.substring(0, value.indexOf('"')); - if (value.startsWith("P")) { - value = value.substring(1, value.length()); - } - if (value.endsWith("D") || value.endsWith("M") || value.endsWith("Y")) { - value = value.substring(0, value.length()-1); - } - return value; - } - } - private boolean hasName(BpmnModelInstance model) { ModelElementType processType = model.getModel().getType(Process.class); Collection processInstances = model.getModelElementsByType(processType);