Merge "Added check for nullpointer exception"
[so.git] / bpmn / MSOCommonBPMN / src / main / groovy / org / onap / so / bpmn / common / scripts / AbstractServiceTaskProcessor.groovy
index 1e2a703..9e71313 100644 (file)
@@ -32,6 +32,7 @@ import org.onap.so.bpmn.common.workflow.context.WorkflowCallbackResponse
 import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder
 import org.onap.so.bpmn.core.WorkflowException
 import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.client.aai.AAIResourcesClient
 import org.springframework.web.util.UriUtils
 
 public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcessor {
@@ -755,8 +756,6 @@ public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcess
        public void setBasicDBAuthHeader(DelegateExecution execution, isDebugLogEnabled) {
                try {
                        String basicAuthValueDB = UrnPropertiesReader.getVariable("mso.adapters.db.auth", execution)
-                       utils.log("DEBUG", " Obtained BasicAuth userid password for Catalog DB adapter: " + basicAuthValueDB, isDebugLogEnabled)
-                       
                        def encodedString = utils.getBasicAuth(basicAuthValueDB, UrnPropertiesReader.getVariable("mso.msoKey", execution))
                        execution.setVariable("BasicAuthHeaderValueDB",encodedString)
                } catch (IOException ex) {
@@ -765,4 +764,7 @@ public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcess
                        (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
                }
        }
+    public AAIResourcesClient getAAIClient(){
+        return  new AAIResourcesClient();
+    }
 }
\ No newline at end of file