Merge "Restore SERVICE_NAME to OPERATION_STATUS table"
authorSeshu Kumar M <seshu.kumar.m@huawei.com>
Mon, 9 Apr 2018 13:22:53 +0000 (13:22 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 9 Apr 2018 13:22:53 +0000 (13:22 +0000)
18 files changed:
adapters/mso-vfc-adapter/README
bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/AppCClient.groovy
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateResources.groovy
bpmn/MSOInfrastructureBPMN/src/main/resources/process/CompareModelofE2EServiceInstance.bpmn
bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn
bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCompareModelVersions.bpmn
bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn
bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateResources.bpmn
bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/CreateVfModuleInfraTest.java
bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplicationTest.java [new file with mode: 0644]
common/src/test/java/org/openecomp/mso/utils/UUIDCheckerTest.java [new file with mode: 0644]
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
pom.xml

index e69de29..233430c 100644 (file)
@@ -0,0 +1 @@
+This is the adapter for VFC
\ No newline at end of file
index ca7eef8..535b65e 100644 (file)
@@ -74,13 +74,15 @@ public class AppCClient extends AbstractServiceTaskProcessor{
                        String vnfHostIpAddress = execution.getVariable('vnfHostIpAddress')
                        String vmIdList = execution.getVariable("vmIdList")
                        String identityUrl = execution.getVariable("identityUrl")
-                       String controllerType = execution.getVariable("controllerType")                 
+                       String controllerType = execution.getVariable("controllerType") 
+                       String vfModuleId = execution.getVariable("vfModuleId")         
                        HashMap<String, String> payloadInfo = new HashMap<String, String>();            
                        payloadInfo.put("vnfName", vnfName)
                        payloadInfo.put("aicIdentity", aicIdentity)
                        payloadInfo.put("vnfHostIpAddress", vnfHostIpAddress)
                        payloadInfo.put("vmIdList", vmIdList)
                        payloadInfo.put("identityUrl", identityUrl)
+                       payloadInfo.put("vfModuleId",vfModuleId)
                        Optional<String> payload
                        logDebug("Running APP-C action: " + action.toString(), isDebugLogEnabled)
                        utils.log("DEBUG", "VNFID: " + vnfId, isDebugLogEnabled)
index 1464aed..3903e12 100644 (file)
@@ -129,17 +129,20 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
                        Map reqMap = jsonSlurper.parseText(siRequest)\r
 \r
                        //InputParams\r
-                       def userParams = reqMap.requestDetails?.requestParameters?.userParams\r
+                       def userParamsList = reqMap.requestDetails?.requestParameters?.userParams\r
 \r
                        Map<String, String> inputMap = [:]\r
-                       if (userParams) {\r
-                               userParams.each {\r
-                                       userParam -> inputMap.put(userParam.name, userParam.value.toString())\r
+                       if (userParamsList) {\r
+                               for (def i=0; i<userParamsList.size(); i++) {\r
+                                       def userParams1 = userParamsList.get(i)\r
+                                       userParams1.each { param -> inputMap.put(param.key, param.value)}\r
                                }\r
                        }\r
+\r
                        \r
-                       utils.log("DEBUG", "User Input Parameters map: " + userParams.toString(), isDebugEnabled)\r
+                       utils.log("DEBUG", "User Input Parameters map: " + inputMap.toString(), isDebugEnabled)\r
                        execution.setVariable("serviceInputParams", inputMap)\r
+                       execution.setVariable("uuiRequest", inputMap.get("UUIRequest"))\r
                        execution.setVariable("URN_mso_adapters_openecomp_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")\r
                        //TODO\r
                        //execution.setVariable("serviceInputParams", jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams"))\r
index 3b2c4ea..3f0b8d1 100644 (file)
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.infrastructure.scripts;
-
-import groovy.json.JsonSlurper
-import groovy.json.JsonOutput
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.apache.commons.lang3.*
-import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;
-import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;
-import org.openecomp.mso.bpmn.common.scripts.NetworkUtils;
-import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils;
-import org.openecomp.mso.bpmn.common.scripts.VidUtils;
-import org.openecomp.mso.bpmn.core.RollbackData
-import org.openecomp.mso.bpmn.core.WorkflowException
-import org.openecomp.mso.bpmn.core.json.JsonUtils
-
-public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
-
-       ExceptionUtil exceptionUtil = new ExceptionUtil()
-       JsonUtils jsonUtil = new JsonUtils()
-
-       /**
-        * Validates the request message and sets up the workflow.
-        * @param execution the execution
-        */
-       public void preProcessRequest(DelegateExecution execution) {
-               def method = getClass().getSimpleName() + '.preProcessRequest(' +
-                       'execution=' + execution.getId() +
-                       ')'
-               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
-               logDebug('Entered ' + method, isDebugLogEnabled)
-
-               execution.setVariable("CVFMI_sentSyncResponse", false)
-               
-               def prefix = 'CVFMI_'
-               logDebug('Entered 1' + method, isDebugLogEnabled)
-               execution.setVariable('prefix', prefix)
-               logDebug('Entered 2' + method, isDebugLogEnabled)
-               execution.setVariable("isVidRequest", "false")
-
-               logDebug("Set variables", isDebugLogEnabled)
-
-               def rollbackData = execution.getVariable("RollbackData")
-               if (rollbackData == null) {
-                       rollbackData = new RollbackData()
-               }
-               execution.setVariable("RollbackData", rollbackData)
-
-               logDebug("Set rollback data", isDebugLogEnabled)
-               def incomingRequest = execution.getVariable('bpmnRequest')
-
-               utils.log("DEBUG", "Incoming Infra Request: " + incomingRequest, isDebugLogEnabled)
-               utils.logAudit("CreateVfModule Infra incoming Request: " + incomingRequest)
-
-               setBasicDBAuthHeader(execution, isDebugLogEnabled)
-               
-               // check if request is xml or json
-               try {
-                       def jsonSlurper = new JsonSlurper()
-                       def jsonOutput = new JsonOutput()
-                       Map reqMap = jsonSlurper.parseText(incomingRequest)
-                       utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled)
-
-                       def serviceInstanceId = execution.getVariable('serviceInstanceId')
-                       def vnfId = execution.getVariable('vnfId')
-                       
-                       execution.setVariable(prefix + 'serviceInstanceId', serviceInstanceId)
-                       execution.setVariable(prefix+'vnfId', vnfId)
-                       execution.setVariable("isVidRequest", "true")
-                       
-                       def vnfName = ''
-                       def asdcServiceModelVersion = ''
-                       def serviceModelInfo = null
-                       def vnfModelInfo = null
-                       
-                       def relatedInstanceList = reqMap.requestDetails?.relatedInstanceList
-                                               
-                       if (relatedInstanceList != null) {
-                               relatedInstanceList.each {
-                                       if (it.relatedInstance.modelInfo?.modelType == 'service') {
-                                               asdcServiceModelVersion = it.relatedInstance.modelInfo?.modelVersion
-                                               serviceModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo)
-                                               
-                                       }
-                                       if (it.relatedInstance.modelInfo.modelType == 'vnf') {
-                                               vnfName = it.relatedInstance.instanceName ?: ''
-                                               vnfModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo)
-                                       }
-                               }
-                       }
-                       
-                       execution.setVariable(prefix + 'vnfName', vnfName)
-                       execution.setVariable(prefix + 'asdcServiceModelVersion', asdcServiceModelVersion)
-                       execution.setVariable(prefix + 'serviceModelInfo', serviceModelInfo)
-                       execution.setVariable(prefix + 'vnfModelInfo', vnfModelInfo)
-                       
-                       
-                       def vnfType = execution.getVariable('vnfType')
-                       execution.setVariable(prefix + 'vnfType', vnfType)      
-                       def vfModuleId = execution.getVariable('vfModuleId')
-                       execution.setVariable(prefix + 'vfModuleId', vfModuleId)
-                       def volumeGroupId = execution.getVariable('volumeGroupId')
-                       execution.setVariable(prefix + 'volumeGroupId', volumeGroupId)
-                       def userParams = reqMap.requestDetails?.requestParameters?.userParams                                   
-                       
-                       Map<String, String> userParamsMap = [:]
-                       if (userParams != null) {
-                               userParams.each { userParam ->
-                                       userParamsMap.put(userParam.name, jsonOutput.toJson(userParam.value).toString())
-                               }                                                       
-                       }               
-                                               
-                       utils.log("DEBUG", 'Processed user params: ' + userParamsMap, isDebugLogEnabled)                
-                       
-                       execution.setVariable(prefix + 'vfModuleInputParams', userParamsMap)
-                       
-                       def isBaseVfModule = "false"
-                       if (execution.getVariable('isBaseVfModule') == true) {
-                               isBaseVfModule = "true"
-                       }                       
-                       
-                       execution.setVariable(prefix + 'isBaseVfModule', isBaseVfModule)
-                                               
-                       def requestId = execution.getVariable("mso-request-id")
-                       execution.setVariable(prefix + 'requestId', requestId)
-                       
-                       def vfModuleModelInfo = jsonOutput.toJson(reqMap.requestDetails?.modelInfo)
-                       execution.setVariable(prefix + 'vfModuleModelInfo', vfModuleModelInfo)
-                       
-                       def suppressRollback = reqMap.requestDetails?.requestInfo?.suppressRollback
-                       
-                       
-                       def backoutOnFailure = ""
-                       if(suppressRollback != null){
-                               if ( suppressRollback == true) {
-                                       backoutOnFailure = "false"
-                               } else if ( suppressRollback == false) {
-                                       backoutOnFailure = "true"
-                               }
-                       }
-                       
-                       execution.setVariable('disableRollback', suppressRollback)
-                       
-                       def vfModuleName = reqMap.requestDetails?.requestInfo?.instanceName ?: null
-                       execution.setVariable(prefix + 'vfModuleName', vfModuleName)
-                       
-                       def serviceId = reqMap.requestDetails?.requestParameters?.serviceId ?: ''
-                       execution.setVariable(prefix + 'serviceId', serviceId)
-                       
-                       def usePreload = reqMap.requestDetails?.requestParameters?.usePreload
-                       execution.setVariable(prefix + 'usePreload', usePreload)
-                       
-                       // This is aLaCarte flow, so aLaCarte flag is always on                         
-                       execution.setVariable(prefix + 'aLaCarte', true)
-                       
-                       def cloudConfiguration = reqMap.requestDetails?.cloudConfiguration
-                       def lcpCloudRegionId    = cloudConfiguration.lcpCloudRegionId
-                       execution.setVariable(prefix + 'lcpCloudRegionId', lcpCloudRegionId)
-                       def tenantId = cloudConfiguration.tenantId
-                       execution.setVariable(prefix + 'tenantId', tenantId)
-                       
-                       def globalSubscriberId = reqMap.requestDetails?.subscriberInfo?.globalSubscriberId ?: ''
-                       execution.setVariable(prefix + 'globalSubscriberId', globalSubscriberId)
-                       
-                       execution.setVariable(prefix + 'sdncVersion', '1702')
-
-                       execution.setVariable("CreateVfModuleInfraSuccessIndicator", false)
-                       execution.setVariable("RollbackCompleted", false)
-                       
-                       execution.setVariable("isDebugLogEnabled", isDebugLogEnabled)
-                       
-                       
-                       def source = reqMap.requestDetails?.requestInfo?.source
-                       execution.setVariable("CVFMI_source", source)
-                       
-                       //For Completion Handler & Fallout Handler
-                       String requestInfo =
-                       """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
-                                       <request-id>${requestId}</request-id>
-                                       <action>CREATE</action>
-                                       <source>${source}</source>
-                                  </request-info>"""
-                       
-                       execution.setVariable("CVFMI_requestInfo", requestInfo)
-                       
-                       //backoutOnFailure
-                       
-                       execution.setVariable("CVFMI_originalWorkflowException", null)
-                       
-
-                       def newVfModuleId = UUID.randomUUID().toString()
-                       execution.setVariable("newVfModuleId", newVfModuleId)
-                       execution.setVariable(prefix + 'vfModuleId', newVfModuleId)
-
-                       logDebug('RequestInfo: ' + execution.getVariable("CVFMI_requestInfo"), isDebugLogEnabled)                       
-                       
-                       logDebug('rollbackEnabled: ' + execution.getVariable("CVFMI_rollbackEnabled"), isDebugLogEnabled)
-
-                       logDebug('Exited ' + method, isDebugLogEnabled)
-               } catch (BpmnError bpmnError) {
-                       throw bpmnError
-               }
-               catch(groovy.json.JsonException je) {
-                       utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled)
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest")
-               }
-               catch(Exception e) {
-                       String restFaultMessage = e.getMessage()
-                       //execution.setVariable("CVFMODVOL2_RESTFault", restFaultMessage)
-                       //execution.setVariable("CVFMODVOL2_isDataOk", false)
-                       utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled)
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest")
-               }
-
-       }
-
-       /**
-        * Validates a workflow response.
-        * @param execution the execution
-        * @param responseVar the execution variable in which the response is stored
-        * @param responseCodeVar the execution variable in which the response code is stored
-        * @param errorResponseVar the execution variable in which the error response is stored
-        */
-       public void validateWorkflowResponse(DelegateExecution execution, String responseVar,
-                       String responseCodeVar, String errorResponseVar) {
-               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
-               sdncAdapterUtils.validateSDNCResponse(execution, responseVar, responseCodeVar, errorResponseVar)
-       }
-
-
-       /**
-        * Sends the empty, synchronous response back to the API Handler.
-        * @param execution the execution
-        */
-       public void sendResponse(DelegateExecution execution) {
-               def method = getClass().getSimpleName() + '.sendResponse(' +
-                       'execution=' + execution.getId() +
-                       ')'
-               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
-               logDebug('Entered ' + method, isDebugLogEnabled)
-
-               try {
-                       def requestInfo = execution.getVariable('CVFMI_requestInfo')
-                       def requestId = execution.getVariable('CVFMI_requestId')
-                       def source = execution.getVariable('CVFMI_source')                      
-                       
-                       // RESTResponse (for API Handler (APIH) Reply Task)
-                       def newVfModuleId = execution.getVariable("newVfModuleId")
-                       String synchResponse = """{"requestReferences":{"instanceId":"${newVfModuleId}","requestId":"${requestId}"}}""".trim()
-
-                       sendWorkflowResponse(execution, 200, synchResponse)
-
-                       execution.setVariable("CVFMI_sentSyncResponse", true)
-                       utils.logAudit("CreateVfModule Infra Response: " + synchResponse)
-                       logDebug('Exited ' + method, isDebugLogEnabled)
-               } catch (BpmnError e) {
-                       throw e;
-               } catch (Exception e) {
-                       logError('Caught exception in ' + method, e)
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
-               }
-       }
-
-       /**
-        *
-        * @param execution the execution
-        */
-       public void postProcessResponse(DelegateExecution execution){
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
-
-               utils.log("DEBUG", " ======== STARTED PostProcessResponse Process ======== ", isDebugEnabled)
-               try{                    
-                       def requestInfo = execution.getVariable("CVFMI_requestInfo")
-                       def action = utils.getNodeText1(requestInfo, "action")
-
-                       utils.log("DEBUG", "requestInfo is: " + requestInfo, isDebugEnabled)
-                       utils.log("DEBUG", "action is: " + action, isDebugEnabled)
-
-                       String payload =
-                                       """  <aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
-                               xmlns:ns="http://org.openecomp/mso/request/types/v1"
-                               xmlns:ns8="http://org.openecomp/mso/workflow/schema/v1">
-                       <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">
-                       ${requestInfo}
-                       </request-info>
-                       <ns8:status-message>Vf Module has been created successfully.</ns8:status-message>
-                       <ns8:mso-bpel-name>BPMN</ns8:mso-bpel-name>
-                       </aetgt:MsoCompletionRequest>"""
-
-                       payload = utils.formatXml(payload)
-                       execution.setVariable("CVFMI_SuccessFlag", true)
-                       execution.setVariable("CVFMI_msoCompletionRequest", payload)
-                       utils.logAudit("CreateVfModuleInfra completion request: " + payload)
-                       utils.log("DEBUG", "Outgoing MsoCompletionRequest: \n" + payload, isDebugEnabled)
-
-               }catch(Exception e){
-                       utils.log("ERROR", "Exception Occured Processing PostProcessResponse. Exception is:\n" + e, isDebugEnabled)
-                       execution.setVariable("CVFMI_ErrorResponse", "Error Occured during PostProcessResponse Method:\n" + e.getMessage())
-               }
-               utils.log("DEBUG", "======== COMPLETED PostProcessResponse Process ======== ", isDebugEnabled)
-       }
-
-
-
-
-
-       /**
-        * Validates the request, request id and service instance id.  If a problem is found,
-        * a WorkflowException is generated and an MSOWorkflowException event is thrown. This
-        * method also sets up the log context for the workflow.
-        * @param execution the execution
-        * @return the validated request
-        */
-       public String validateInfraRequest(DelegateExecution execution) {
-               def method = getClass().getSimpleName() + '.validateInfraRequest(' +
-                       'execution=' + execution.getId() +
-                       ')'
-               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
-               logDebug('Entered ' + method, isDebugLogEnabled)
-
-               String processKey = getProcessKey(execution);
-               def prefix = execution.getVariable("prefix")
-
-               if (prefix == null) {
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " prefix is null")
-               }
-
-               try {
-                       def request = execution.getVariable(prefix + 'Request')
-
-                       if (request == null) {
-                               request = execution.getVariable(processKey + 'Request')
-
-                               if (request == null) {
-                                       request = execution.getVariable('bpmnRequest')
-                               }
-
-                               setVariable(execution, processKey + 'Request', null);
-                               setVariable(execution, 'bpmnRequest', null);
-                               setVariable(execution, prefix + 'Request', request);
-                       }
-
-                       if (request == null) {
-                               exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request is null")
-                       }
-
-                       /*
-
-                       def requestId = execution.getVariable("mso-request-id")
-
-                       if (requestId == null) {
-                               exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request has no mso-request-id")
-                       }
-
-                       setVariable(execution, prefix + 'requestId', requestId)
-
-                       def serviceInstanceId = execution.getVariable("mso-service-instance-id")
-
-                       if (serviceInstanceId == null) {
-                               exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id")
-                       }
-
-                       utils.logContext(requestId, serviceInstanceId)
-                       */
-                       utils.logAudit("CreateVfModule incoming request: " + request)
-                       logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)
-                       logDebug('Exited ' + method, isDebugLogEnabled)
-                       return request
-               } catch (BpmnError e) {
-                       throw e;
-               } catch (Exception e) {
-                       logError('Caught exception in ' + method, e)
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
-               }
-       }
-
-       public void prepareUpdateInfraRequest(DelegateExecution execution){
-               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
-
-               utils.log("DEBUG", " ======== STARTED prepareUpdateInfraRequest Process ======== ", isDebugEnabled)
-               try{
-                       
-                       
-                       String requestInfo = execution.getVariable("CVFMI_requestInfo")                 
-                       def aicCloudRegion      = execution.getVariable("CVFMI_lcpCloudRegionId")
-                       def tenantId = execution.getVariable("CVFMI_tenantId")
-                       def requestId = utils.getNodeText1(requestInfo, "request-id")
-                       def vnfId = execution.getVariable("CVFMI_vnfId")
-                       def vfModuleId = execution.getVariable("CVFMI_vfModuleId")
-                       // vfModuleName may be generated by DoCreateVfModule subprocess if it is not specified on the input
-                       def vfModuleName = execution.getVariable("CVFMI_vfModuleName")
-
-                       def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
-                       execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
-                       utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
-
-                       String payload =
-                               """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
-                                               xmlns:ns="http://org.openecomp.mso/requestsdb">
-                                               <soapenv:Header/>
-                                               <soapenv:Body>
-                                                       <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">
-                                                       <requestId>${requestId}</requestId>
-                                                       <lastModifiedBy>BPMN</lastModifiedBy>
-                                                       <statusMessage>VF Module successfully created</statusMessage>
-                                                       <responseBody></responseBody>
-                                                       <requestStatus>COMPLETE</requestStatus>
-                                                       <progress>100</progress>
-                                                       <vnfOutputs>&lt;vnf-outputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:aetgt="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"&gt;&lt;vnf-id&gt;${vnfId}&lt;/vnf-id&gt;&lt;vf-module-id&gt;${vfModuleId}&lt;/vf-module-id&gt;&lt;/vnf-outputs&gt;</vnfOutputs>
-                                                       <vfModuleId>${vfModuleId}</vfModuleId>
-                                                       <vfModuleName>${vfModuleName}</vfModuleName>
-                                               </ns:updateInfraRequest>
-                                       </soapenv:Body>
-                               </soapenv:Envelope>"""
-
-                       payload = utils.formatXml(payload)
-                       execution.setVariable("CVFMI_updateInfraRequest", payload)
-                       utils.log("DEBUG", "Outgoing UpdateInfraRequest: \n" + payload, isDebugEnabled)
-                       utils.logAudit("CreateVfModuleInfra Outgoing UpdateInfra Request: " + payload)
-
-               }catch(Exception e){
-                       utils.log("ERROR", "Exception Occured Processing prepareUpdateInfraRequest. Exception is:\n" + e, isDebugEnabled)
-                       execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareUpdateInfraRequest Method:\n" + e.getMessage())
-               }
-               utils.log("DEBUG", "======== COMPLETED prepareUpdateInfraRequest Process ======== ", isDebugEnabled)
-       }
-
-       /**
-        * Builds a "FalloutHandler" request and stores it in the specified execution variable.
-        *
-        * @param execution the execution
-        * @param resultVar the execution variable in which the result will be stored
-        */
-       public void falloutHandlerPrep(DelegateExecution execution, String resultVar) {
-               def method = getClass().getSimpleName() + '.falloutHandlerPrep(' +
-                       'execution=' + execution.getId() +
-                       ', resultVar=' + resultVar +
-                       ')'
-               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
-               logDebug('Entered ' + method, isDebugLogEnabled)
-
-
-               try {
-                       def WorkflowException workflowException = execution.getVariable("WorkflowException")                    
-                       def requestInformation = execution.getVariable("CVFMI_requestInfo")
-                       def errorResponseCode = workflowException.getErrorCode()
-                       def errorResponseMsg = workflowException.getErrorMessage()
-                       def encErrorResponseMsg = ""
-                       if (errorResponseMsg != null) {
-                               encErrorResponseMsg = errorResponseMsg.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
-                       }
-
-                       String content = """
-                               <aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
-                                               xmlns:reqtype="http://org.openecomp/mso/request/types/v1"
-                                               xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"
-                                               xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">
-                                               ${requestInformation}
-                                       <aetgt:WorkflowException>
-                                               <aetgt:ErrorMessage>${encErrorResponseMsg}</aetgt:ErrorMessage>
-                                               <aetgt:ErrorCode>${errorResponseCode}</aetgt:ErrorCode>
-                                       </aetgt:WorkflowException>
-                               </aetgt:FalloutHandlerRequest>
-                       """
-
-                       logDebug("CONTENT before translation: " + content, isDebugLogEnabled)
-                       content = utils.formatXml(content)
-                       logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)
-                       utils.logAudit("CreateVfModuleInfra FallOutHander Request: " + content)
-                       execution.setVariable(resultVar, content)
-
-                       logDebug('Exited ' + method, isDebugLogEnabled)
-               } catch (BpmnError e) {
-                       throw e;
-               } catch (Exception e) {
-                       logError('Caught exception in ' + method, e)
-                       exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')
-               }
-       }
-
-       public void logAndSaveOriginalException(DelegateExecution execution) {
-               def method = getClass().getSimpleName() + '.validateRollbackResponse(' +
-                       'execution=' + execution.getId() +
-                       ')'
-               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
-               logDebug('Entered ' + method, isDebugLogEnabled)
-
-               logWorkflowException(execution, 'CreateVfModuleInfra caught an event')
-               saveWorkflowException(execution, 'CVFMI_originalWorkflowException')
-       }
-
-       public void validateRollbackResponse(DelegateExecution execution) {
-               def method = getClass().getSimpleName() + '.validateRollbackResponse(' +
-                       'execution=' + execution.getId() +
-                       ')'
-               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
-               logDebug('Entered ' + method, isDebugLogEnabled)
-
-               def originalException = execution.getVariable("CVFMI_originalWorkflowException")
-               execution.setVariable("WorkflowException", originalException)
-
-               execution.setVariable("RollbackCompleted", true)
-
-       }
-       
-       public void sendErrorResponse(DelegateExecution execution){
-               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
-               utils.log("DEBUG", " *** STARTED CreateVfModulenfra sendErrorResponse Process *** ", isDebugEnabled)
-               try {
-                       def sentSyncResponse = execution.getVariable("CVFMI_sentSyncResponse")
-                       if(sentSyncResponse == false){
-                               WorkflowException wfex = execution.getVariable("WorkflowException")
-                               String response = exceptionUtil.buildErrorResponseXml(wfex)
-
-                               utils.logAudit(response)
-                               sendWorkflowResponse(execution, 500, response)
-                       }else{
-                               utils.log("DEBUG", "Not Sending Error Response.  Sync Response Already Sent", isDebugEnabled)
-                       }
-
-               } catch (Exception ex) {
-                       utils.log("DEBUG", "Error Occured in CreateVfModuleInfra sendErrorResponse Process " + ex.getMessage(), isDebugEnabled)
-                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVfModuleInfra sendErrorResponse Process")
-
-               }
-               utils.log("DEBUG", "*** COMPLETED CreateVfModuleInfra sendErrorResponse Process ***", isDebugEnabled)
-       }
-
-
-}
+/*-\r
+ * ============LICENSE_START=======================================================\r
+ * ONAP - SO\r
+ * ================================================================================\r
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * ================================================================================\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ============LICENSE_END=========================================================\r
+ */\r
+\r
+package org.openecomp.mso.bpmn.infrastructure.scripts;\r
+\r
+import groovy.json.JsonSlurper\r
+import groovy.json.JsonOutput\r
+\r
+import org.camunda.bpm.engine.delegate.BpmnError\r
+import org.camunda.bpm.engine.delegate.DelegateExecution\r
+import org.onap.appc.client.lcm.model.Action\r
+import org.apache.commons.lang3.*\r
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor;\r
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil;\r
+import org.openecomp.mso.bpmn.common.scripts.NetworkUtils;\r
+import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils;\r
+import org.openecomp.mso.bpmn.common.scripts.VidUtils;\r
+import org.openecomp.mso.bpmn.core.RollbackData\r
+import org.openecomp.mso.bpmn.core.WorkflowException\r
+import org.openecomp.mso.bpmn.core.json.JsonUtils\r
+\r
+public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {\r
+\r
+       ExceptionUtil exceptionUtil = new ExceptionUtil()\r
+       JsonUtils jsonUtil = new JsonUtils()\r
+\r
+       /**\r
+        * Validates the request message and sets up the workflow.\r
+        * @param execution the execution\r
+        */\r
+       public void preProcessRequest(DelegateExecution execution) {\r
+               def method = getClass().getSimpleName() + '.preProcessRequest(' +\r
+                       'execution=' + execution.getId() +\r
+                       ')'\r
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')\r
+               logDebug('Entered ' + method, isDebugLogEnabled)\r
+\r
+               execution.setVariable("CVFMI_sentSyncResponse", false)\r
+               \r
+               def prefix = 'CVFMI_'\r
+               logDebug('Entered 1' + method, isDebugLogEnabled)\r
+               execution.setVariable('prefix', prefix)\r
+               logDebug('Entered 2' + method, isDebugLogEnabled)\r
+               execution.setVariable("isVidRequest", "false")\r
+\r
+               logDebug("Set variables", isDebugLogEnabled)\r
+\r
+               def rollbackData = execution.getVariable("RollbackData")\r
+               if (rollbackData == null) {\r
+                       rollbackData = new RollbackData()\r
+               }\r
+               execution.setVariable("RollbackData", rollbackData)\r
+\r
+               logDebug("Set rollback data", isDebugLogEnabled)\r
+               def incomingRequest = execution.getVariable('bpmnRequest')\r
+\r
+               utils.log("DEBUG", "Incoming Infra Request: " + incomingRequest, isDebugLogEnabled)\r
+               utils.logAudit("CreateVfModule Infra incoming Request: " + incomingRequest)\r
+\r
+               setBasicDBAuthHeader(execution, isDebugLogEnabled)\r
+               \r
+               // check if request is xml or json\r
+               try {\r
+                       def jsonSlurper = new JsonSlurper()\r
+                       def jsonOutput = new JsonOutput()\r
+                       Map reqMap = jsonSlurper.parseText(incomingRequest)\r
+                       utils.log("DEBUG", " Request is in JSON format.", isDebugLogEnabled)\r
+\r
+                       def serviceInstanceId = execution.getVariable('serviceInstanceId')\r
+                       def vnfId = execution.getVariable('vnfId')\r
+                       \r
+                       execution.setVariable(prefix + 'serviceInstanceId', serviceInstanceId)\r
+                       execution.setVariable(prefix+'vnfId', vnfId)\r
+                       execution.setVariable("isVidRequest", "true")\r
+                       \r
+                       def vnfName = ''\r
+                       def asdcServiceModelVersion = ''\r
+                       def serviceModelInfo = null\r
+                       def vnfModelInfo = null\r
+                       \r
+                       def relatedInstanceList = reqMap.requestDetails?.relatedInstanceList\r
+                                               \r
+                       if (relatedInstanceList != null) {\r
+                               relatedInstanceList.each {\r
+                                       if (it.relatedInstance.modelInfo?.modelType == 'service') {\r
+                                               asdcServiceModelVersion = it.relatedInstance.modelInfo?.modelVersion\r
+                                               serviceModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo)\r
+                                               \r
+                                       }\r
+                                       if (it.relatedInstance.modelInfo.modelType == 'vnf') {\r
+                                               vnfName = it.relatedInstance.instanceName ?: ''\r
+                                               vnfModelInfo = jsonOutput.toJson(it.relatedInstance.modelInfo)\r
+                                       }\r
+                               }\r
+                       }\r
+                       \r
+                       execution.setVariable(prefix + 'vnfName', vnfName)\r
+                       execution.setVariable(prefix + 'asdcServiceModelVersion', asdcServiceModelVersion)\r
+                       execution.setVariable(prefix + 'serviceModelInfo', serviceModelInfo)\r
+                       execution.setVariable(prefix + 'vnfModelInfo', vnfModelInfo)\r
+                       \r
+                       \r
+                       def vnfType = execution.getVariable('vnfType')\r
+                       execution.setVariable(prefix + 'vnfType', vnfType)      \r
+                       def vfModuleId = execution.getVariable('vfModuleId')\r
+                       execution.setVariable(prefix + 'vfModuleId', vfModuleId)\r
+                       def volumeGroupId = execution.getVariable('volumeGroupId')\r
+                       execution.setVariable(prefix + 'volumeGroupId', volumeGroupId)\r
+                       def userParams = reqMap.requestDetails?.requestParameters?.userParams                                   \r
+                       \r
+                       Map<String, String> userParamsMap = [:]\r
+                       if (userParams != null) {\r
+                               userParams.each { userParam ->\r
+                                       userParamsMap.put(userParam.name, jsonOutput.toJson(userParam.value).toString())\r
+                               }                                                       \r
+                       }               \r
+                                               \r
+                       utils.log("DEBUG", 'Processed user params: ' + userParamsMap, isDebugLogEnabled)                \r
+                       \r
+                       execution.setVariable(prefix + 'vfModuleInputParams', userParamsMap)\r
+                       \r
+                       def isBaseVfModule = "false"\r
+                       if (execution.getVariable('isBaseVfModule') == true) {\r
+                               isBaseVfModule = "true"\r
+                       }                       \r
+                       \r
+                       execution.setVariable(prefix + 'isBaseVfModule', isBaseVfModule)\r
+                                               \r
+                       def requestId = execution.getVariable("mso-request-id")\r
+                       execution.setVariable(prefix + 'requestId', requestId)\r
+                       \r
+                       def vfModuleModelInfo = jsonOutput.toJson(reqMap.requestDetails?.modelInfo)\r
+                       execution.setVariable(prefix + 'vfModuleModelInfo', vfModuleModelInfo)\r
+                       \r
+                       def suppressRollback = reqMap.requestDetails?.requestInfo?.suppressRollback\r
+                       \r
+                       \r
+                       def backoutOnFailure = ""\r
+                       if(suppressRollback != null){\r
+                               if ( suppressRollback == true) {\r
+                                       backoutOnFailure = "false"\r
+                               } else if ( suppressRollback == false) {\r
+                                       backoutOnFailure = "true"\r
+                               }\r
+                       }\r
+                       \r
+                       execution.setVariable('disableRollback', suppressRollback)\r
+                       \r
+                       def vfModuleName = reqMap.requestDetails?.requestInfo?.instanceName ?: null\r
+                       execution.setVariable(prefix + 'vfModuleName', vfModuleName)\r
+                       \r
+                       def serviceId = reqMap.requestDetails?.requestParameters?.serviceId ?: ''\r
+                       execution.setVariable(prefix + 'serviceId', serviceId)\r
+                       \r
+                       def usePreload = reqMap.requestDetails?.requestParameters?.usePreload\r
+                       execution.setVariable(prefix + 'usePreload', usePreload)\r
+                       \r
+                       // This is aLaCarte flow, so aLaCarte flag is always on                         \r
+                       execution.setVariable(prefix + 'aLaCarte', true)\r
+                       \r
+                       def cloudConfiguration = reqMap.requestDetails?.cloudConfiguration\r
+                       def lcpCloudRegionId    = cloudConfiguration.lcpCloudRegionId\r
+                       execution.setVariable(prefix + 'lcpCloudRegionId', lcpCloudRegionId)\r
+                       def tenantId = cloudConfiguration.tenantId\r
+                       execution.setVariable(prefix + 'tenantId', tenantId)\r
+                       \r
+                       def globalSubscriberId = reqMap.requestDetails?.subscriberInfo?.globalSubscriberId ?: ''\r
+                       execution.setVariable(prefix + 'globalSubscriberId', globalSubscriberId)\r
+                       \r
+                       execution.setVariable(prefix + 'sdncVersion', '1702')\r
+\r
+                       execution.setVariable("CreateVfModuleInfraSuccessIndicator", false)\r
+                       execution.setVariable("RollbackCompleted", false)\r
+                       \r
+                       execution.setVariable("isDebugLogEnabled", isDebugLogEnabled)\r
+                       \r
+                       \r
+                       def source = reqMap.requestDetails?.requestInfo?.source\r
+                       execution.setVariable("CVFMI_source", source)\r
+                       \r
+                       //For Completion Handler & Fallout Handler\r
+                       String requestInfo =\r
+                       """<request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">\r
+                                       <request-id>${requestId}</request-id>\r
+                                       <action>CREATE</action>\r
+                                       <source>${source}</source>\r
+                                  </request-info>"""\r
+                       \r
+                       execution.setVariable("CVFMI_requestInfo", requestInfo)\r
+                       \r
+                       //backoutOnFailure\r
+                       \r
+                       execution.setVariable("CVFMI_originalWorkflowException", null)\r
+                       \r
+\r
+                       def newVfModuleId = UUID.randomUUID().toString()\r
+                       execution.setVariable("newVfModuleId", newVfModuleId)\r
+                       execution.setVariable(prefix + 'vfModuleId', newVfModuleId)\r
+                       execution.setVariable('actionHealthCheck', Action.HealthCheck)\r
+                       execution.setVariable('actionConfigScaleOut', Action.ConfigScaleOut)\r
+                       def controllerType = execution.getVariable('controllerType')\r
+                       execution.setVariable(prefix + 'controllerType', controllerType)\r
+                       execution.setVariable('healthCheckIndex0', 0)\r
+\r
+                       logDebug('RequestInfo: ' + execution.getVariable("CVFMI_requestInfo"), isDebugLogEnabled)                       \r
+                       \r
+                       logDebug('rollbackEnabled: ' + execution.getVariable("CVFMI_rollbackEnabled"), isDebugLogEnabled)\r
+\r
+                       logDebug('Exited ' + method, isDebugLogEnabled)\r
+               } catch (BpmnError bpmnError) {\r
+                       throw bpmnError\r
+               }\r
+               catch(groovy.json.JsonException je) {\r
+                       utils.log("DEBUG", " Request is not in JSON format.", isDebugLogEnabled)\r
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest")\r
+               }\r
+               catch(Exception e) {\r
+                       String restFaultMessage = e.getMessage()\r
+                       //execution.setVariable("CVFMODVOL2_RESTFault", restFaultMessage)\r
+                       //execution.setVariable("CVFMODVOL2_isDataOk", false)\r
+                       utils.log("ERROR", " Exception Encountered - " + "\n" + restFaultMessage, isDebugLogEnabled)\r
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest")\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Validates a workflow response.\r
+        * @param execution the execution\r
+        * @param responseVar the execution variable in which the response is stored\r
+        * @param responseCodeVar the execution variable in which the response code is stored\r
+        * @param errorResponseVar the execution variable in which the error response is stored\r
+        */\r
+       public void validateWorkflowResponse(DelegateExecution execution, String responseVar,\r
+                       String responseCodeVar, String errorResponseVar) {\r
+               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)\r
+               sdncAdapterUtils.validateSDNCResponse(execution, responseVar, responseCodeVar, errorResponseVar)\r
+       }\r
+\r
+\r
+       /**\r
+        * Sends the empty, synchronous response back to the API Handler.\r
+        * @param execution the execution\r
+        */\r
+       public void sendResponse(DelegateExecution execution) {\r
+               def method = getClass().getSimpleName() + '.sendResponse(' +\r
+                       'execution=' + execution.getId() +\r
+                       ')'\r
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')\r
+               logDebug('Entered ' + method, isDebugLogEnabled)\r
+\r
+               try {\r
+                       def requestInfo = execution.getVariable('CVFMI_requestInfo')\r
+                       def requestId = execution.getVariable('CVFMI_requestId')\r
+                       def source = execution.getVariable('CVFMI_source')                      \r
+                       \r
+                       // RESTResponse (for API Handler (APIH) Reply Task)\r
+                       def newVfModuleId = execution.getVariable("newVfModuleId")\r
+                       String synchResponse = """{"requestReferences":{"instanceId":"${newVfModuleId}","requestId":"${requestId}"}}""".trim()\r
+\r
+                       sendWorkflowResponse(execution, 200, synchResponse)\r
+\r
+                       execution.setVariable("CVFMI_sentSyncResponse", true)\r
+                       utils.logAudit("CreateVfModule Infra Response: " + synchResponse)\r
+                       logDebug('Exited ' + method, isDebugLogEnabled)\r
+               } catch (BpmnError e) {\r
+                       throw e;\r
+               } catch (Exception e) {\r
+                       logError('Caught exception in ' + method, e)\r
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())\r
+               }\r
+       }\r
+\r
+       /**\r
+        *\r
+        * @param execution the execution\r
+        */\r
+       public void postProcessResponse(DelegateExecution execution){\r
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
+\r
+               utils.log("DEBUG", " ======== STARTED PostProcessResponse Process ======== ", isDebugEnabled)\r
+               try{                    \r
+                       def requestInfo = execution.getVariable("CVFMI_requestInfo")\r
+                       def action = utils.getNodeText1(requestInfo, "action")\r
+\r
+                       utils.log("DEBUG", "requestInfo is: " + requestInfo, isDebugEnabled)\r
+                       utils.log("DEBUG", "action is: " + action, isDebugEnabled)\r
+\r
+                       String payload =\r
+                                       """  <aetgt:MsoCompletionRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"\r
+                               xmlns:ns="http://org.openecomp/mso/request/types/v1"\r
+                               xmlns:ns8="http://org.openecomp/mso/workflow/schema/v1">\r
+                       <request-info xmlns="http://org.openecomp/mso/infra/vnf-request/v1">\r
+                       ${requestInfo}\r
+                       </request-info>\r
+                       <ns8:status-message>Vf Module has been created successfully.</ns8:status-message>\r
+                       <ns8:mso-bpel-name>BPMN</ns8:mso-bpel-name>\r
+                       </aetgt:MsoCompletionRequest>"""\r
+\r
+                       payload = utils.formatXml(payload)\r
+                       execution.setVariable("CVFMI_SuccessFlag", true)\r
+                       execution.setVariable("CVFMI_msoCompletionRequest", payload)\r
+                       utils.logAudit("CreateVfModuleInfra completion request: " + payload)\r
+                       utils.log("DEBUG", "Outgoing MsoCompletionRequest: \n" + payload, isDebugEnabled)\r
+\r
+               }catch(Exception e){\r
+                       utils.log("ERROR", "Exception Occured Processing PostProcessResponse. Exception is:\n" + e, isDebugEnabled)\r
+                       execution.setVariable("CVFMI_ErrorResponse", "Error Occured during PostProcessResponse Method:\n" + e.getMessage())\r
+               }\r
+               utils.log("DEBUG", "======== COMPLETED PostProcessResponse Process ======== ", isDebugEnabled)\r
+       }\r
+\r
+\r
+\r
+\r
+\r
+       /**\r
+        * Validates the request, request id and service instance id.  If a problem is found,\r
+        * a WorkflowException is generated and an MSOWorkflowException event is thrown. This\r
+        * method also sets up the log context for the workflow.\r
+        * @param execution the execution\r
+        * @return the validated request\r
+        */\r
+       public String validateInfraRequest(DelegateExecution execution) {\r
+               def method = getClass().getSimpleName() + '.validateInfraRequest(' +\r
+                       'execution=' + execution.getId() +\r
+                       ')'\r
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')\r
+               logDebug('Entered ' + method, isDebugLogEnabled)\r
+\r
+               String processKey = getProcessKey(execution);\r
+               def prefix = execution.getVariable("prefix")\r
+\r
+               if (prefix == null) {\r
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " prefix is null")\r
+               }\r
+\r
+               try {\r
+                       def request = execution.getVariable(prefix + 'Request')\r
+\r
+                       if (request == null) {\r
+                               request = execution.getVariable(processKey + 'Request')\r
+\r
+                               if (request == null) {\r
+                                       request = execution.getVariable('bpmnRequest')\r
+                               }\r
+\r
+                               setVariable(execution, processKey + 'Request', null);\r
+                               setVariable(execution, 'bpmnRequest', null);\r
+                               setVariable(execution, prefix + 'Request', request);\r
+                       }\r
+\r
+                       if (request == null) {\r
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request is null")\r
+                       }\r
+\r
+                       /*\r
+\r
+                       def requestId = execution.getVariable("mso-request-id")\r
+\r
+                       if (requestId == null) {\r
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request has no mso-request-id")\r
+                       }\r
+\r
+                       setVariable(execution, prefix + 'requestId', requestId)\r
+\r
+                       def serviceInstanceId = execution.getVariable("mso-service-instance-id")\r
+\r
+                       if (serviceInstanceId == null) {\r
+                               exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request message has no mso-service-instance-id")\r
+                       }\r
+\r
+                       utils.logContext(requestId, serviceInstanceId)\r
+                       */\r
+                       utils.logAudit("CreateVfModule incoming request: " + request)\r
+                       logDebug('Incoming message: ' + System.lineSeparator() + request, isDebugLogEnabled)\r
+                       logDebug('Exited ' + method, isDebugLogEnabled)\r
+                       return request\r
+               } catch (BpmnError e) {\r
+                       throw e;\r
+               } catch (Exception e) {\r
+                       logError('Caught exception in ' + method, e)\r
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")\r
+               }\r
+       }\r
+\r
+       public void prepareUpdateInfraRequest(DelegateExecution execution){\r
+               def isDebugEnabled = execution.getVariable("isDebugLogEnabled")\r
+\r
+               utils.log("DEBUG", " ======== STARTED prepareUpdateInfraRequest Process ======== ", isDebugEnabled)\r
+               try{\r
+                       \r
+                       \r
+                       String requestInfo = execution.getVariable("CVFMI_requestInfo")                 \r
+                       def aicCloudRegion      = execution.getVariable("CVFMI_lcpCloudRegionId")\r
+                       def tenantId = execution.getVariable("CVFMI_tenantId")\r
+                       def requestId = utils.getNodeText1(requestInfo, "request-id")\r
+                       def vnfId = execution.getVariable("CVFMI_vnfId")\r
+                       def vfModuleId = execution.getVariable("CVFMI_vfModuleId")\r
+                       // vfModuleName may be generated by DoCreateVfModule subprocess if it is not specified on the input\r
+                       def vfModuleName = execution.getVariable("CVFMI_vfModuleName")\r
+\r
+                       def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")\r
+                       execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)\r
+                       utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)\r
+\r
+                       String payload =\r
+                               """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"\r
+                                               xmlns:ns="http://org.openecomp.mso/requestsdb">\r
+                                               <soapenv:Header/>\r
+                                               <soapenv:Body>\r
+                                                       <ns:updateInfraRequest xmlns:ns="http://org.openecomp.mso/requestsdb">\r
+                                                       <requestId>${requestId}</requestId>\r
+                                                       <lastModifiedBy>BPMN</lastModifiedBy>\r
+                                                       <statusMessage>VF Module successfully created</statusMessage>\r
+                                                       <responseBody></responseBody>\r
+                                                       <requestStatus>COMPLETE</requestStatus>\r
+                                                       <progress>100</progress>\r
+                                                       <vnfOutputs>&lt;vnf-outputs xmlns="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:aetgt="http://org.openecomp/mso/infra/vnf-request/v1" xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"&gt;&lt;vnf-id&gt;${vnfId}&lt;/vnf-id&gt;&lt;vf-module-id&gt;${vfModuleId}&lt;/vf-module-id&gt;&lt;/vnf-outputs&gt;</vnfOutputs>\r
+                                                       <vfModuleId>${vfModuleId}</vfModuleId>\r
+                                                       <vfModuleName>${vfModuleName}</vfModuleName>\r
+                                               </ns:updateInfraRequest>\r
+                                       </soapenv:Body>\r
+                               </soapenv:Envelope>"""\r
+\r
+                       payload = utils.formatXml(payload)\r
+                       execution.setVariable("CVFMI_updateInfraRequest", payload)\r
+                       utils.log("DEBUG", "Outgoing UpdateInfraRequest: \n" + payload, isDebugEnabled)\r
+                       utils.logAudit("CreateVfModuleInfra Outgoing UpdateInfra Request: " + payload)\r
+\r
+               }catch(Exception e){\r
+                       utils.log("ERROR", "Exception Occured Processing prepareUpdateInfraRequest. Exception is:\n" + e, isDebugEnabled)\r
+                       execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareUpdateInfraRequest Method:\n" + e.getMessage())\r
+               }\r
+               utils.log("DEBUG", "======== COMPLETED prepareUpdateInfraRequest Process ======== ", isDebugEnabled)\r
+       }\r
+\r
+       /**\r
+        * Builds a "FalloutHandler" request and stores it in the specified execution variable.\r
+        *\r
+        * @param execution the execution\r
+        * @param resultVar the execution variable in which the result will be stored\r
+        */\r
+       public void falloutHandlerPrep(DelegateExecution execution, String resultVar) {\r
+               def method = getClass().getSimpleName() + '.falloutHandlerPrep(' +\r
+                       'execution=' + execution.getId() +\r
+                       ', resultVar=' + resultVar +\r
+                       ')'\r
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')\r
+               logDebug('Entered ' + method, isDebugLogEnabled)\r
+\r
+\r
+               try {\r
+                       def WorkflowException workflowException = execution.getVariable("WorkflowException")                    \r
+                       def requestInformation = execution.getVariable("CVFMI_requestInfo")\r
+                       def errorResponseCode = workflowException.getErrorCode()\r
+                       def errorResponseMsg = workflowException.getErrorMessage()\r
+                       def encErrorResponseMsg = ""\r
+                       if (errorResponseMsg != null) {\r
+                               encErrorResponseMsg = errorResponseMsg.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")\r
+                       }\r
+\r
+                       String content = """\r
+                               <aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"\r
+                                               xmlns:reqtype="http://org.openecomp/mso/request/types/v1"\r
+                                               xmlns:msoservtypes="http://org.openecomp/mso/request/types/v1"\r
+                                               xmlns:structuredtypes="http://org.openecomp/mso/structured/types/v1">\r
+                                               ${requestInformation}\r
+                                       <aetgt:WorkflowException>\r
+                                               <aetgt:ErrorMessage>${encErrorResponseMsg}</aetgt:ErrorMessage>\r
+                                               <aetgt:ErrorCode>${errorResponseCode}</aetgt:ErrorCode>\r
+                                       </aetgt:WorkflowException>\r
+                               </aetgt:FalloutHandlerRequest>\r
+                       """\r
+\r
+                       logDebug("CONTENT before translation: " + content, isDebugLogEnabled)\r
+                       content = utils.formatXml(content)\r
+                       logDebug(resultVar + ' = ' + System.lineSeparator() + content, isDebugLogEnabled)\r
+                       utils.logAudit("CreateVfModuleInfra FallOutHander Request: " + content)\r
+                       execution.setVariable(resultVar, content)\r
+\r
+                       logDebug('Exited ' + method, isDebugLogEnabled)\r
+               } catch (BpmnError e) {\r
+                       throw e;\r
+               } catch (Exception e) {\r
+                       logError('Caught exception in ' + method, e)\r
+                       exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')\r
+               }\r
+       }\r
+\r
+       public void logAndSaveOriginalException(DelegateExecution execution) {\r
+               def method = getClass().getSimpleName() + '.validateRollbackResponse(' +\r
+                       'execution=' + execution.getId() +\r
+                       ')'\r
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')\r
+               logDebug('Entered ' + method, isDebugLogEnabled)\r
+\r
+               logWorkflowException(execution, 'CreateVfModuleInfra caught an event')\r
+               saveWorkflowException(execution, 'CVFMI_originalWorkflowException')\r
+       }\r
+\r
+       public void validateRollbackResponse(DelegateExecution execution) {\r
+               def method = getClass().getSimpleName() + '.validateRollbackResponse(' +\r
+                       'execution=' + execution.getId() +\r
+                       ')'\r
+               def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')\r
+               logDebug('Entered ' + method, isDebugLogEnabled)\r
+\r
+               def originalException = execution.getVariable("CVFMI_originalWorkflowException")\r
+               execution.setVariable("WorkflowException", originalException)\r
+\r
+               execution.setVariable("RollbackCompleted", true)\r
+\r
+       }\r
+       \r
+       public void sendErrorResponse(DelegateExecution execution){\r
+               def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
+\r
+               utils.log("DEBUG", " *** STARTED CreateVfModulenfra sendErrorResponse Process *** ", isDebugEnabled)\r
+               try {\r
+                       def sentSyncResponse = execution.getVariable("CVFMI_sentSyncResponse")\r
+                       if(sentSyncResponse == false){\r
+                               WorkflowException wfex = execution.getVariable("WorkflowException")\r
+                               String response = exceptionUtil.buildErrorResponseXml(wfex)\r
+\r
+                               utils.logAudit(response)\r
+                               sendWorkflowResponse(execution, 500, response)\r
+                       }else{\r
+                               utils.log("DEBUG", "Not Sending Error Response.  Sync Response Already Sent", isDebugEnabled)\r
+                       }\r
+\r
+               } catch (Exception ex) {\r
+                       utils.log("DEBUG", "Error Occured in CreateVfModuleInfra sendErrorResponse Process " + ex.getMessage(), isDebugEnabled)\r
+                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVfModuleInfra sendErrorResponse Process")\r
+\r
+               }\r
+               utils.log("DEBUG", "*** COMPLETED CreateVfModuleInfra sendErrorResponse Process ***", isDebugEnabled)\r
+       }\r
+\r
+\r
+}\r
index 4ad58fb..267673d 100644 (file)
@@ -137,8 +137,8 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
                        String serviceInstanceName = execution.getVariable("serviceInstanceName")
                        String serviceInstanceId = execution.getVariable("serviceInstanceId")
                        String uuiRequest = execution.getVariable("uuiRequest")
