AT&T 1712 and 1802 release code
[so.git] / bpmn / MSOInfrastructureBPMN / src / main / groovy / org / openecomp / mso / bpmn / infrastructure / scripts / DoDeleteVFCNetworkServiceInstance.groovy
index 7e957be..c71cb05 100644 (file)
@@ -32,7 +32,7 @@ import org.openecomp.mso.rest.APIResponse
 import java.util.UUID;\r
 \r
 import org.camunda.bpm.engine.delegate.BpmnError \r
-import org.camunda.bpm.engine.runtime.Execution\r
+import org.camunda.bpm.engine.delegate.DelegateExecution\r
 import org.apache.commons.lang3.*\r
 import org.apache.commons.codec.binary.Base64;\r
 import org.springframework.web.util.UriUtils \r
@@ -46,7 +46,7 @@ import org.openecomp.mso.rest.APIResponse;
  */\r
 public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProcessor {\r
 \r
-\r
+            \r
     String vfcUrl = "/vfc/rest/v1/vfcadapter"\r
     \r
     String host = "http://mso.mso.testlab.openecomp.org:8080"\r
@@ -60,7 +60,7 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
      * Inclouds:\r
      * generate the nsOperationKey\r
      */\r
-    public void preProcessRequest (Execution execution) {\r
+    public void preProcessRequest (DelegateExecution execution) {\r
         def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
         String msg = ""\r
         utils.log("INFO", " *** preProcessRequest() *** ", isDebugEnabled)\r
@@ -101,7 +101,7 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
     /**\r
      * delete NS task\r
      */\r
-    public void deleteNetworkService(Execution execution) {\r
+    public void deleteNetworkService(DelegateExecution execution) {\r
         def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
         utils.log("INFO", " *** deleteNetworkService  start *** ", isDebugEnabled)\r
         String nsOperationKey = execution.getVariable("nsOperationKey");\r
@@ -121,7 +121,7 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
     /**\r
      * instantiate NS task\r
      */\r
-    public void terminateNetworkService(Execution execution) {\r
+    public void terminateNetworkService(DelegateExecution execution) {\r
         def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
         utils.log("INFO", " *** terminateNetworkService  start *** ", isDebugEnabled)\r
         String nsOperationKey = execution.getVariable("nsOperationKey") \r
@@ -140,7 +140,7 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
     /**\r
      * query NS task\r
      */\r
-    public void queryNSProgress(Execution execution) {\r
+    public void queryNSProgress(DelegateExecution execution) {\r
         def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
         utils.log("INFO", " *** queryNSProgress  start *** ", isDebugEnabled)\r
         String jobId = execution.getVariable("jobId")\r
@@ -160,10 +160,10 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
     /**\r
      * delay 5 sec \r
      */\r
-    public void timeDelay(Execution execution) {\r
+    public void timeDelay(DelegateExecution execution) {\r
         try {\r
             Thread.sleep(5000);\r
-        } catch(InterruptedException e) {     \r
+        } catch(InterruptedException e) {           \r
             utils.log("INFO", "Time Delay exception" + e, isDebugEnabled)\r
         }\r
     }\r
@@ -171,7 +171,7 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
     /**\r
      * finish NS task\r
      */\r
-    public void finishNSDelete(Execution execution) {\r
+    public void finishNSDelete(DelegateExecution execution) {\r
         //no need to do anything util now\r
     }\r
 \r
@@ -180,7 +180,7 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
      * url: the url of the request\r
      * requestBody: the body of the request\r
      */\r
-    private APIResponse postRequest(Execution execution, String url, String requestBody){\r
+    private APIResponse postRequest(DelegateExecution execution, String url, String requestBody){\r
         def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
         utils.log("INFO", " ======== Started Execute VFC adapter Post Process ======== ", isDebugEnabled)\r
         utils.log("INFO", "url:"+url +"\nrequestBody:"+ requestBody, isDebugEnabled)\r
@@ -202,7 +202,7 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
      * url: the url of the request\r
      * requestBody: the body of the request\r
      */\r
-    private APIResponse deleteRequest(Execution execution, String url, String requestBody){\r
+    private APIResponse deleteRequest(DelegateExecution execution, String url, String requestBody){\r
         def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
         utils.log("INFO", " ======== Started Execute VFC adapter Delete Process ======== ", isDebugEnabled)       \r
         utils.log("INFO", "url:"+url +"\nrequestBody:"+ requestBody, isDebugEnabled)\r