AT&T 1712 and 1802 release code
[so.git] / bpmn / MSOInfrastructureBPMN / src / main / groovy / org / openecomp / mso / bpmn / vcpe / scripts / DoCreateAllottedResourceBRG.groovy
index 997757a..7d7c862 100644 (file)
@@ -28,7 +28,7 @@ import org.openecomp.mso.rest.APIResponse
 
 import java.util.UUID;
 import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
+import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.apache.commons.lang3.*
 import org.springframework.web.util.UriUtils;
 import static org.apache.commons.lang3.StringUtils.*
@@ -72,7 +72,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
        ExceptionUtil exceptionUtil = new ExceptionUtil()
        JsonUtils jsonUtil = new JsonUtils()
 
-       public void preProcessRequest (Execution execution) {
+       public void preProcessRequest (DelegateExecution execution) {
 
                def isDebugEnabled = execution.getVariable(DebugFlag)
                String msg = ""
@@ -152,7 +152,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                utils.log("DEBUG"," ***** Exit preProcessRequest *****",  isDebugEnabled)
        }
 
-       public void getAaiAR (Execution execution) {
+       public void getAaiAR (DelegateExecution execution) {
 
                def isDebugEnabled = execution.getVariable(DebugFlag)
                utils.log("DEBUG"," ***** getAaiAR ***** ", isDebugEnabled)
@@ -190,7 +190,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                utils.log("DEBUG"," *****Exit getAaiAR *****", isDebugEnabled)
        }
 
-       public void createAaiAR(Execution execution) {
+       public void createAaiAR(DelegateExecution execution) {
 
                def isDebugEnabled=execution.getVariable(DebugFlag)
                utils.log("DEBUG"," ***** createAaiAR ***** ", isDebugEnabled)
@@ -312,7 +312,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                utils.log("DEBUG"," *** Exit createAaiAR*** ", isDebugEnabled)
        }
 
-       public String buildSDNCRequest(Execution execution, String action, String sdncRequestId) {
+       public String buildSDNCRequest(DelegateExecution execution, String action, String sdncRequestId) {
 
                def isDebugEnabled = execution.getVariable(DebugFlag)
                String msg = ""
@@ -379,7 +379,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                                        <service-information>
                                                <service-id></service-id>
                                                <subscription-service-type>${subscriptionServiceType}</subscription-service-type>
-                                               <onap-model-information></onap-model-information>
+                                               <ecomp-model-information></ecomp-model-information>
                                                <service-instance-id>${serviceInstanceId}</service-instance-id>
                                                <subscriber-name/>
                                                <global-customer-id>${globalCustomerId}</global-customer-id>
@@ -388,13 +388,13 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                                                <allotted-resource-id>${allottedResourceId}</allotted-resource-id>    
                                                <allotted-resource-type>brg</allotted-resource-type>
                                                <parent-service-instance-id>${parentServiceInstanceId}</parent-service-instance-id>   
-                                               <onap-model-information>
+                                               <ecomp-model-information>
                                                        <model-invariant-uuid>${modelInvariantId}</model-invariant-uuid>
                                                        <model-uuid>${modelUUId}</model-uuid>
                                                        <model-customization-uuid>${modelCustomizationId}</model-customization-uuid>
                                                        <model-version>${modelVersion}</model-version>
                                                        <model-name>${modelName}</model-name>
-                                               </onap-model-information>
+                                               </ecomp-model-information>
                                        </allotted-resource-information>
                                        <brg-request-input>
                                                        <brg-wan-mac-address>${brgWanMacAddress}</brg-wan-mac-address>
@@ -416,7 +416,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                return sdncReq
        }
 
-       public void preProcessSDNCAssign(Execution execution) {
+       public void preProcessSDNCAssign(DelegateExecution execution) {
 
                def isDebugEnabled = execution.getVariable(DebugFlag)
                String msg = ""
@@ -446,7 +446,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                utils.log("DEBUG"," *****Exit preProcessSDNCAssign *****", isDebugEnabled)
        }
 
-       public void preProcessSDNCCreate(Execution execution) {
+       public void preProcessSDNCCreate(DelegateExecution execution) {
 
                def isDebugEnabled = execution.getVariable(DebugFlag)
                String msg = ""
@@ -476,7 +476,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                utils.log("DEBUG"," *****Exit preProcessSDNCCreate *****", isDebugEnabled)
        }
 
-       public void preProcessSDNCActivate(Execution execution) {
+       public void preProcessSDNCActivate(DelegateExecution execution) {
 
                def isDebugEnabled = execution.getVariable(DebugFlag)
                String msg = ""
@@ -506,7 +506,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                utils.log("DEBUG"," *****Exit preProcessSDNCActivate *****", isDebugEnabled)
        }
 
-       public void validateSDNCResp(Execution execution, String response, String method){
+       public void validateSDNCResp(DelegateExecution execution, String response, String method){
 
                def isDebugLogEnabled=execution.getVariable(DebugFlag)
                utils.log("DEBUG", " *** ValidateSDNCResponse Process*** ", isDebugLogEnabled)
@@ -546,7 +546,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                logDebug(" *** Exit ValidateSDNCResp Process*** ", isDebugLogEnabled)
        }
 
-       public void preProcessSDNCGet(Execution execution){
+       public void preProcessSDNCGet(DelegateExecution execution){
                def isDebugLogEnabled = execution.getVariable(DebugFlag)
                utils.log("DEBUG", "*** preProcessSDNCGet *** ", isDebugLogEnabled)
                try{
@@ -575,7 +575,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
 
                        String serviceInstanceId = execution.getVariable("serviceInstanceId")
                        String sdncRequestId = UUID.randomUUID().toString()
-
+                       
                        //neeed the same url as used by vfmodules
                        String SDNCGetRequest =
                        """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.openecomp/mso/request/types/v1"
@@ -601,7 +601,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                utils.log("DEBUG", "*** Exit preProcessSDNCGet *** ", isDebugLogEnabled)
        }
        
-       public void updateAaiAROrchStatus(Execution execution, String status){
+       public void updateAaiAROrchStatus(DelegateExecution execution, String status){
                def isDebugEnabled = execution.getVariable(DebugFlag)
                utils.log("DEBUG", " *** updateAaiAROrchStatus *** ", isDebugEnabled)
                String aaiARPath = execution.getVariable("aaiARPath") //set during query (existing AR) or create
@@ -610,7 +610,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                utils.log("DEBUG", " *** Exit updateAaiAROrchStatus *** ", isDebugEnabled)
        }
        
-       public void generateOutputs(Execution execution)
+       public void generateOutputs(DelegateExecution execution)
        {
                def isDebugEnabled=execution.getVariable(DebugFlag)
                utils.log("DEBUG"," ***** generateOutputs ***** ", isDebugEnabled)
@@ -633,7 +633,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                
        }
 
-       public void preProcessRollback (Execution execution) {
+       public void preProcessRollback (DelegateExecution execution) {
                def isDebugEnabled=execution.getVariable(DebugFlag)
                utils.log("DEBUG"," ***** preProcessRollback ***** ", isDebugEnabled)
                try {
@@ -654,7 +654,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
                utils.log("DEBUG"," *** Exit preProcessRollback *** ", isDebugEnabled)
        }
 
-       public void postProcessRollback (Execution execution) {
+       public void postProcessRollback (DelegateExecution execution) {
                def isDebugEnabled=execution.getVariable(DebugFlag)
                utils.log("DEBUG"," ***** postProcessRollback ***** ", isDebugEnabled)
                String msg = ""