-                       String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceDefId")
-                       String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.templateId")
+                       String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceInvariantUuid")
+                       String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid")
                        String serviceModelName = jsonUtil.getJsonValue(uuiRequest, "service.parameters.templateName")
                        execution.setVariable("serviceModelName", serviceModelName)
                        //aai serviceType and Role can be setted as fixed value now.
@@ -189,7 +189,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
         def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
 
         try {
-            utils.log("DEBUG", " ***** Inside prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled)
+            utils.log("INFO", " ***** Inside prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled)
             String modelInvariantUuid = execution.getVariable("modelInvariantUuid")
             String modelUuid = execution.getVariable("modelUuid")
             //here modelVersion is not set, we use modelUuid to decompose the service.
@@ -211,12 +211,12 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
     public void processDecomposition(DelegateExecution execution) {
         def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
     
-        utils.log("DEBUG", " ***** Inside processDecomposition() of  create generic e2e service flow ***** ", isDebugEnabled)    
+        utils.log("INFO", " ***** Inside processDecomposition() of  create generic e2e service flow ***** ", isDebugEnabled)
         try {
             ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
         } catch (Exception ex) {
             String exceptionMessage = "Bpmn error encountered in  create generic e2e service flow. processDecomposition() - " + ex.getMessage()
-            utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+            utils.log("INFO", exceptionMessage, isDebugEnabled)
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
         }
     }
@@ -396,7 +396,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
         utils.log("INFO", " ======== STARTED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
         try{
             String serviceId = execution.getVariable("serviceInstanceId")
-            String operationId = execution.getVariable("operationId")
+            String operationId = execution.getVariable("msoRequestId")
             String operationType = execution.getVariable("operationType")
             String resourceTemplateUUIDs = ""
             String result = "processing"
index a53540a..93f8659 100644 (file)
@@ -137,6 +137,7 @@ public class DoCreateResources extends AbstractServiceTaskProcessor
            def currentIndex = execution.getVariable("currentResourceIndex")
            List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList")  
            Resource currentResource = sequencedResourceList.get(currentIndex)
+        execution.setVariable("resourceType", currentResource.getModelInfo().getModelName())
            utils.log("INFO", "Now we deal with resouce:" + currentResource.getModelInfo().getModelName(), isDebugEnabled)  
         utils.log("INFO", "======== COMPLETED getCurrentResoure Process ======== ", isDebugEnabled)  
     }
@@ -161,6 +162,7 @@ public class DoCreateResources extends AbstractServiceTaskProcessor
                 utils.log("INFO", "======== Start prepareResourceRecipeRequest Process ======== ", isDebugEnabled)
                 ResourceInput resourceInput = new ResourceInput()
                 String serviceInstanceName = execution.getVariable("serviceInstanceName")
+         String resourceType = execution.getVariable("resourceType")
                 String resourceInstanceName = resourceType + "_" + serviceInstanceName
                 resourceInput.setResourceInstanceName(resourceInstanceName)
                 utils.log("INFO", "Prepare Resource Request resourceInstanceName:" + resourceInstanceName, isDebugEnabled)
@@ -183,8 +185,8 @@ public class DoCreateResources extends AbstractServiceTaskProcessor
                 
                 String incomingRequest = execution.getVariable("uuiRequest")
                 //set the requestInputs from tempalte  To Be Done
-                String serviceModelUuid = execution.getVariable("modelUuid")            
-                String serviceParameters = jsonUtil.getJsonValue(incomingRequest, "service.parameters")
+                String serviceModelUuid = jsonUtil.getJsonValue(incomingRequest,"service.serviceUuid")
+         String serviceParameters = jsonUtil.getJsonValue(incomingRequest, "service.parameters")
                 String resourceParameters = ResourceRequestBuilder.buildResourceRequestParameters(execution, serviceModelUuid, resourceCustomizationUuid, serviceParameters)
                 resourceInput.setResourceParameters(resourceParameters)
                 execution.setVariable("resourceInput", resourceInput)
index 074b48a..7aecd23 100644 (file)
@@ -30,11 +30,11 @@ ex.processJavaException(execution)]]></bpmn:script>
         <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
         <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
         <camunda:in source="productFamilyId" target="productFamilyId" />
-        <camunda:in source="disableRollback" target="disableRollback" />
+        <camunda:in source="modelInvariantIdTarget" target="modelInvariantIdTarget" />
         <camunda:in source="uuiRequest" target="uuiRequest" />
         <camunda:out source="rolledBack" target="rolledBack" />
-        <camunda:out source="serviceInstanceName" target="serviceInstanceName" />
-        <camunda:in source="failIfExists" target="failIfExists" />
+        <camunda:out source="compareModelsResult" target="compareModelsResult" />
+        <camunda:in source="modelVersionIdTarget" target="modelVersionIdTarget" />
         <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
         <camunda:in source="serviceType" target="serviceType" />
         <camunda:in source="initialStatus" target="initialStatus" />
index 99244c5..c0637a3 100644 (file)
@@ -22,7 +22,7 @@ ex.processJavaException(execution)]]></bpmn:script>
       <bpmn:sequenceFlow id="SequenceFlow_1dsbjjb" name="" sourceRef="StartEvent_0v1ffn4" targetRef="ScriptTask_0u3lw39" />
       <bpmn:sequenceFlow id="SequenceFlow_1yay321" name="" sourceRef="ScriptTask_0u3lw39" targetRef="EndEvent_0eznq6x" />
     </bpmn:subProcess>
