Removed unused private method getProcessInstanceId() 50/96550/1
authorOleksandr Moliavko <o.moliavko@samsung.com>
Thu, 3 Oct 2019 10:37:29 +0000 (13:37 +0300)
committerOleksandr Moliavko <o.moliavko@samsung.com>
Thu, 3 Oct 2019 10:37:29 +0000 (13:37 +0300)
to prevent static analyzer warning

Issue-ID: SO-1841
Signed-off-by: Oleksandr Moliavko <o.moliavko@samsung.com>
Change-Id: Iab8cba14eb519f8c36f4f3ddd3fde2e50ac7147b

bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/BPMNUtil.java

index a94713e..7a50e5f 100644 (file)
@@ -155,24 +155,11 @@ public class BPMNUtil {
         }
     }
 
-    private static String getProcessInstanceId(HistoryService historyService, String processDefinitionID) {
-        List<HistoricProcessInstance> historyList = historyService.createHistoricProcessInstanceQuery().list();
-        String pID = null;
-        for (HistoricProcessInstance hInstance : historyList) {
-            if (hInstance.getProcessDefinitionKey().equals(processDefinitionID)) {
-                pID = hInstance.getId();
-                break;
-            }
-        }
-        return pID;
-    }
-
     public static boolean isProcessInstanceFinished(ProcessEngineServices processEngineServices, String pid) {
         return processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pid)
                 .finished().count() == 1 ? true : false;
     }
 
-
     private static void buildVariable(String key, String value, Map<String, Object> variableValueType) {
         Map<String, Object> host = new HashMap<>();
         host.put("value", value);