Replaced all tabs with spaces in java and pom.xml
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / java / org / onap / so / bpmn / infrastructure / pnf / delegate / CreateRelation.java
index 21d4396..6d73b61 100644 (file)
@@ -23,7 +23,7 @@ package org.onap.so.bpmn.infrastructure.pnf.delegate;
 import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.camunda.bpm.engine.delegate.JavaDelegate;
 import org.onap.so.bpmn.common.scripts.ExceptionUtil;
-import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection;
+import org.onap.so.bpmn.infrastructure.pnf.management.PnfManagement;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -34,25 +34,25 @@ public class CreateRelation implements JavaDelegate {
 
     private static final Logger logger = LoggerFactory.getLogger(CreateRelation.class);
 
-    private AaiConnection aaiConnectionImpl;
+    private PnfManagement pnfManagementImpl;
 
     @Autowired
-    public CreateRelation(AaiConnection aaiConnectionImpl) {
-        this.aaiConnectionImpl = aaiConnectionImpl;
+    public CreateRelation(PnfManagement pnfManagementImpl) {
+        this.pnfManagementImpl = pnfManagementImpl;
     }
 
     @Override
     public void execute(DelegateExecution delegateExecution) {
         String serviceInstanceId = (String) delegateExecution.getVariable("serviceInstanceId");
-        String pnfName = (String) delegateExecution.getVariable("correlationId");
+        String pnfName = (String) delegateExecution.getVariable("pnfCorrelationId");
         try {
-            aaiConnectionImpl.createRelation(serviceInstanceId, pnfName);
+            pnfManagementImpl.createRelation(serviceInstanceId, pnfName);
         } catch (Exception e) {
             new ExceptionUtil().buildAndThrowWorkflowException(delegateExecution, 9999,
                     "An exception occurred when making service and pnf relation. Exception: " + e.getMessage());
         }
-        logger.debug("The relation has been made between service with id: {} and pnf with name: {}",
-                serviceInstanceId, pnfName);
+        logger.debug("The relation has been made between service with id: {} and pnf with name: {}", serviceInstanceId,
+                pnfName);
     }
 
 }