-    <bpmn:callActivity id="DoCreateE2EServiceInstance" name="Call DoCreateE2EServiceInstance&#10;" calledElement="DoCreateE2EServiceInstance">
+    <bpmn:callActivity id="DoCreateE2EServiceInstance" name="Call DoCreateE2EServiceInstance&#10;" calledElement="DoCreateE2EServiceInstanceV3">
       <bpmn:extensionElements>
         <camunda:out source="WorkflowException" target="WorkflowException" />
         <camunda:in source="msoRequestId" target="msoRequestId" />
@@ -41,6 +41,8 @@ ex.processJavaException(execution)]]></bpmn:script>
         <camunda:in sourceExpression="1610" target="sdncVersion" />
         <camunda:in source="initialStatus" target="initialStatus" />
         <camunda:in source="serviceType" target="serviceType" />
+        <camunda:in source="uuiRequest" target="uuiRequest" />
+        <camunda:in source="requestAction" target="operationType" />
       </bpmn:extensionElements>
       <bpmn:incoming>SequenceFlow_19eilro</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_0klbpxx</bpmn:outgoing>
index 0abbdd1..70cfa7d 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_pNTO8MRhEeWv36YLr7PC3Q" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_pNTO8MRhEeWv36YLr7PC3Q" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
   <bpmn2:process id="CreateVfModuleInfra" name="CreateVfModuleInfra" isExecutable="true">
     <bpmn2:startEvent id="StartEvent_1" name="Start">
       <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
         <camunda:in source="CVFMI_vfModuleInputParams" target="vfModuleInputParams" />
         <camunda:in source="CVFMI_aLaCarte" target="aLaCarte" />
       </bpmn2:extensionElements>
