Merge "Reorder modifiers"
[so.git] / bpmn / MSOInfrastructureBPMN / src / main / groovy / org / openecomp / mso / bpmn / infrastructure / scripts / DoCreateE2EServiceInstance.groovy
index 267673d..eaec39b 100644 (file)
@@ -46,6 +46,7 @@ import org.openecomp.mso.bpmn.core.WorkflowException
 import org.openecomp.mso.rest.APIResponse;
 import org.openecomp.mso.rest.RESTClient
 import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.bpmn.infrastructure.workflow.service.ServicePluginFactory
 
 import java.util.List;
 import java.util.UUID;
@@ -221,8 +222,20 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
         }
     }
     
+    public void doServicePreOperation(DelegateExecution execution){
+       //we need a service plugin platform here. 
+       ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+       String uuiRequest = execution.getVariable("uuiRequest")         
+       String newUuiRequest = ServicePluginFactory.getInstance().preProcessService(serviceDecomposition, uuiRequest);
+       execution.setVariable("uuiRequest", newUuiRequest)      
+    }
+    
     public void doServiceHoming(DelegateExecution execution) {
-        //Now Homing is not clear. So to be implemented.
+       //we need a service plugin platform here. 
+       ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+       String uuiRequest = execution.getVariable("uuiRequest")         
+       String newUuiRequest = ServicePluginFactory.getInstance().doServiceHoming(serviceDecomposition, uuiRequest);
+       execution.setVariable("uuiRequest", newUuiRequest)      
     }
     
        public void postProcessAAIGET(DelegateExecution execution) {
@@ -396,7 +409,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
         utils.log("INFO", " ======== STARTED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
         try{
             String serviceId = execution.getVariable("serviceInstanceId")
-            String operationId = execution.getVariable("msoRequestId")
+            String operationId = execution.getVariable("operationId")
             String operationType = execution.getVariable("operationType")
             String resourceTemplateUUIDs = ""
             String result = "processing"