Get Csar file bug fix
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / groovy / org / onap / so / bpmn / infrastructure / scripts / ActivateSDNCNetworkResource.groovy
index c48d000..30e6c45 100644 (file)
@@ -22,17 +22,16 @@ package org.onap.so.bpmn.infrastructure.scripts
 
 import org.apache.commons.lang3.StringUtils
 import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.json.JSONObject
 import org.json.XML
 import org.onap.so.bpmn.common.recipe.ResourceInput
 import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.so.bpmn.core.json.JsonUtils
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
-import org.onap.so.logger.MsoLogger
-import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.onap.so.logger.MsoLogger
 
 /**
@@ -50,9 +49,6 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
 
     SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
 
-    MsoUtils msoUtils = new MsoUtils()
-
-
     public void preProcessRequest(DelegateExecution execution) {
         def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
         msoLogger.info(" ***** Started preProcessRequest *****")
@@ -133,7 +129,6 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
     }
 
     public void prepareUpdateAfterActivateSDNCResource(DelegateExecution execution) {
-        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
         msoLogger.info("started prepareUpdateAfterActivateSDNCResource ")
 
         ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
@@ -168,7 +163,7 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
     }
 
     private void setProgressUpdateVariables(DelegateExecution execution, String body) {
-        def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+        def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
         execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
         execution.setVariable("CVFMI_updateResOperStatusRequest", body)
     }
@@ -191,7 +186,6 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
     }
 
     public void prepareSDNCRequest (DelegateExecution execution) {
-        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
         msoLogger.info("Started prepareSDNCRequest ")
 
         try {
@@ -409,7 +403,6 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
     }
 
     public void postActivateSDNCCall(DelegateExecution execution) {
-        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
         msoLogger.info("started postCreateSDNCCall ")
 
         String responseCode = execution.getVariable(Prefix + "sdncCreateReturnCode")
@@ -419,7 +412,6 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
     }
 
     public void sendSyncResponse(DelegateExecution execution) {
-        def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
         msoLogger.dubug(" *** sendSyncResponse *** ")
 
         try {
@@ -431,10 +423,10 @@ public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
             execution.setVariable("sentSyncResponse", true)
 
         } catch (Exception ex) {
-            String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+            String msg = "Exception in sendSyncResponse:" + ex.getMessage()
             msoLogger.debug( msg)
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
         }
-        msoLogger.dubug(" ***** Exit sendSyncResopnse *****")
+        msoLogger.dubug(" ***** Exit sendSyncResponse *****")
     }
 }
\ No newline at end of file