-      <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+      <bpmn2:incoming>SequenceFlow_1vx081s</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
     </bpmn2:callActivity>
     <bpmn2:scriptTask id="SendResponse" name="Send Response" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
-      <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def createVfModule = new CreateVfModuleInfra()
+      <bpmn2:outgoing>SequenceFlow_0e2ta6w</bpmn2:outgoing>
+      <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*\r
+def createVfModule = new CreateVfModuleInfra()\r
 createVfModule.sendResponse(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
-    <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="SendResponse" targetRef="DoCreateVfModuleSubprocess" />
     <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1" name="To FinishLine">
       <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
       <bpmn2:linkEventDefinition id="_LinkEventDefinition_34" name="FinishLine" />
@@ -63,8 +62,8 @@ createVfModule.sendResponse(execution)]]></bpmn2:script>
     <bpmn2:scriptTask id="PrepareUpdateInfraRequest" name="Prepare Update Infra Request" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def createVfModule = new CreateVfModuleInfra()
+      <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*\r
+def createVfModule = new CreateVfModuleInfra()\r
 createVfModule.prepareUpdateInfraRequest(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:serviceTask id="ServiceTask_1" name="Update Infra Request">
@@ -87,15 +86,14 @@ createVfModule.prepareUpdateInfraRequest(execution)]]></bpmn2:script>
         </camunda:connector>
       </bpmn2:extensionElements>
       <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
