[MSO-8] Update the maven dependency
[so.git] / bpmn / MSOCommonBPMN / src / main / groovy / org / openecomp / mso / bpmn / common / scripts / GenericDeleteService.groovy
  * ============LICENSE_END=========================================================
  */
 
-package com.att.bpm.scripts
+package org.openecomp.mso.bpmn.common.scripts
 
-import static org.apache.commons.lang3.StringUtils.*;
+import static org.apache.commons.lang3.StringUtils.*
 
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution;
-import org.apache.commons.codec.binary.Base64
 import org.apache.commons.lang3.*
-
-import org.openecomp.mso.bpmn.core.WorkflowException
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
 import org.openecomp.mso.rest.APIResponse
-import org.openecomp.mso.rest.RESTClient
-import org.openecomp.mso.rest.RESTConfig
-
 import org.springframework.web.util.UriUtils
 
 
@@ -184,16 +178,19 @@ class GenericDeleteService extends AbstractServiceTaskProcessor{
 
                        execution.setVariable("GENDS_serviceAaiPath", serviceAaiPath)
                        utils.log("DEBUG", "GET Service Instance AAI Path is: " + "\n" + serviceAaiPath, isDebugEnabled)
-
+                       utils.logAudit("GenericDeleteService GET AAI Path: " + serviceAaiPath)
+                       
                        APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceAaiPath)
                        int responseCode = response.getStatusCode()
                        execution.setVariable("GENDS_getServiceResponseCode", responseCode)
                        utils.log("DEBUG", "  GET Service Instance response code is: " + responseCode, isDebugEnabled)
-
+                       utils.logAudit("GET Service Instance response code: " + responseCode)
+                       
                        String aaiResponse = response.getResponseBodyAsString()
                        aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
                        execution.setVariable("GENDS_getServiceResponse", aaiResponse)
 
+                       utils.logAudit("GET Service Instance response : " + aaiResponse)
                        //Process Response
                        if(responseCode == 200 || responseCode == 202){
                                utils.log("DEBUG", "GET Service Received a Good Response: \n" + aaiResponse, isDebugEnabled)
@@ -268,16 +265,19 @@ class GenericDeleteService extends AbstractServiceTaskProcessor{
 
                        execution.setVariable("GENDS_deleteServiceAaiPath", serviceAaiPath)
                        utils.log("DEBUG", "DELETE Service AAI Path is: " + "\n" + serviceAaiPath, isDebugEnabled)
-
+                       utils.logAudit("DELETE Service AAI Path: " + serviceAaiPath)
+                       
                        APIResponse response = aaiUriUtil.executeAAIDeleteCall(execution, serviceAaiPath)
                        int responseCode = response.getStatusCode()
                        execution.setVariable("GENDS_deleteServiceResponseCode", responseCode)
                        utils.log("DEBUG", "  DELETE Service response code is: " + responseCode, isDebugEnabled)
+                       utils.logAudit("DELETE Service Response Code: " + responseCode)
 
                        String aaiResponse = response.getResponseBodyAsString()
                        aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse)
                        execution.setVariable("GENDS_deleteServiceResponse", aaiResponse)
-
+                       utils.logAudit("DELETE Service Response: " + aaiResponse)
+                       
                        //Process Response
                        if(responseCode == 200 || responseCode == 204){
                                utils.log("DEBUG", "  DELETE Service Received a Good Response", isDebugEnabled)