-      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
+      <bpmn2:outgoing>SequenceFlow_1crl7uf</bpmn2:outgoing>
     </bpmn2:serviceTask>
     <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="PrepareUpdateInfraRequest" targetRef="ServiceTask_1" />
-    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="ServiceTask_1" targetRef="UpdateInfraRequestResponseCheck" />
     <bpmn2:scriptTask id="PrepareMSOCompletionHandler" name="Prepare MSO Completion Handler" scriptFormat="groovy">
-      <bpmn2:incoming>updateInfraRequestResponseGood</bpmn2:incoming>
+      <bpmn2:incoming>SequenceFlow_0td7d9m</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def createVfModule = new CreateVfModuleInfra()
+      <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*\r
+def createVfModule = new CreateVfModuleInfra()\r
 createVfModule.postProcessResponse(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="PrepareMSOCompletionHandler" targetRef="MSOCompletionHandler" />
@@ -112,12 +110,12 @@ createVfModule.postProcessResponse(execution)]]></bpmn2:script>
       <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
     </bpmn2:callActivity>
     <bpmn2:exclusiveGateway id="UpdateInfraRequestResponseCheck" name="Success? " default="updateInfraRequestResponseBad">
-      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
+      <bpmn2:incoming>SequenceFlow_1crl7uf</bpmn2:incoming>
       <bpmn2:outgoing>updateInfraRequestResponseBad</bpmn2:outgoing>
       <bpmn2:outgoing>updateInfraRequestResponseGood</bpmn2:outgoing>
     </bpmn2:exclusiveGateway>
     <bpmn2:sequenceFlow id="updateInfraRequestResponseBad" name="no" sourceRef="UpdateInfraRequestResponseCheck" targetRef="EndEvent_2" />
-    <bpmn2:sequenceFlow id="updateInfraRequestResponseGood" name="yes" sourceRef="UpdateInfraRequestResponseCheck" targetRef="PrepareMSOCompletionHandler">
+    <bpmn2:sequenceFlow id="updateInfraRequestResponseGood" name="yes" sourceRef="UpdateInfraRequestResponseCheck" targetRef="CallActivity_17ukiqm">
       <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CVFMI_dbResponseCode" ) == '200'}]]></bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
     <bpmn2:endEvent id="EndEvent_2">
@@ -147,8 +145,8 @@ createVfModule.postProcessResponse(execution)]]></bpmn2:script>
       <bpmn2:scriptTask id="PrepareFalloutHandler" name="Prepare Fallout Handler" scriptFormat="groovy">
         <bpmn2:incoming>SequenceFlow_018p5wf</bpmn2:incoming>
         <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
-        <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def cvfm = new CreateVfModuleInfra()
+        <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*\r
+def cvfm = new CreateVfModuleInfra()\r
 cvfm.falloutHandlerPrep(execution, 'CVFMI_FalloutHandlerRequest')]]></bpmn2:script>
       </bpmn2:scriptTask>
       <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PrepareFalloutHandler" targetRef="FalloutHandler" />
@@ -157,8 +155,8 @@ cvfm.falloutHandlerPrep(execution, 'CVFMI_FalloutHandlerRequest')]]></bpmn2:scri
       <bpmn2:scriptTask id="SendErrorResponse" name="Send Error Response" scriptFormat="groovy">
         <bpmn2:incoming>SequenceFlow_0wsgnab</bpmn2:incoming>
         <bpmn2:outgoing>SequenceFlow_018p5wf</bpmn2:outgoing>
-        <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def createVfModule = new CreateVfModuleInfra()
+        <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*\r
+def createVfModule = new CreateVfModuleInfra()\r
 createVfModule.sendErrorResponse(execution)]]></bpmn2:script>
       </bpmn2:scriptTask>
     </bpmn2:subProcess>
@@ -185,8 +183,8 @@ createVfModule.sendErrorResponse(execution)]]></bpmn2:script>
     <bpmn2:scriptTask id="PreProcessRequest" name="Pre-Process Request" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def createVfModule = new CreateVfModuleInfra()
+      <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*\r
+def createVfModule = new CreateVfModuleInfra()\r
 createVfModule.preProcessRequest(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="PreProcessRequest" targetRef="SendResponse" />
@@ -194,8 +192,8 @@ createVfModule.preProcessRequest(execution)]]></bpmn2:script>
       <bpmn2:scriptTask id="ProcessError" name="Process Error" scriptFormat="groovy">
         <bpmn2:incoming>SequenceFlow_1qvgrvq</bpmn2:incoming>
         <bpmn2:outgoing>SequenceFlow_1jqizzo</bpmn2:outgoing>
-        <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
+        <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*\r
+ExceptionUtil exceptionUtil = new ExceptionUtil()\r
 exceptionUtil.processJavaException(execution)]]></bpmn2:script>
       </bpmn2:scriptTask>
       <bpmn2:endEvent id="EndEvent_0100eju">
@@ -208,6 +206,71 @@ exceptionUtil.processJavaException(execution)]]></bpmn2:script>
       <bpmn2:sequenceFlow id="SequenceFlow_1qvgrvq" name="" sourceRef="StartEvent_1mov8he" targetRef="ProcessError" />
       <bpmn2:sequenceFlow id="SequenceFlow_1jqizzo" name="" sourceRef="ProcessError" targetRef="EndEvent_0100eju" />
     </bpmn2:subProcess>
+    <bpmn2:callActivity id="CallActivity_0i3men0" name="APP-C Healthcheck" calledElement="AppCClient">
+      <bpmn2:extensionElements>
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+        <camunda:in source="actionHealthCheck" target="action" />
+        <camunda:in source="CVFMI_vnfId" target="vnfId" />
+        <camunda:in source="CVFMI_requestId" target="msoRequestId" />
+        <camunda:in source="CVFMI_vnfName" target="vnfName" />
+        <camunda:in source="CVFMO_controllerType" target="controllerType" />
+        <camunda:in source="healthCheckIndex0" target="healthCheckIndex" />
+        <camunda:out source="errorCode" target="errorCode" />
+        <camunda:out source="errorText" target="errorText" />
+        <camunda:out source="workStep" target="workStep" />
+        <camunda:out source="failedActivity" target="failedActivity" />
+      </bpmn2:extensionElements>
+      <bpmn2:incoming>SequenceFlow_0e2ta6w</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_07llpjo</bpmn2:outgoing>
+    </bpmn2:callActivity>
+    <bpmn2:sequenceFlow id="SequenceFlow_0e2ta6w" sourceRef="SendResponse" targetRef="CallActivity_0i3men0" />
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_09h60ub" name="Error on Pre Health Check?" default="SequenceFlow_1vx081s">
+      <bpmn2:incoming>SequenceFlow_07llpjo</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_1vx081s</bpmn2:outgoing>
+      <bpmn2:outgoing>SequenceFlow_0nszq2o</bpmn2:outgoing>
+    </bpmn2:exclusiveGateway>
+    <bpmn2:sequenceFlow id="SequenceFlow_1vx081s" name="no" sourceRef="ExclusiveGateway_09h60ub" targetRef="DoCreateVfModuleSubprocess" />
+    <bpmn2:sequenceFlow id="SequenceFlow_07llpjo" sourceRef="CallActivity_0i3men0" targetRef="ExclusiveGateway_09h60ub" />
+    <bpmn2:endEvent id="EndEvent_0n6bb71">
+      <bpmn2:incoming>SequenceFlow_0nszq2o</bpmn2:incoming>
+      <bpmn2:errorEventDefinition errorRef="Error_1" />
+    </bpmn2:endEvent>
+    <bpmn2:sequenceFlow id="SequenceFlow_0nszq2o" name="yes" sourceRef="ExclusiveGateway_09h60ub" targetRef="EndEvent_0n6bb71">
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorCode") != "0"]]></bpmn2:conditionExpression>
+    </bpmn2:sequenceFlow>
+    <bpmn2:callActivity id="CallActivity_17ukiqm" name="APP-C ConfigScaleOut" calledElement="AppCClient">
+      <bpmn2:extensionElements>
+        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+        <camunda:in source="actionConfigScaleOut" target="action" />
+        <camunda:in source="CVFMI_vnfId" target="vnfId" />
+        <camunda:in source="CVFMI_requestId" target="msoRequestId" />
+        <camunda:in source="CVFMI_vnfName" target="vnfName" />
+        <camunda:in source="CVFMO_controllerType" target="controllerType" />
+        <camunda:in source="healthCheckIndex0" target="healthCheckIndex" />
+        <camunda:out source="errorCode" target="errorConfigScaleOutCode" />
+        <camunda:out source="errorText" target="errorText" />
+        <camunda:out source="workStep" target="workStep" />
+        <camunda:out source="failedActivity" target="failedActivity" />
+        <camunda:in source="CVFMI_vfModuleId" target="vfModuleId" />
+      </bpmn2:extensionElements>
+      <bpmn2:incoming>updateInfraRequestResponseGood</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_1tk5ru7</bpmn2:outgoing>
+    </bpmn2:callActivity>
+    <bpmn2:sequenceFlow id="SequenceFlow_1crl7uf" sourceRef="ServiceTask_1" targetRef="UpdateInfraRequestResponseCheck" />
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1hncvjy" name="Error on ConfigScaleOut?" default="SequenceFlow_0td7d9m">
+      <bpmn2:incoming>SequenceFlow_1tk5ru7</bpmn2:incoming>
+      <bpmn2:outgoing>SequenceFlow_0td7d9m</bpmn2:outgoing>
+      <bpmn2:outgoing>SequenceFlow_0h5cld9</bpmn2:outgoing>
+    </bpmn2:exclusiveGateway>
+    <bpmn2:sequenceFlow id="SequenceFlow_1tk5ru7" sourceRef="CallActivity_17ukiqm" targetRef="ExclusiveGateway_1hncvjy" />
+    <bpmn2:sequenceFlow id="SequenceFlow_0td7d9m" name="no" sourceRef="ExclusiveGateway_1hncvjy" targetRef="PrepareMSOCompletionHandler" />
+    <bpmn2:endEvent id="EndEvent_0a97jcr">
+      <bpmn2:incoming>SequenceFlow_0h5cld9</bpmn2:incoming>
+      <bpmn2:errorEventDefinition errorRef="Error_1" />
+    </bpmn2:endEvent>
+    <bpmn2:sequenceFlow id="SequenceFlow_0h5cld9" name="yes" sourceRef="ExclusiveGateway_1hncvjy" targetRef="EndEvent_0a97jcr">
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy"><![CDATA[execution.getVariable("errorConfigScaleOutCode") != "0"]]></bpmn2:conditionExpression>
+    </bpmn2:sequenceFlow>
   </bpmn2:process>
   <bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
   <bpmn2:error id="Error_2" name="REST Fault" errorCode="RESTFault" />
@@ -218,40 +281,41 @@ exceptionUtil.processJavaException(execution)]]></bpmn2:script>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ScriptTask_124">
         <di:waypoint xsi:type="dc:Point" x="77" y="249" />
-        <di:waypoint xsi:type="dc:Point" x="226" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="142" y="249" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="99" y="249" width="6" height="6" />
+          <dc:Bounds x="110" y="234" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_124" bpmnElement="PreProcessRequest">
-        <dc:Bounds x="226" y="209" width="100" height="80" />
+        <dc:Bounds x="142" y="209" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_86" bpmnElement="SendResponse">
-        <dc:Bounds x="432" y="209" width="100" height="80" />
+        <dc:Bounds x="309" y="209" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_124" targetElement="_BPMNShape_ServiceTask_86">
-        <di:waypoint xsi:type="dc:Point" x="326" y="249" />
-        <di:waypoint xsi:type="dc:Point" x="432" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="242" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="309" y="249" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="348" y="249" width="6" height="6" />
+          <dc:Bounds x="276" y="234" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_178" bpmnElement="DoCreateVfModuleSubprocess">
-        <dc:Bounds x="612" y="209" width="145" height="80" />
+        <dc:Bounds x="816" y="209" width="145" height="80" />
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ServiceTask_86" targetElement="_BPMNShape_ScriptTask_178">
-        <di:waypoint xsi:type="dc:Point" x="532" y="249" />
-        <di:waypoint xsi:type="dc:Point" x="612" y="249" />
-      </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_47" bpmnElement="IntermediateThrowEvent_1">
-        <dc:Bounds x="823" y="231" width="36" height="36" />
+        <dc:Bounds x="1031" y="231" width="36" height="36" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="841" y="272" width="0" height="0" />
+          <dc:Bounds x="1016" y="272" width="65" height="13" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_178" targetElement="_BPMNShape_IntermediateThrowEvent_47">
-        <di:waypoint xsi:type="dc:Point" x="756" y="249" />
-        <di:waypoint xsi:type="dc:Point" x="823" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="961" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="995" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="995" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="1031" y="249" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1010" y="249" width="0" height="0" />
+        </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_32" bpmnElement="IntermediateCatchEvent_1">
         <dc:Bounds x="39" y="349" width="36" height="36" />
@@ -266,27 +330,27 @@ exceptionUtil.processJavaException(execution)]]></bpmn2:script>
         <dc:Bounds x="277" y="327" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_179" bpmnElement="UpdateInfraRequestResponseCheck" isMarkerVisible="true">
-        <dc:Bounds x="443" y="341" width="50" height="50" />
+        <dc:Bounds x="406" y="342" width="50" height="50" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="435" y="308" width="68" height="22" />
+          <dc:Bounds x="407" y="309" width="49" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_220" bpmnElement="PrepareMSOCompletionHandler">
-        <dc:Bounds x="552" y="327" width="100" height="80" />
+        <dc:Bounds x="810" y="327" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_221" bpmnElement="MSOCompletionHandler">
-        <dc:Bounds x="708" y="327" width="100" height="80" />
+        <dc:Bounds x="948" y="327" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_1">
-        <dc:Bounds x="1020" y="349" width="36" height="36" />
+        <dc:Bounds x="1237" y="349" width="36" height="36" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="1038" y="390" width="0" height="0" />
+          <dc:Bounds x="1210" y="390" width="90" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="_BPMNShape_EndEvent_178" bpmnElement="EndEvent_2">
-        <dc:Bounds x="452" y="469" width="36" height="36" />
+        <dc:Bounds x="413" y="454" width="36" height="36" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="470" y="510" width="0" height="0" />
+          <dc:Bounds x="386" y="495" width="90" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_IntermediateCatchEvent_32" targetElement="_BPMNShape_ScriptTask_219">
@@ -300,38 +364,25 @@ exceptionUtil.processJavaException(execution)]]></bpmn2:script>
         <di:waypoint xsi:type="dc:Point" x="227" y="367" />
         <di:waypoint xsi:type="dc:Point" x="277" y="367" />
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ServiceTask_103" targetElement="_BPMNShape_ExclusiveGateway_179">
-        <di:waypoint xsi:type="dc:Point" x="377" y="367" />
-        <di:waypoint xsi:type="dc:Point" x="410" y="367" />
-        <di:waypoint xsi:type="dc:Point" x="410" y="366" />
-        <di:waypoint xsi:type="dc:Point" x="443" y="366" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="407" y="366" width="6" height="6" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="updateInfraRequestResponseBad" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="_BPMNShape_EndEvent_178">
-        <di:waypoint xsi:type="dc:Point" x="468" y="391" />
-        <di:waypoint xsi:type="dc:Point" x="469" y="421" />
-        <di:waypoint xsi:type="dc:Point" x="470" y="421" />
-        <di:waypoint xsi:type="dc:Point" x="470" y="469" />
+        <di:waypoint xsi:type="dc:Point" x="430" y="391" />
+        <di:waypoint xsi:type="dc:Point" x="431" y="454" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="459" y="419" width="20" height="22" />
+          <dc:Bounds x="423.56413838294776" y="426.8392769104355" width="12" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="updateInfraRequestResponseGood" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="_BPMNShape_ScriptTask_220">
-        <di:waypoint xsi:type="dc:Point" x="493" y="366" />
-        <di:waypoint xsi:type="dc:Point" x="523" y="366" />
-        <di:waypoint xsi:type="dc:Point" x="523" y="367" />
-        <di:waypoint xsi:type="dc:Point" x="552" y="367" />
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="updateInfraRequestResponseGood" sourceElement="_BPMNShape_ExclusiveGateway_179" targetElement="CallActivity_17ukiqm_di">
+        <di:waypoint xsi:type="dc:Point" x="456" y="367" />
+        <di:waypoint xsi:type="dc:Point" x="525" y="367" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="510" y="367" width="27" height="22" />
+          <dc:Bounds x="482.10526315789474" y="367.00000000000006" width="18" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_ScriptTask_220" targetElement="_BPMNShape_ScriptTask_221">
-        <di:waypoint xsi:type="dc:Point" x="652" y="367" />
-        <di:waypoint xsi:type="dc:Point" x="708" y="367" />
+        <di:waypoint xsi:type="dc:Point" x="910" y="367" />
+        <di:waypoint xsi:type="dc:Point" x="948" y="367" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="678" y="367" width="6" height="6" />
+          <dc:Bounds x="884" y="349" width="90" height="6" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="_BPMNShape_SubProcess_20" bpmnElement="ErrorHandler" isExpanded="true">
@@ -389,15 +440,21 @@ exceptionUtil.processJavaException(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_241" bpmnElement="SetSuccessIndicator">
-        <dc:Bounds x="858" y="328" width="103" height="79" />
+        <dc:Bounds x="1105" y="327" width="103" height="79" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_221" targetElement="_BPMNShape_ScriptTask_241">
-        <di:waypoint xsi:type="dc:Point" x="808" y="367" />
-        <di:waypoint xsi:type="dc:Point" x="858" y="367" />
+        <di:waypoint xsi:type="dc:Point" x="1048" y="367" />
+        <di:waypoint xsi:type="dc:Point" x="1105" y="366" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1031.5" y="341.5" width="90" height="20" />
+        </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_241" targetElement="_BPMNShape_EndEvent_177">
-        <di:waypoint xsi:type="dc:Point" x="960" y="367" />
-        <di:waypoint xsi:type="dc:Point" x="1020" y="367" />
+        <di:waypoint xsi:type="dc:Point" x="1208" y="367" />
+        <di:waypoint xsi:type="dc:Point" x="1237" y="367" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1177.5" y="342" width="90" height="20" />
+        </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="SubProcess_0pgv3l6_di" bpmnElement="SubProcess_0pgv3l6" isExpanded="true">
         <dc:Bounds x="160" y="1001" width="313" height="169" />
@@ -450,6 +507,98 @@ exceptionUtil.processJavaException(execution)]]></bpmn2:script>
       <bpmndi:BPMNShape id="ScriptTask_036ipyg_di" bpmnElement="SendErrorResponse">
         <dc:Bounds x="296" y="698" width="100" height="80" />
       </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="CallActivity_0i3men0_di" bpmnElement="CallActivity_0i3men0">
+        <dc:Bounds x="478" y="209" width="145" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_0e2ta6w_di" bpmnElement="SequenceFlow_0e2ta6w">
+        <di:waypoint xsi:type="dc:Point" x="409" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="478" y="249" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="444" y="224" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ExclusiveGateway_09h60ub_di" bpmnElement="ExclusiveGateway_09h60ub" isMarkerVisible="true">
+        <dc:Bounds x="690.4550758459743" y="224.00350058343057" width="50" height="50" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="679" y="274.00350058343054" width="73" height="25" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1vx081s_di" bpmnElement="SequenceFlow_1vx081s">
+        <di:waypoint xsi:type="dc:Point" x="740" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="775" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="775" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="816" y="249" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="784" y="249" width="12" height="13" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_07llpjo_di" bpmnElement="SequenceFlow_07llpjo">
+        <di:waypoint xsi:type="dc:Point" x="623" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="653" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="653" y="249" />
+        <di:waypoint xsi:type="dc:Point" x="690" y="249" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="668" y="249" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="EndEvent_0n6bb71_di" bpmnElement="EndEvent_0n6bb71">
+        <dc:Bounds x="697" y="118" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="715" y="159" width="0" height="0" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_0nszq2o_di" bpmnElement="SequenceFlow_0nszq2o">
+        <di:waypoint xsi:type="dc:Point" x="715" y="224" />
+        <di:waypoint xsi:type="dc:Point" x="715" y="154" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="721" y="179" width="17" height="13" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="CallActivity_17ukiqm_di" bpmnElement="CallActivity_17ukiqm">
+        <dc:Bounds x="525" y="327" width="145" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1crl7uf_di" bpmnElement="SequenceFlow_1crl7uf">
+        <di:waypoint xsi:type="dc:Point" x="377" y="367" />
+        <di:waypoint xsi:type="dc:Point" x="406" y="367" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="391.5" y="346" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ExclusiveGateway_1hncvjy_di" bpmnElement="ExclusiveGateway_1hncvjy" isMarkerVisible="true">
+        <dc:Bounds x="712" y="342" width="50" height="50" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="696" y="308" width="82" height="24" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1tk5ru7_di" bpmnElement="SequenceFlow_1tk5ru7">
+        <di:waypoint xsi:type="dc:Point" x="670" y="367" />
+        <di:waypoint xsi:type="dc:Point" x="712" y="367" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="691" y="346" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0td7d9m_di" bpmnElement="SequenceFlow_0td7d9m">
+        <di:waypoint xsi:type="dc:Point" x="762" y="367" />
+        <di:waypoint xsi:type="dc:Point" x="810" y="367" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="780" y="346" width="12" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="EndEvent_0a97jcr_di" bpmnElement="EndEvent_0a97jcr">
+        <dc:Bounds x="719" y="454" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="692" y="495" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_0h5cld9_di" bpmnElement="SequenceFlow_0h5cld9">
+        <di:waypoint xsi:type="dc:Point" x="737" y="392" />
+        <di:waypoint xsi:type="dc:Point" x="737" y="423" />
+        <di:waypoint xsi:type="dc:Point" x="737" y="423" />
+        <di:waypoint xsi:type="dc:Point" x="737" y="454" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="743" y="417" width="18" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
 </bpmn2:definitions>
index 4779b0a..3833e64 100644 (file)
@@ -50,7 +50,7 @@ dcsi.processDecomposition_Target(execution)]]></bpmn2:script>
       <bpmn2:extensionElements>
         <camunda:in source="msoRequestId" target="msoRequestId" />
         <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
-        <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+        <camunda:in source="serviceModelInfo_Target" target="serviceModelInfo" />
         <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
         <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
         <camunda:out source="WorkflowException" target="WorkflowException" />
@@ -88,7 +88,7 @@ dcsi.processDecomposition_Original(execution)]]></bpmn2:script>
       <bpmn2:extensionElements>
         <camunda:in source="msoRequestId" target="msoRequestId" />
         <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
-        <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+        <camunda:in source="serviceModelInfo_Original" target="serviceModelInfo" />
         <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
         <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
         <camunda:out source="WorkflowException" target="WorkflowException" />
index f5a87b0..df9ef11 100644 (file)
@@ -40,10 +40,16 @@ ex.processJavaException(execution)]]></bpmn2:script>
       <bpmn2:extensionElements>
         <camunda:in source="msoRequestId" target="msoRequestId" />
         <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
-        <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
         <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
-        <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+        <camunda:out source="serviceDecomposition_Target" target="serviceDecomposition_Target" />
         <camunda:out source="WorkflowException" target="WorkflowException" />
+        <camunda:in source="model-invariant-id-target" target="model-invariant-id-target" />
+        <camunda:in source="model-version-id-target" target="model-version-id-target" />
+        <camunda:in source="model-invariant-id-original" target="model-invariant-id-original" />
+        <camunda:in source="model-version-id-original" target="model-version-id-original" />
+        <camunda:out source="addResourceList" target="addResourceList" />
+        <camunda:out source="delResourceList" target="delResourceList" />
+        <camunda:out source="serviceDecomposition_Original" target="serviceDecomposition_Original" />
       </bpmn2:extensionElements>
       <bpmn2:incoming>SequenceFlow_1rebkae</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1pe6r93</bpmn2:outgoing>
index d6dbf58..5772faa 100644 (file)
@@ -22,6 +22,7 @@ dcsi.preProcessRequest(execution)
         <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
         <camunda:out source="WorkflowException" target="WorkflowException" />
         <camunda:in source="serviceType" target="GENGS_serviceType" />
+        <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
       </bpmn2:extensionElements>
       <bpmn2:incoming>SequenceFlow_1i7t9hq</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
@@ -193,7 +194,7 @@ dcsi.prepareDecomposeService(execution)]]></bpmn2:script>
 def dcsi= new DoCreateE2EServiceInstance()
 dcsi.doServiceHoming(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
-    <bpmn2:callActivity id="CallActivity_1ojtwas" name="Call DoCreateResources" calledElement="DoCreateResources">
+    <bpmn2:callActivity id="CallActivity_1ojtwas" name="Call DoCreateResources" calledElement="DoCreateResourcesV3">
       <bpmn2:extensionElements>
         <camunda:in source="nsServiceName" target="nsServiceName" />
         <camunda:in source="nsServiceDescription" target="nsServiceDescription" />
@@ -205,6 +206,10 @@ dcsi.doServiceHoming(execution)]]></bpmn2:script>
         <camunda:in source="resourceUUID" target="resourceUUID" />
         <camunda:in source="resourceParameters" target="resourceParameters" />
         <camunda:in source="operationType" target="operationType" />
+        <camunda:in source="addResourceList" target="addResourceList" />
+        <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+        <camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+        <camunda:in source="uuiRequest" target="uuiRequest" />
       </bpmn2:extensionElements>
       <bpmn2:incoming>SequenceFlow_0bf6bzp</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_0d0c20n</bpmn2:outgoing>
index 2ad563a..9ed1431 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
   <bpmn2:process id="DoCreateResourcesV3" name="DoCreateResourcesV3" isExecutable="true">
     <bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
       <bpmn2:outgoing>SequenceFlow_1qiiycn</bpmn2:outgoing>
@@ -67,7 +67,7 @@ ddsi.getCurrentResoure(execution)]]></bpmn2:script>
 def ddsi = new DoCreateResources()
 ddsi.prepareResourceRecipeRequest(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
-    <bpmn2:scriptTask id="Task_12ghoph" name="Execute Resource Recipe">
+    <bpmn2:scriptTask id="Task_12ghoph" name="Execute Resource Recipe" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_1u9k0dm</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_13c7bhn</bpmn2:outgoing>
       <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
index 390882e..de2ae77 100644 (file)
@@ -26,6 +26,7 @@ import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockAAIVfModule;
 import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockSDNCAdapterVfModule;\r
 import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockVNFAdapterRestVfModule;\r
 import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDBUpdateVfModule;\r
+import static org.openecomp.mso.bpmn.mock.StubResponseAPPC.MockAppcError;\r
 \r
 import java.io.IOException;\r
 import java.util.HashMap;\r
@@ -41,6 +42,7 @@ import org.openecomp.mso.bpmn.mock.FileUtil;
 /**\r
  * Unit test cases for CreateVfModuleInfra.bpmn\r
  */\r
+@Ignore\r
 public class CreateVfModuleInfraTest extends WorkflowTest {\r
        \r
        private final CallbackSet callbacks = new CallbackSet();\r
@@ -65,6 +67,7 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
        @Test   \r
        @Deployment(resources = {\r
                        "process/CreateVfModuleInfra.bpmn",\r
+                       "subprocess/BuildingBlock/AppCClient.bpmn",\r
                        "subprocess/DoCreateVfModule.bpmn",\r
                        "subprocess/GenericGetVnf.bpmn",\r
                        "subprocess/SDNCAdapterV1.bpmn",\r
@@ -76,7 +79,8 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
                        "subprocess/UpdateAAIVfModule.bpmn",\r
                        "subprocess/UpdateAAIGenericVnf.bpmn",\r
                        "subprocess/CompleteMsoProcess.bpmn",\r
-                       "subprocess/FalloutHandler.bpmn"\r
+                       "subprocess/FalloutHandler.bpmn",\r
+                       "subprocess/BuildingBlock/AppCClient.bpmn"\r
                })\r
        public void sunnyDayVIDWithPreloads() throws Exception {\r
                                \r
@@ -88,6 +92,7 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
                MockSDNCAdapterVfModule();              \r
                MockVNFAdapterRestVfModule();\r
                MockDBUpdateVfModule();\r
+               MockAppcError();\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
                String createVfModuleRequest =\r
@@ -123,6 +128,7 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
        @Test   \r
        @Deployment(resources = {\r
                        "process/CreateVfModuleInfra.bpmn",\r
+                       "subprocess/BuildingBlock/AppCClient.bpmn",\r
                        "subprocess/DoCreateVfModule.bpmn",\r
                        "subprocess/GenericGetVnf.bpmn",\r
                        "subprocess/SDNCAdapterV1.bpmn",\r
@@ -134,7 +140,8 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
                        "subprocess/UpdateAAIVfModule.bpmn",\r
                        "subprocess/UpdateAAIGenericVnf.bpmn",\r
                        "subprocess/CompleteMsoProcess.bpmn",\r
-                       "subprocess/FalloutHandler.bpmn"\r
+                       "subprocess/FalloutHandler.bpmn",\r
+                       "subprocess/BuildingBlock/AppCClient.bpmn"\r
                })\r
        public void sunnyDayVIDNoPreloads() throws Exception {\r
                                \r
@@ -146,6 +153,7 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
                MockSDNCAdapterVfModule();              \r
                MockVNFAdapterRestVfModule();\r
                MockDBUpdateVfModule();\r
+               MockAppcError();\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
                String createVfModuleRequest =\r
@@ -208,6 +216,7 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
                @Ignore\r
                @Deployment(resources = {\r
                                "process/CreateVfModuleInfra.bpmn",\r
+                               "subprocess/BuildingBlock/AppCClient.bpmn",\r
                                "subprocess/DoCreateVfModule.bpmn",\r
                                "subprocess/GenericGetVnf.bpmn",\r
                                "subprocess/SDNCAdapterV1.bpmn",\r
@@ -220,7 +229,8 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
                                "subprocess/UpdateAAIVfModule.bpmn",\r
                                "subprocess/UpdateAAIGenericVnf.bpmn",\r
                                "subprocess/CompleteMsoProcess.bpmn",\r
-                               "subprocess/FalloutHandler.bpmn"\r
+                               "subprocess/FalloutHandler.bpmn",\r
+                               "subprocess/BuildingBlock/AppCClient.bpmn"\r
                        })\r
                \r
                public void sunnyDayVIDWithVolumeGroupAttach() throws Exception {\r
@@ -234,6 +244,7 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
                        MockSDNCAdapterVfModule();              \r
                        MockVNFAdapterRestVfModule();\r
                        MockDBUpdateVfModule();\r
+                       MockAppcError();\r
                        \r
                        String businessKey = UUID.randomUUID().toString();\r
                        String createVfModuleRequest =\r
@@ -294,6 +305,7 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
                        @Test   \r
                        @Deployment(resources = {\r
                                        "process/CreateVfModuleInfra.bpmn",\r
+                                       "subprocess/BuildingBlock/AppCClient.bpmn",\r
                                        "subprocess/DoCreateVfModule.bpmn",\r
                                        "subprocess/GenericGetVnf.bpmn",\r
                                        "subprocess/SDNCAdapterV1.bpmn",\r
@@ -305,7 +317,8 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
                                        "subprocess/UpdateAAIVfModule.bpmn",\r
                                        "subprocess/UpdateAAIGenericVnf.bpmn",\r
                                        "subprocess/CompleteMsoProcess.bpmn",\r
-                                       "subprocess/FalloutHandler.bpmn"\r
+                                       "subprocess/FalloutHandler.bpmn",\r
+                                       "subprocess/BuildingBlock/AppCClient.bpmn"\r
                                })\r
                        public void sunnyDayVIDMultipleUserParamValues() throws Exception {\r
                                                \r
@@ -317,6 +330,7 @@ public class CreateVfModuleInfraTest extends WorkflowTest {
                                MockSDNCAdapterVfModule();              \r
                                MockVNFAdapterRestVfModule();\r
                                MockDBUpdateVfModule();\r
+                               MockAppcError();\r
                                \r
                                String businessKey = UUID.randomUUID().toString();\r
                                String createVfModuleRequest =\r
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplicationTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowResourceApplicationTest.java
new file mode 100644 (file)
index 0000000..c667dbf
--- /dev/null
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.workflow.service;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Set;
+
+import org.junit.Test;
+
+public class WorkflowResourceApplicationTest {
+
+    @Test
+    public void test() throws Exception {
+       WorkflowResourceApplication workflowResourceApp = new WorkflowResourceApplication();
+       Set<Class<?>> classes = workflowResourceApp.getClasses();
+       assertEquals(0, classes.size());
+       Set<Object> singleton = workflowResourceApp.getSingletons();
+       assertEquals(3, singleton.size());
+    }
+}
\ No newline at end of file
diff --git a/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerTest.java b/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerTest.java
new file mode 100644 (file)
index 0000000..fa00246
--- /dev/null
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.utils;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.mso.logger.MsoLogger;
+
+public class UUIDCheckerTest {
+
+       private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.GENERAL);     
+       
+    @Test
+    public void testUUIDChecker()  throws Exception {
+       boolean isValidUUID = UUIDChecker.isValidUUID("invalid-uuid");
+       assertEquals(false, isValidUUID);
+       String validUUID = UUIDChecker.verifyOldUUID("invalid-uuid", LOGGER);
+       assertEquals(true, UUIDChecker.isValidUUID(validUUID));
+       String generatedUUID = UUIDChecker.generateUUID(LOGGER);
+       assertEquals(true, UUIDChecker.isValidUUID(generatedUUID));
+       String generatedServiceInstanceId = UUIDChecker.generateServiceInstanceID(LOGGER);
+       assertEquals(true, UUIDChecker.isValidUUID(generatedServiceInstanceId));
+    }
+
+}
index e1d5905..3fa074e 100644 (file)
@@ -1216,7 +1216,7 @@ public class CatalogDatabase implements Closeable {
             return null;
         }
         
-        VnfRecipe recipe = this.getVnfRecipeByNameVersion(vnfResource.getModelName(), vnfResource.getModelVersion(), action);
+        VnfRecipe recipe = this.getVnfRecipeByNameVersion(vnfResource.getModelName(), vnfResource.getVersion(), action);
         return recipe;        
     }
 
diff --git a/pom.xml b/pom.xml
index 9d1bcc5..ed64d08 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -48,7 +48,7 @@
     <swm.version>2.19.3-1</swm.version>
        <openstack.version>1.2.1</openstack.version>
     <nexusproxy>https://nexus.onap.org</nexusproxy>
-    <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
+    <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
     <resteasy.version>3.0.19.Final</resteasy.version>
   </properties>
   <distributionManagement>