summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-08-09 12:07:02 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-09 12:07:02 +0000
commit7d658b55df711387c65eb30df526c61b48f2f19a (patch)
treeb5de041539145bfcc3025fcf3a3dbbe91839ff30 /bpmn
parentf7905365376fe58e811955c550859d94aa4c2ff2 (diff)
parent0bb644bd5c11ce03b6dec71d26127fbd3519a9b4 (diff)
Merge "Refactored references to AaiUtils"
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetService.groovy440
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericGetService.groovy470
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/CustomE2EGetService.bpmn321
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn321
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetServiceTest.groovy104
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetServiceTest.groovy124
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetVnfTest.groovy180
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericPutServiceTest.groovy235
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml23
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml90
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml90
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByName.xml6
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByNameMultiCustomer.xml11
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml30
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceSubscription.xml34
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceByNameResponse.xml97
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceResponse.xml92
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml11
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/aaiFault.xml15
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetServiceIT.java560
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy169
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy96
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy300
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy150
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy118
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy27
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy91
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy198
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy139
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy87
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy170
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy229
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy216
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy95
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn45
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn60
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn78
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn223
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn244
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2ENetworkInstance.bpmn41
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn58
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn54
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn78
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn144
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeV2.bpmn40
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnf.bpmn116
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn54
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn47
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn34
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn74
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn70
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn78
54 files changed, 1217 insertions, 5676 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetService.groovy
deleted file mode 100644
index 5aef1d6ea5..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetService.groovy
+++ /dev/null
@@ -1,440 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.onap.so.bpmn.common.scripts
-
-import static org.apache.commons.lang3.StringUtils.*
-
-import org.apache.commons.lang3.*
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.so.rest.APIResponse
-import org.springframework.web.util.UriUtils
-import org.onap.so.bpmn.core.UrnPropertiesReader
-import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
-
-
-/**
- * This class supports the GenericGetService Sub Flow.
- * This Generic sub flow can be used by any flow for accomplishing
- * the goal of getting a Service-Instance or Service-Subscription (from AAI).
- * The calling flow must set the GENGS_type variable as "service-instance"
- * or "service-subscription".
- *
- * When using to Get a Service-Instance:
- * If the global-customer-id and service-type are not provided
- * this flow executes a query to get the service- Url using the
- * Service Id or Name (whichever is provided).
- *
- * When using to Get a Service-Subscription:
- * The global-customer-id and service-type must be
- * provided.
- *
- * Upon successful completion of this sub flow the
- * GENGS_SuccessIndicator will be true and the query response payload
- * will be set to GENGS_service. An MSOWorkflowException will
- * be thrown upon unsuccessful completion or if an error occurs
- * at any time during this sub flow. Please map variables
- * to the corresponding variable names below.
- *
- * Note - If this sub flow receives a Not Found (404) response
- * from AAI at any time this will be considered an acceptable
- * successful response however the GENGS_FoundIndicator
- * will be set to false. This variable will allow the calling flow
- * to distinguish between the two Success scenarios,
- * "Success where service- is found" and
- * "Success where service- is NOT found".
- *
- *
- * Variable Mapping Below:
- *
- * In Mapping Variables:
- * For Allotted-Resource:
- * @param - GENGS_allottedResourceId
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceInstanceId
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * For Service-Instance:
- * @param - GENGS_serviceInstanceId or @param - GENGS_serviceInstanceName
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * For Service-Subscription:
- * @param - GENGS_type
- * @param - GENGS_serviceType
- * @param - GENGS_globalCustomerId
- *
- *
- * Out Mapping Variables:
- * @param - GENGS_service
- * @param - GENGS_FoundIndicator
- * @param - WorkflowException
- */
-class CustomE2EGetService extends AbstractServiceTaskProcessor{
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CustomE2EGetService.class);
-
- String Prefix = "GENGS_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- /**
- * This method validates the incoming variables and
- * determines the subsequent event based on which
- * variables the calling flow provided.
- *
- * @param - execution
- *
- */
- public void preProcessRequest(DelegateExecution execution) {
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService PreProcessRequest Process")
-
- execution.setVariable("GENGS_obtainObjectsUrl", false)
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", false)
- execution.setVariable("GENGS_SuccessIndicator", false)
- execution.setVariable("GENGS_FoundIndicator", false)
- execution.setVariable("GENGS_resourceLink", null)
- execution.setVariable("GENGS_siResourceLink", null)
-
- try{
- // Get Variables
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- String serviceType = execution.getVariable("GENGS_serviceType")
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String type = execution.getVariable("GENGS_type")
-
- if(type != null){
- msoLogger.debug("Incoming GENGS_type is: " + type)
- if(type.equalsIgnoreCase("allotted-resource")){
- if(isBlank(allottedResourceId)){
- msoLogger.debug("Incoming allottedResourceId is null. Allotted Resource Id is required to Get an allotted-resource.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming allottedResourceId is null. Allotted Resource Id is required to Get an allotted-resource.")
- }else{
- msoLogger.debug("Incoming Allotted Resource Id is: " + allottedResourceId)
- if(isBlank(globalCustomerId) || isBlank(serviceType) || isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainObjectsUrl", true)
- }else{
- msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- }
- }
- }else if(type.equalsIgnoreCase("service-instance")){
- if(isBlank(serviceInstanceId) && isBlank(serviceInstanceName)){
- msoLogger.debug("Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- }else{
- msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
- msoLogger.debug("Incoming Service Instance Name is: " + serviceInstanceName)
- if(isBlank(globalCustomerId) || isBlank(serviceType)){
- execution.setVariable("GENGS_obtainObjectsUrl", true)
- if(isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", true)
- }
- }else{
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- }
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- if(isBlank(serviceType) || isBlank(globalCustomerId)){
- msoLogger.debug("Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- }else{
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENGS_type is null. Variable is Required.")
- }
-
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.debug("Internal Error encountered within GenericGetService PreProcessRequest method!" + e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericGetService PreProcessRequest")
-
- }
- msoLogger.trace("COMPLETED GenericGetService PreProcessRequest Process ")
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Id.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlById(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService ObtainServiceInstanceUrlById Process")
- try {
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
-
- String type = execution.getVariable("GENGS_type")
- String path = ""
- if(type.equalsIgnoreCase("service-instance")){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Service-Instance Id: " + serviceInstanceId)
- path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-id:EQUALS:${serviceInstanceId}"
- msoLogger.debug("Service Instance Node Query Url is: " + path)
- msoLogger.debug("Service Instance Node Query Url is: " + path)
- }else if(type.equalsIgnoreCase("allotted-resource")){
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Allotted Resource Id: " + allottedResourceId)
- path = "${aai_uri}?search-node-type=allotted-resource&filter=id:EQUALS:${allottedResourceId}"
- msoLogger.debug("Allotted Resource Node Query Url is: " + path)
- msoLogger.debug("Allotted Resource Node Query Url is: " + path)
- }
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_genericQueryPath", url)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_genericQueryResponseCode", responseCode)
- msoLogger.debug(" GET Service Instance response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI GET Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_obtainSIUrlResponseBeforeUnescaping", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response before unescaping: " + aaiResponse)
- execution.setVariable("GENGS_genericQueryResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
-
- //Process Response
- if(responseCode == 200){
- msoLogger.debug("Generic Query Received a Good Response Code")
- execution.setVariable("GENGS_SuccessIndicator", true)
- if(utils.nodeExists(aaiResponse, "result-data")){
- msoLogger.debug("Generic Query Response Does Contain Data" )
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText(aaiResponse, "resource-link")
- execution.setVariable("GENGS_resourceLink", resourceLink)
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- msoLogger.debug("Generic Query Response Does NOT Contains Data" )
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- msoLogger.debug("Generic Query Received a Not Found (404) Response")
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- msoLogger.debug("Generic Query Received a BAD REST Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error encountered within GenericGetService ObtainServiceInstanceUrlById method!" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlById")
- }
- msoLogger.trace("COMPLETED GenericGetService ObtainServiceInstanceUrlById Process")
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Name.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlByName(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService ObtainServiceInstanceUrlByName Process")
- try {
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Service-Instance Name " + serviceInstanceName)
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
- String path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-name:EQUALS:${serviceInstanceName}"
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_obtainSIUrlPath", url)
-
- msoLogger.debug("GenericGetService AAI Endpoint: " + aai_endpoint)
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_obtainSIUrlResponseCode", responseCode)
- msoLogger.debug(" GET Service Instance response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_obtainSIUrlResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- //Process Response
- if(responseCode == 200){
- msoLogger.debug(" Query for Service Instance Url Received a Good Response Code")
- execution.setVariable("GENGS_SuccessIndicator", true)
- if(utils.nodeExists(aaiResponse, "result-data")){
- msoLogger.debug("Query for Service Instance Url Response Does Contain Data" )
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText(aaiResponse, "resource-link")
- execution.setVariable("GENGS_resourceLink", resourceLink)
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- msoLogger.debug("Query for Service Instance Url Response Does NOT Contains Data" )
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- msoLogger.debug(" Query for Service Instance Received a Not Found (404) Response")
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- msoLogger.debug("Query for Service Instance Received a BAD REST Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error encountered within GenericGetService ObtainServiceInstanceUrlByName method!" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlByName")
- }
- msoLogger.trace("COMPLETED GenericGetService ObtainServiceInstanceUrlByName Process")
- }
-
-
- /**
- * This method executes a GET call to AAI to obtain the
- * service-instance or service-subscription
- *
- * @param - execution
- */
- public void getServiceObject(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService GetServiceObject Process")
- try {
- String type = execution.getVariable("GENGS_type")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
- String serviceEndpoint = ""
-
- msoLogger.debug("GenericGetService getServiceObject AAI Endpoint: " + aai_endpoint)
- if(type.equalsIgnoreCase("service-instance")){
- String siResourceLink = execution.getVariable("GENGS_resourceLink")
- if(isBlank(siResourceLink)){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Incoming GENGS_serviceInstanceId is: " + serviceInstanceId)
- String serviceType = execution.getVariable("GENGS_serviceType")
- msoLogger.debug(" Incoming GENGS_serviceType is: " + serviceType)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- msoLogger.debug('AAI URI is: ' + aai_uri)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
- }else{
- msoLogger.debug("Incoming Service Instance Url is: " + siResourceLink)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("allotted-resource")){
- String siResourceLink = execution.getVariable("GENGS_resourceLink")
- if(isBlank(siResourceLink)){
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- msoLogger.debug(" Incoming GENGS_allottedResourceId is: " + allottedResourceId)
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Incoming GENGS_serviceInstanceId is: " + serviceInstanceId)
- String serviceType = execution.getVariable("GENGS_serviceType")
- msoLogger.debug(" Incoming GENGS_serviceType is: " + serviceType)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- msoLogger.debug('AAI URI is: ' + aai_uri)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8") + "/allotted-resources/allotted-resource/" + UriUtils.encode(allottedResourceId,"UTF-8")
- }else{
- msoLogger.debug("Incoming Allotted-Resource Url is: " + siResourceLink)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String serviceType = execution.getVariable("GENGS_serviceType")
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
- }
-
- String serviceUrl = "${aai_endpoint}" + serviceEndpoint
-
- execution.setVariable("GENGS_getServiceUrl", serviceUrl)
- msoLogger.debug("GET Service AAI Path is: \n" + serviceUrl)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceUrl)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_getServiceResponseCode", responseCode)
- msoLogger.debug(" GET Service response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_getServiceResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- //Process Response
- if(responseCode == 200 || responseCode == 202){
- msoLogger.debug("GET Service Received a Good Response Code")
- if(utils.nodeExists(aaiResponse, "service-instance") || utils.nodeExists(aaiResponse, "service-subscription")){
- msoLogger.debug("GET Service Response Contains a service-instance" )
- execution.setVariable("GENGS_FoundIndicator", true)
- execution.setVariable("GENGS_service", aaiResponse)
- execution.setVariable("WorkflowResponse", aaiResponse)
-
- }else{
- msoLogger.debug("GET Service Response Does NOT Contain Data" )
- }
- }else if(responseCode == 404){
- msoLogger.debug("GET Service Received a Not Found (404) Response")
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- else{
- msoLogger.debug(" GET Service Received a Bad Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.debug(" Error encountered within GenericGetService GetServiceObject method!" + e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GenericGetService")
- }
- msoLogger.trace("COMPLETED GenericGetService GetServiceObject Process")
- }
-
-} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericGetService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericGetService.groovy
deleted file mode 100644
index 857df16772..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericGetService.groovy
+++ /dev/null
@@ -1,470 +0,0 @@
-/*-
- * ============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.onap.so.bpmn.common.scripts
-
-import org.onap.so.bpmn.core.UrnPropertiesReader
-
-import org.apache.commons.lang3.StringEscapeUtils
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.so.rest.APIResponse
-import org.springframework.web.util.UriUtils
-import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
-
-import static org.apache.commons.lang3.StringUtils.isBlank
-
-
-
-/**
- * This class supports the GenericGetService Sub Flow.
- * This Generic sub flow can be used by any flow for accomplishing
- * the goal of getting a Service-Instance or Service-Subscription (from AAI).
- * The calling flow must set the GENGS_type variable as "service-instance"
- * or "service-subscription".
- *
- * When using to Get a Service-Instance:
- * If the global-customer-id and service-type are not provided
- * this flow executes a query to get the service- Url using the
- * Service Id or Name (whichever is provided).
- *
- * When using to Get a Service-Subscription:
- * The global-customer-id and service-type must be
- * provided.
- *
- * Upon successful completion of this sub flow the
- * GENGS_SuccessIndicator will be true and the query response payload
- * will be set to GENGS_service. An MSOWorkflowException will
- * be thrown upon unsuccessful completion or if an error occurs
- * at any time during this sub flow. Please map variables
- * to the corresponding variable names below.
- *
- * Note - If this sub flow receives a Not Found (404) response
- * from AAI at any time this will be considered an acceptable
- * successful response however the GENGS_FoundIndicator
- * will be set to false. This variable will allow the calling flow
- * to distinguish between the two Success scenarios,
- * "Success where service- is found" and
- * "Success where service- is NOT found".
- *
- *
- * Variable Mapping Below:
- *
- * In Mapping Variables:
- * For Allotted-Resource:
- * @param - GENGS_allottedResourceId
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceInstanceId
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * For Service-Instance:
- * @param - GENGS_serviceInstanceId or @param - GENGS_serviceInstanceName
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * For Service-Subscription:
- * @param - GENGS_type
- * @param - GENGS_serviceType
- * @param - GENGS_globalCustomerId
- *
- *
- * Out Mapping Variables:
- * @param - GENGS_service
- * @param - GENGS_FoundIndicator
- * @param - WorkflowException
- */
-class GenericGetService extends AbstractServiceTaskProcessor{
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, GenericGetService.class);
-
-
- String Prefix = "GENGS_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- /**
- * This method validates the incoming variables and
- * determines the subsequent event based on which
- * variables the calling flow provided.
- *
- * @param - execution
- *
- */
- public void preProcessRequest(DelegateExecution execution) {
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService PreProcessRequest Process")
-
- execution.setVariable("GENGS_obtainObjectsUrl", false)
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", false)
- execution.setVariable("GENGS_SuccessIndicator", false)
- execution.setVariable("GENGS_FoundIndicator", false)
- execution.setVariable("GENGS_resourceLink", null)
- execution.setVariable("GENGS_siResourceLink", null)
-
- try{
- // Get Variables
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- String serviceType = execution.getVariable("GENGS_serviceType")
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String type = execution.getVariable("GENGS_type")
-
- if(type != null){
- msoLogger.debug("Incoming GENGS_type is: " + type)
- if(type.equalsIgnoreCase("allotted-resource")){
- if(isBlank(allottedResourceId)){
- msoLogger.debug("Incoming allottedResourceId is null. Allotted Resource Id is required to Get an allotted-resource.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming allottedResourceId is null. Allotted Resource Id is required to Get an allotted-resource.")
- }else{
- msoLogger.debug("Incoming Allotted Resource Id is: " + allottedResourceId)
- if(isBlank(globalCustomerId) || isBlank(serviceType) || isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainObjectsUrl", true)
- }else{
- msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- }
- }
- }else if(type.equalsIgnoreCase("service-instance")){
- if(isBlank(serviceInstanceId) && isBlank(serviceInstanceName)){
- msoLogger.debug("Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- }else{
- msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
- msoLogger.debug("Incoming Service Instance Name is: " + serviceInstanceName)
- if(isBlank(globalCustomerId) || isBlank(serviceType)){
- execution.setVariable("GENGS_obtainObjectsUrl", true)
- if(isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", true)
- }
- }else{
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- }
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- if(isBlank(serviceType) || isBlank(globalCustomerId)){
- msoLogger.debug("Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- }else{
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENGS_type is null. Variable is Required.")
- }
-
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.debug("Internal Error encountered within GenericGetService PreProcessRequest method!" + e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericGetService PreProcessRequest")
-
- }
- msoLogger.trace("COMPLETED GenericGetService PreProcessRequest Process ")
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Id.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlById(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService ObtainServiceInstanceUrlById Process")
- try {
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
-
- String type = execution.getVariable("GENGS_type")
- String path = ""
- if(type.equalsIgnoreCase("service-instance")){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Service-Instance Id: " + serviceInstanceId)
- path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-id:EQUALS:${serviceInstanceId}"
- msoLogger.debug("Service Instance Node Query Url is: " + path)
- msoLogger.debug("Service Instance Node Query Url is: " + path)
- }else if(type.equalsIgnoreCase("allotted-resource")){
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Allotted Resource Id: " + allottedResourceId)
- path = "${aai_uri}?search-node-type=allotted-resource&filter=id:EQUALS:${allottedResourceId}"
- msoLogger.debug("Allotted Resource Node Query Url is: " + path)
- msoLogger.debug("Allotted Resource Node Query Url is: " + path)
- }
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_genericQueryPath", url)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_genericQueryResponseCode", responseCode)
- msoLogger.debug(" GET Service Instance response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI GET Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_obtainSIUrlResponseBeforeUnescaping", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response before unescaping: " + aaiResponse)
- execution.setVariable("GENGS_genericQueryResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
-
- //Process Response
- if(responseCode == 200){
- msoLogger.debug("Generic Query Received a Good Response Code")
- execution.setVariable("GENGS_SuccessIndicator", true)
- if(utils.nodeExists(aaiResponse, "result-data")){
- msoLogger.debug("Generic Query Response Does Contain Data" )
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText(aaiResponse, "resource-link")
- execution.setVariable("GENGS_resourceLink", resourceLink)
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- msoLogger.debug("Generic Query Response Does NOT Contains Data" )
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- msoLogger.debug("Generic Query Received a Not Found (404) Response")
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- msoLogger.debug("Generic Query Received a BAD REST Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error encountered within GenericGetService ObtainServiceInstanceUrlById method!" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlById")
- }
- msoLogger.trace("COMPLETED GenericGetService ObtainServiceInstanceUrlById Process")
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Name.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlByName(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService ObtainServiceInstanceUrlByName Process")
- try {
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Service-Instance Name " + serviceInstanceName)
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
- String path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-name:EQUALS:${serviceInstanceName}"
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_obtainSIUrlPath", url)
-
- msoLogger.debug("GenericGetService AAI Endpoint: " + aai_endpoint)
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_obtainSIUrlResponseCode", responseCode)
- msoLogger.debug(" GET Service Instance response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_obtainSIUrlResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- //Process Response
- if(responseCode == 200){
- msoLogger.debug(" Query for Service Instance Url Received a Good Response Code")
- execution.setVariable("GENGS_SuccessIndicator", true)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- boolean nodeExists = isBlank(globalCustomerId) ? utils.nodeExists(aaiResponse, "result-data") : hasCustomerServiceInstance(aaiResponse, globalCustomerId)
- if(nodeExists){
- msoLogger.debug("Query for Service Instance Url Response Does Contain Data" )
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText(aaiResponse, "resource-link")
- execution.setVariable("GENGS_resourceLink", resourceLink)
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- msoLogger.debug("Query for Service Instance Url Response Does NOT Contains Data" )
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- msoLogger.debug(" Query for Service Instance Received a Not Found (404) Response")
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- msoLogger.debug("Query for Service Instance Received a BAD REST Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error encountered within GenericGetService ObtainServiceInstanceUrlByName method!" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlByName")
- }
- msoLogger.trace("COMPLETED GenericGetService ObtainServiceInstanceUrlByName Process")
- }
-
-
- /**
- * This method executes a GET call to AAI to obtain the
- * service-instance or service-subscription
- *
- * @param - execution
- */
- public void getServiceObject(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService GetServiceObject Process")
- try {
- String type = execution.getVariable("GENGS_type")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
- String serviceEndpoint = ""
-
- msoLogger.debug("GenericGetService getServiceObject AAI Endpoint: " + aai_endpoint)
- if(type.equalsIgnoreCase("service-instance")){
- String siResourceLink = execution.getVariable("GENGS_resourceLink")
- if(isBlank(siResourceLink)){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Incoming GENGS_serviceInstanceId is: " + serviceInstanceId)
- String serviceType = execution.getVariable("GENGS_serviceType")
- msoLogger.debug(" Incoming GENGS_serviceType is: " + serviceType)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- msoLogger.debug('AAI URI is: ' + aai_uri)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
- }else{
- msoLogger.debug("Incoming Service Instance Url is: " + siResourceLink)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("allotted-resource")){
- String siResourceLink = execution.getVariable("GENGS_resourceLink")
- if(isBlank(siResourceLink)){
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- msoLogger.debug(" Incoming GENGS_allottedResourceId is: " + allottedResourceId)
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Incoming GENGS_serviceInstanceId is: " + serviceInstanceId)
- String serviceType = execution.getVariable("GENGS_serviceType")
- msoLogger.debug(" Incoming GENGS_serviceType is: " + serviceType)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- msoLogger.debug('AAI URI is: ' + aai_uri)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8") + "/allotted-resources/allotted-resource/" + UriUtils.encode(allottedResourceId,"UTF-8")
- }else{
- msoLogger.debug("Incoming Allotted-Resource Url is: " + siResourceLink)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String serviceType = execution.getVariable("GENGS_serviceType")
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
- }
-
- String serviceUrl = "${aai_endpoint}" + serviceEndpoint
-
- execution.setVariable("GENGS_getServiceUrl", serviceUrl)
- msoLogger.debug("GET Service AAI Path is: \n" + serviceUrl)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceUrl)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_getServiceResponseCode", responseCode)
- msoLogger.debug(" GET Service response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_getServiceResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- //Process Response
- if(responseCode == 200 || responseCode == 202){
- msoLogger.debug("GET Service Received a Good Response Code")
- if(utils.nodeExists(aaiResponse, "service-instance") || utils.nodeExists(aaiResponse, "service-subscription")){
- msoLogger.debug("GET Service Response Contains a service-instance" )
- execution.setVariable("GENGS_FoundIndicator", true)
- execution.setVariable("GENGS_service", aaiResponse)
- execution.setVariable("WorkflowResponse", aaiResponse)
-
- }else{
- msoLogger.debug("GET Service Response Does NOT Contain Data" )
- }
- }else if(responseCode == 404){
- msoLogger.debug("GET Service Received a Not Found (404) Response")
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- else{
- msoLogger.debug(" GET Service Received a Bad Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.debug(" Error encountered within GenericGetService GetServiceObject method!" + e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GenericGetService")
- }
- msoLogger.trace("COMPLETED GenericGetService GetServiceObject Process")
- }
-
- /**
- * An utility method which check whether a service(by name) is already present within a globalCustomerId or not.
- * @param jsonResponse raw response received from AAI by searching ServiceInstance by Name.
- * @param globalCustomerId
- * @return {@code true} if globalCustomerId is found at 6th position within "resource-link", {@code false} in any other cases.
- */
- public boolean hasCustomerServiceInstance(String aaiResponse, final String globalCustomerId) {
- if (isBlank(aaiResponse)) {
- return false
- }
- aaiResponse = utils.removeXmlNamespaces(aaiResponse)
- ArrayList<String> linksArray = utils.getMultNodeObjects(aaiResponse, "resource-link")
- if (linksArray == null || linksArray.size() == 0) {
- return false
- }
- for (String resourceLink : linksArray) {
- int custStart = resourceLink.indexOf("customer/")
- int custEnd = resourceLink.indexOf("/service-subscriptions/")
- String receivedCustomerId = resourceLink.substring(custStart + 9, custEnd)
- if (globalCustomerId.equals(receivedCustomerId)) {
- return true
- }
- }
- return false
- }
-
-} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy
index d41134be91..8cc756d412 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -67,7 +67,7 @@ import org.onap.so.logger.MsoLogger
* @param - GENPS_tunnelXconnectId - Conditional Field. Required for tunnel-xconnect.
*
* @param - GENPS_serviceResourceVersion - Conditional Field. Needs to be provided only in case of update for both service-instance and service subscription. The calling flows
- * should check if a service-instance or servic-subscription exists by calling the subflow GenericGetService. if it exists then resourceversion should be
+ * should check if a service-instance or servic-subscription exists by calling the subflow. if it exists then resourceversion should be
* obtained from aai and sent as an input parameter.
*
* Outgoing Variables:
@@ -104,7 +104,7 @@ class GenericPutService extends AbstractServiceTaskProcessor{
String allottedResourceId = execution.getVariable("GENPS_allottedResourceId")
String tunnelXconnectId = execution.getVariable("GENPS_tunnelXconnectId")
String type = execution.getVariable("GENPS_type")
-
+
if(type != null){
msoLogger.debug("Incoming GENPS_type is: " + type)
if(type.equalsIgnoreCase("service-instance")){
@@ -201,7 +201,7 @@ class GenericPutService extends AbstractServiceTaskProcessor{
String serviceType = execution.getVariable("GENPS_serviceType")
msoLogger.debug(" Incoming GENPS_serviceType is: " + serviceType)
-
+
String globalSubscriberId = execution.getVariable("GENPS_globalSubscriberId")
msoLogger.debug("Incoming Global Subscriber Id is: " + globalSubscriberId)
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CustomE2EGetService.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CustomE2EGetService.bpmn
deleted file mode 100644
index 90722a95f3..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CustomE2EGetService.bpmn
+++ /dev/null
@@ -1,321 +0,0 @@
-<?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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_D5VzAHElEeaJwpcpVN5gXw" 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:process id="CustomE2EGetService" name="CustomE2EGetService" isExecutable="true">
- <bpmn2:scriptTask id="intialization" name="Initialization" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="getUrl" />
- <bpmn2:exclusiveGateway id="getUrl" name="Need Object&#39;s Url?" default="getUrlNo">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>getUrlYes</bpmn2:outgoing>
- <bpmn2:outgoing>getUrlNo</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="getUrlYes" name="Yes" sourceRef="getUrl" targetRef="obtain">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainObjectsUrl" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="getUrlNo" name="No" sourceRef="getUrl" targetRef="ExclusiveGateway_2" />
- <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
- <bpmn2:scriptTask id="processBPMNException" name="Process Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-
-ExceptionUtil ex = new ExceptionUtil()
-ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="processBPMNException" targetRef="EndEvent_2" />
- <bpmn2:startEvent id="StartEvent_2">
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_2" targetRef="processBPMNException" />
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- </bpmn2:endEvent>
- </bpmn2:subProcess>
- <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.setSuccessIndicator(execution, true)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1" />
- <bpmn2:scriptTask id="getServiceInstance" name="GET&#10;Object" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.getServiceObject(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getServiceInstance" targetRef="toggleSuccess" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
- <bpmn2:incoming>getUrlNo</bpmn2:incoming>
- <bpmn2:incoming>foundYes</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_2" targetRef="getServiceInstance" />
- <bpmn2:scriptTask id="obtainServiceUrlById" name="Node Query Using Id&#10;" scriptFormat="groovy">
- <bpmn2:incoming>obtainById</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.obtainServiceInstanceUrlById(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="obtainServiceUrlById" targetRef="ExclusiveGateway_3" />
- <bpmn2:scriptTask id="obtainServiceUrlByName" name="Node Query Using Name" scriptFormat="groovy">
- <bpmn2:incoming>obtainByName</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.obtainServiceInstanceUrlByName(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="obtainServiceUrlByName" targetRef="ExclusiveGateway_3" />
- <bpmn2:exclusiveGateway id="obtain" name="Query By?" default="obtainById">
- <bpmn2:incoming>getUrlYes</bpmn2:incoming>
- <bpmn2:outgoing>obtainById</bpmn2:outgoing>
- <bpmn2:outgoing>obtainByName</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="obtainById" name="Id" sourceRef="obtain" targetRef="obtainServiceUrlById" />
- <bpmn2:sequenceFlow id="obtainByName" name="Name" sourceRef="obtain" targetRef="obtainServiceUrlByName">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainServiceInstanceUrlByName" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:exclusiveGateway id="serviceFoundCheck" name="Service Exist?" default="notFound">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>foundYes</bpmn2:outgoing>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="foundYes" name="Yes" sourceRef="serviceFoundCheck" targetRef="ExclusiveGateway_2">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceFoundCheck" targetRef="EndEvent_3" />
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_29" />
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ExclusiveGateway_3" targetRef="serviceFoundCheck" />
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_26" />
- </bpmn2:endEvent>
- <bpmn2:startEvent id="StartEvent_1">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization" />
- </bpmn2:process>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericGetService">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_69" bpmnElement="StartEvent_1">
- <dc:Bounds x="108" y="264" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="126" y="305" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="intialization">
- <dc:Bounds x="228" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_69" targetElement="_BPMNShape_ScriptTask_288">
- <di:waypoint xsi:type="dc:Point" x="144" y="282" />
- <di:waypoint xsi:type="dc:Point" x="228" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="177" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="getUrl" isMarkerVisible="true">
- <dc:Bounds x="372" y="256" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="420" y="282" width="72" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_288" targetElement="_BPMNShape_ExclusiveGateway_227">
- <di:waypoint xsi:type="dc:Point" x="328" y="282" />
- <di:waypoint xsi:type="dc:Point" x="372" y="281" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="350" y="281" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="obtainServiceUrlById">
- <dc:Bounds x="528" y="197" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_228" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds x="738" y="256" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="763" y="311" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="getServiceInstance">
- <dc:Bounds x="820" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="getUrlYes" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_233">
- <di:waypoint xsi:type="dc:Point" x="397" y="256" />
- <di:waypoint xsi:type="dc:Point" x="397" y="170" />
- <di:waypoint xsi:type="dc:Point" x="446" y="170" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="397" y="213" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_289" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628" y="237" />
- <di:waypoint xsi:type="dc:Point" x="671" y="237" />
- <di:waypoint xsi:type="dc:Point" x="671" y="195" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="668" y="221" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_228" targetElement="_BPMNShape_ScriptTask_290">
- <di:waypoint xsi:type="dc:Point" x="788" y="281" />
- <di:waypoint xsi:type="dc:Point" x="820" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="798" y="281" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="getUrlNo" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="397" y="306" />
- <di:waypoint xsi:type="dc:Point" x="397" y="370" />
- <di:waypoint xsi:type="dc:Point" x="763" y="370" />
- <di:waypoint xsi:type="dc:Point" x="763" y="306" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="400" y="324" width="22" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_291" bpmnElement="toggleSuccess">
- <dc:Bounds x="960" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_290" targetElement="_BPMNShape_ScriptTask_291">
- <di:waypoint xsi:type="dc:Point" x="920" y="282" />
- <di:waypoint xsi:type="dc:Point" x="960" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="937" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_223" bpmnElement="EndEvent_1">
- <dc:Bounds x="1133" y="264" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1151" y="305" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_291" targetElement="_BPMNShape_EndEvent_223">
- <di:waypoint xsi:type="dc:Point" x="1060" y="282" />
- <di:waypoint xsi:type="dc:Point" x="1133" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1100" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_25" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
- <dc:Bounds x="152" y="468" width="325" height="169" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_2">
- <dc:Bounds x="176" y="535" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="194" y="576" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_224" bpmnElement="EndEvent_2">
- <dc:Bounds x="416" y="535" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="434" y="576" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="processBPMNException">
- <dc:Bounds x="265" y="513" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_292">
- <di:waypoint xsi:type="dc:Point" x="212" y="553" />
- <di:waypoint xsi:type="dc:Point" x="265" y="553" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="233" y="553" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_292" targetElement="_BPMNShape_EndEvent_224">
- <di:waypoint xsi:type="dc:Point" x="365" y="553" />
- <di:waypoint xsi:type="dc:Point" x="416" y="553" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="385" y="553" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="obtainServiceUrlByName">
- <dc:Bounds x="528" y="59" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_233" bpmnElement="obtain" isMarkerVisible="true">
- <dc:Bounds x="446" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="501" y="164" width="53" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_234" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds x="646" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="671" y="200" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="obtainById" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_289">
- <di:waypoint xsi:type="dc:Point" x="471" y="195" />
- <di:waypoint xsi:type="dc:Point" x="471" y="236" />
- <di:waypoint xsi:type="dc:Point" x="528" y="237" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="476" y="207" width="16" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="obtainByName" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_301">
- <di:waypoint xsi:type="dc:Point" x="471" y="145" />
- <di:waypoint xsi:type="dc:Point" x="471" y="99" />
- <di:waypoint xsi:type="dc:Point" x="528" y="99" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="471" y="115" width="40" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_301" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628" y="99" />
- <di:waypoint xsi:type="dc:Point" x="671" y="99" />
- <di:waypoint xsi:type="dc:Point" x="671" y="145" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="665" y="99" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_235" bpmnElement="serviceFoundCheck" isMarkerVisible="true">
- <dc:Bounds x="738" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="735" y="125" width="59" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ExclusiveGateway_234" targetElement="_BPMNShape_ExclusiveGateway_235">
- <di:waypoint xsi:type="dc:Point" x="696" y="170" />
- <di:waypoint xsi:type="dc:Point" x="738" y="170" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="704" y="170" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="foundYes" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="763" y="195" />
- <di:waypoint xsi:type="dc:Point" x="763" y="256" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="762" y="205" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_EndEvent_229">
- <di:waypoint xsi:type="dc:Point" x="788" y="170" />
- <di:waypoint xsi:type="dc:Point" x="877" y="171" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="798" y="170" width="22" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_229" bpmnElement="EndEvent_3">
- <dc:Bounds x="877" y="153" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="895" y="194" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions>
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn
deleted file mode 100644
index 2015526874..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn
+++ /dev/null
@@ -1,321 +0,0 @@
-<?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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_D5VzAHElEeaJwpcpVN5gXw" 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:process id="GenericGetService" name="GenericGetService" isExecutable="true">
- <bpmn2:scriptTask id="intialization" name="Initialization" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="getUrl" />
- <bpmn2:exclusiveGateway id="getUrl" name="Need Object&#39;s Url?" default="getUrlNo">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>getUrlYes</bpmn2:outgoing>
- <bpmn2:outgoing>getUrlNo</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="getUrlYes" name="Yes" sourceRef="getUrl" targetRef="obtain">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainObjectsUrl" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="getUrlNo" name="No" sourceRef="getUrl" targetRef="ExclusiveGateway_2" />
- <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
- <bpmn2:scriptTask id="processBPMNException" name="Process Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-
-ExceptionUtil ex = new ExceptionUtil()
-ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="processBPMNException" targetRef="EndEvent_2" />
- <bpmn2:startEvent id="StartEvent_2">
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_2" targetRef="processBPMNException" />
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- </bpmn2:endEvent>
- </bpmn2:subProcess>
- <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.setSuccessIndicator(execution, true)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1" />
- <bpmn2:scriptTask id="getServiceInstance" name="GET&#10;Object" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.getServiceObject(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getServiceInstance" targetRef="toggleSuccess" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
- <bpmn2:incoming>getUrlNo</bpmn2:incoming>
- <bpmn2:incoming>foundYes</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_2" targetRef="getServiceInstance" />
- <bpmn2:scriptTask id="obtainServiceUrlById" name="Node Query Using Id&#10;" scriptFormat="groovy">
- <bpmn2:incoming>obtainById</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.obtainServiceInstanceUrlById(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="obtainServiceUrlById" targetRef="ExclusiveGateway_3" />
- <bpmn2:scriptTask id="obtainServiceUrlByName" name="Node Query Using Name" scriptFormat="groovy">
- <bpmn2:incoming>obtainByName</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.obtainServiceInstanceUrlByName(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="obtainServiceUrlByName" targetRef="ExclusiveGateway_3" />
- <bpmn2:exclusiveGateway id="obtain" name="Query By?" default="obtainById">
- <bpmn2:incoming>getUrlYes</bpmn2:incoming>
- <bpmn2:outgoing>obtainById</bpmn2:outgoing>
- <bpmn2:outgoing>obtainByName</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="obtainById" name="Id" sourceRef="obtain" targetRef="obtainServiceUrlById" />
- <bpmn2:sequenceFlow id="obtainByName" name="Name" sourceRef="obtain" targetRef="obtainServiceUrlByName">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainServiceInstanceUrlByName" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:exclusiveGateway id="serviceFoundCheck" name="Service Exist?" default="notFound">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>foundYes</bpmn2:outgoing>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="foundYes" name="Yes" sourceRef="serviceFoundCheck" targetRef="ExclusiveGateway_2">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceFoundCheck" targetRef="EndEvent_3" />
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_29" />
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ExclusiveGateway_3" targetRef="serviceFoundCheck" />
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_26" />
- </bpmn2:endEvent>
- <bpmn2:startEvent id="StartEvent_1">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization" />
- </bpmn2:process>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericGetService">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_69" bpmnElement="StartEvent_1">
- <dc:Bounds x="108" y="264" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="126" y="305" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="intialization">
- <dc:Bounds x="228" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_69" targetElement="_BPMNShape_ScriptTask_288">
- <di:waypoint xsi:type="dc:Point" x="144" y="282" />
- <di:waypoint xsi:type="dc:Point" x="228" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="177" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="getUrl" isMarkerVisible="true">
- <dc:Bounds x="372" y="256" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="420" y="282" width="72" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_288" targetElement="_BPMNShape_ExclusiveGateway_227">
- <di:waypoint xsi:type="dc:Point" x="328" y="282" />
- <di:waypoint xsi:type="dc:Point" x="372" y="281" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="350" y="281" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="obtainServiceUrlById">
- <dc:Bounds x="528" y="197" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_228" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds x="738" y="256" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="763" y="311" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="getServiceInstance">
- <dc:Bounds x="820" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="getUrlYes" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_233">
- <di:waypoint xsi:type="dc:Point" x="397" y="256" />
- <di:waypoint xsi:type="dc:Point" x="397" y="170" />
- <di:waypoint xsi:type="dc:Point" x="446" y="170" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="397" y="213" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_289" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628" y="237" />
- <di:waypoint xsi:type="dc:Point" x="671" y="237" />
- <di:waypoint xsi:type="dc:Point" x="671" y="195" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="668" y="221" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_228" targetElement="_BPMNShape_ScriptTask_290">
- <di:waypoint xsi:type="dc:Point" x="788" y="281" />
- <di:waypoint xsi:type="dc:Point" x="820" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="798" y="281" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="getUrlNo" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="397" y="306" />
- <di:waypoint xsi:type="dc:Point" x="397" y="370" />
- <di:waypoint xsi:type="dc:Point" x="763" y="370" />
- <di:waypoint xsi:type="dc:Point" x="763" y="306" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="400" y="324" width="22" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_291" bpmnElement="toggleSuccess">
- <dc:Bounds x="960" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_290" targetElement="_BPMNShape_ScriptTask_291">
- <di:waypoint xsi:type="dc:Point" x="920" y="282" />
- <di:waypoint xsi:type="dc:Point" x="960" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="937" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_223" bpmnElement="EndEvent_1">
- <dc:Bounds x="1133" y="264" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1151" y="305" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_291" targetElement="_BPMNShape_EndEvent_223">
- <di:waypoint xsi:type="dc:Point" x="1060" y="282" />
- <di:waypoint xsi:type="dc:Point" x="1133" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1100" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_25" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
- <dc:Bounds x="152" y="468" width="325" height="169" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_2">
- <dc:Bounds x="176" y="535" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="194" y="576" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_224" bpmnElement="EndEvent_2">
- <dc:Bounds x="416" y="535" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="434" y="576" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="processBPMNException">
- <dc:Bounds x="265" y="513" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_292">
- <di:waypoint xsi:type="dc:Point" x="212" y="553" />
- <di:waypoint xsi:type="dc:Point" x="265" y="553" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="233" y="553" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_292" targetElement="_BPMNShape_EndEvent_224">
- <di:waypoint xsi:type="dc:Point" x="365" y="553" />
- <di:waypoint xsi:type="dc:Point" x="416" y="553" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="385" y="553" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="obtainServiceUrlByName">
- <dc:Bounds x="528" y="59" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_233" bpmnElement="obtain" isMarkerVisible="true">
- <dc:Bounds x="446" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="501" y="164" width="53" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_234" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds x="646" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="671" y="200" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="obtainById" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_289">
- <di:waypoint xsi:type="dc:Point" x="471" y="195" />
- <di:waypoint xsi:type="dc:Point" x="471" y="236" />
- <di:waypoint xsi:type="dc:Point" x="528" y="237" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="476" y="207" width="16" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="obtainByName" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_301">
- <di:waypoint xsi:type="dc:Point" x="471" y="145" />
- <di:waypoint xsi:type="dc:Point" x="471" y="99" />
- <di:waypoint xsi:type="dc:Point" x="528" y="99" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="471" y="115" width="40" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_301" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628" y="99" />
- <di:waypoint xsi:type="dc:Point" x="671" y="99" />
- <di:waypoint xsi:type="dc:Point" x="671" y="145" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="665" y="99" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_235" bpmnElement="serviceFoundCheck" isMarkerVisible="true">
- <dc:Bounds x="738" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="735" y="125" width="59" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ExclusiveGateway_234" targetElement="_BPMNShape_ExclusiveGateway_235">
- <di:waypoint xsi:type="dc:Point" x="696" y="170" />
- <di:waypoint xsi:type="dc:Point" x="738" y="170" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="704" y="170" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="foundYes" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="763" y="195" />
- <di:waypoint xsi:type="dc:Point" x="763" y="256" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="762" y="205" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_EndEvent_229">
- <di:waypoint xsi:type="dc:Point" x="788" y="170" />
- <di:waypoint xsi:type="dc:Point" x="877" y="171" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="798" y="170" width="22" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_229" bpmnElement="EndEvent_3">
- <dc:Bounds x="877" y="153" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="895" y="194" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetServiceTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetServiceTest.groovy
deleted file mode 100644
index a8c10b1e81..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetServiceTest.groovy
+++ /dev/null
@@ -1,104 +0,0 @@
-/*-
- * ============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.onap.so.bpmn.common.scripts
-
-import com.github.tomakehurst.wiremock.junit.WireMockRule
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Ignore
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.ArgumentCaptor
-import org.mockito.Captor
-import org.mockito.Mockito
-import org.mockito.runners.MockitoJUnitRunner
-
-import static org.mockito.Mockito.times
-import static org.mockito.Mockito.when
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName
-
-/**
- * @author sushilma
- * @since January 10, 2018
- */
-@RunWith(MockitoJUnitRunner.class)
-@Ignore
-class CustomE2EGetServiceTest extends MsoGroovyTest {
-
- @Rule
- public WireMockRule wireMockRule = new WireMockRule(28090)
-
- @Captor
- static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
-
- @Test
- public void testObtainServiceInstanceUrlById (){
- ExecutionEntity mockExecution = setupMockWithPrefix('CustomE2EGetService','GENGS_')
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn('8')
- when(mockExecution.getVariable("mso.workflow.default.aai.v8.nodes-query.uri")).thenReturn('/aai/v8/search/nodes-query')
- when(mockExecution.getVariable("GENGS_type")).thenReturn('service-instance')
- when(mockExecution.getVariable("GENGS_serviceInstanceId")).thenReturn("MIS%2F1604%2F0026%2FSW_INTERNET")
- MockNodeQueryServiceInstanceById("MIS%2F1604%2F0026%2FSW_INTERNET", "GenericFlows/getSIUrlById.xml");
- CustomE2EGetService customE2EGetService = new CustomE2EGetService();
- customE2EGetService.obtainServiceInstanceUrlById(mockExecution)
- Mockito.verify(mockExecution, times(9)).setVariable(captor.capture(), captor.capture())
- Assert.assertEquals(200, captor.getAllValues().get(5))
- }
-
- @Test
- public void testObtainServiceInstanceUrlByName (){
- ExecutionEntity mockExecution = setupMockWithPrefix('CustomE2EGetService','GENGS_')
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn('8')
- when(mockExecution.getVariable("mso.workflow.default.aai.v8.nodes-query.uri")).thenReturn('/aai/v8/search/nodes-query')
- when(mockExecution.getVariable("GENGS_type")).thenReturn('service-instance')
- when(mockExecution.getVariable("GENGS_serviceInstanceName")).thenReturn("1604-MVM-26")
- MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByName.xml");
- CustomE2EGetService customE2EGetService = new CustomE2EGetService();
- customE2EGetService.obtainServiceInstanceUrlByName(mockExecution)
- Mockito.verify(mockExecution, times(8)).setVariable(captor.capture(), captor.capture())
- Assert.assertEquals(200, captor.getAllValues().get(5))
- }
-
- @Test
- public void testServiceObject (){
- ExecutionEntity mockExecution = setupMockWithPrefix('CustomE2EGetService','GENGS_')
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn('8')
- when(mockExecution.getVariable("mso.workflow.default.aai.v8.nodes-query.uri")).thenReturn('/aai/v8/search/nodes-query')
- when(mockExecution.getVariable("GENGS_type")).thenReturn('service-instance')
- when(mockExecution.getVariable("GENGS_serviceInstanceId")).thenReturn("MIS%2F1604%2F0026%2FSW_INTERNET")
- when(mockExecution.getVariable("GENGS_resourceLink")).thenReturn("/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/1234453")
- MockGetServiceInstance("MSO_1610_dev", "MSO-dev-service-type", "1234453", "GenericFlows/getServiceInstance.xml");
- CustomE2EGetService customE2EGetService = new CustomE2EGetService();
- customE2EGetService.getServiceObject(mockExecution)
- Mockito.verify(mockExecution, times(7)).setVariable(captor.capture(), captor.capture())
- Assert.assertEquals(200, captor.getAllValues().get(5))
- }
-}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetServiceTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetServiceTest.groovy
deleted file mode 100644
index 49edd813f7..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetServiceTest.groovy
+++ /dev/null
@@ -1,124 +0,0 @@
-/*-
- * ============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.onap.so.bpmn.common.scripts
-
-import com.github.tomakehurst.wiremock.junit.WireMockRule
-import org.camunda.bpm.engine.ProcessEngineServices
-import org.camunda.bpm.engine.RepositoryService
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.camunda.bpm.engine.repository.ProcessDefinition
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Ignore
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.ArgumentCaptor
-import org.mockito.Captor
-import org.mockito.Mockito
-import org.mockito.runners.MockitoJUnitRunner
-import org.onap.so.bpmn.core.WorkflowException
-
-import static com.github.tomakehurst.wiremock.client.WireMock.*
-import static org.mockito.Mockito.*
-
-@RunWith(MockitoJUnitRunner.class)
-@Ignore
-class GenericGetServiceTest {
-
- def prefix = "GENGS_"
- @Captor
- ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class);
-
- @Rule
- public WireMockRule wireMockRule = new WireMockRule(8090);
-
- @Test
- public void testGetServiceObject() {
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
- when(mockExecution.getVariable("aai.endpoint")).thenReturn('http://localhost:8090')
- when(mockExecution.getVariable(prefix + "type")).thenReturn('service-instance')
- when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn('12345')
- when(mockExecution.getVariable(prefix + "resourceLink")).thenReturn("/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn('8')
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
-
- mockData()
- GenericGetService obj = new GenericGetService()
- obj.getServiceObject(mockExecution)
-
- Mockito.verify(mockExecution).setVariable("prefix", prefix)
- Mockito.verify(mockExecution).setVariable(prefix + "getServiceUrl", "http://localhost:8090/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/")
- Mockito.verify(mockExecution).setVariable(prefix + "getServiceResponseCode", 200)
- }
-
- @Test
- public void testGetServiceObjectEndpointNull() {
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn('true')
- when(mockExecution.getVariable("aai.endpoint")).thenReturn(null)
- when(mockExecution.getVariable(prefix + "type")).thenReturn('service-instance')
- when(mockExecution.getVariable(prefix + "serviceInstanceId")).thenReturn('12345')
- when(mockExecution.getVariable(prefix + "resourceLink")).thenReturn("/aai/v8/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn('8')
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
-
- mockData()
- try {
- GenericGetService obj = new GenericGetService()
- obj.getServiceObject(mockExecution)
- } catch (Exception ex) {
- println " Test End - Handle catch-throw BpmnError()! "
- }
-
- Mockito.verify(mockExecution, times(3)).setVariable(captor.capture(), captor.capture())
- WorkflowException workflowException = captor.getValue()
- Assert.assertEquals(9999, workflowException.getErrorCode())
- Assert.assertEquals("org.apache.http.client.ClientProtocolException", workflowException.getErrorMessage())
- }
-
- private void mockData() {
- stubFor(get(urlMatching(".*/aai/v[0-9]+/business/customers/customer/MSO_1610_dev/service-subscriptions/service-subscription/MSO-dev-service-type/service-instances/service-instance/.*"))
- .willReturn(aResponse()
- .withStatus(200).withHeader("Content-Type", "text/xml")
- .withBodyFile("")))
- }
-
- private ExecutionEntity setupMock() {
-
- ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
- when(mockProcessDefinition.getKey()).thenReturn("GenericGetService")
- RepositoryService mockRepositoryService = mock(RepositoryService.class)
- when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
- when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("GenericGetService")
- when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
- ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
- when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- when(mockExecution.getId()).thenReturn("100")
- when(mockExecution.getProcessDefinitionId()).thenReturn("GenericGetService")
- when(mockExecution.getProcessInstanceId()).thenReturn("GenericGetService")
- when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
- when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
- return mockExecution
- }
-}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetVnfTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetVnfTest.groovy
deleted file mode 100644
index 1aef78f0d5..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericGetVnfTest.groovy
+++ /dev/null
@@ -1,180 +0,0 @@
-/*-
- * ============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.onap.so.bpmn.common.scripts
-
-import com.github.tomakehurst.wiremock.junit.WireMockRule
-import org.camunda.bpm.engine.ProcessEngineServices
-import org.camunda.bpm.engine.RepositoryService
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.camunda.bpm.engine.repository.ProcessDefinition
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Ignore
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.ArgumentCaptor
-import org.mockito.Captor
-import org.mockito.Mockito
-import org.mockito.MockitoAnnotations
-import org.mockito.runners.MockitoJUnitRunner
-import org.onap.so.bpmn.core.WorkflowException
-
-import static com.github.tomakehurst.wiremock.client.WireMock.*
-import static org.mockito.Mockito.mock
-import static org.mockito.Mockito.times
-import static org.mockito.Mockito.when
-
-@RunWith(MockitoJUnitRunner.class)
-@Ignore
-class GenericGetVnfTest {
-
- def prefix = "GENGV_"
-
- @Rule
- public WireMockRule wireMockRule = new WireMockRule(28090)
-
- @Captor
- static ArgumentCaptor<ExecutionEntity> captor = ArgumentCaptor.forClass(ExecutionEntity.class)
-
-
- @Before
- public void init()
- {
- MockitoAnnotations.initMocks(this)
- }
-
- @Test
- public void testGetVnfByName() {
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable(prefix+"vnfName")).thenReturn("genricVnf_test")
- when(mockExecution.getVariable(prefix+"type")).thenReturn("generic-vnf")
- when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
-
- mockData()
- GenericGetVnf obj = new GenericGetVnf()
- obj.getVnfByName(mockExecution)
-
- Mockito.verify(mockExecution).setVariable("prefix","GENGV_")
- Mockito.verify(mockExecution).setVariable(prefix+"getVnfPath","http://localhost:28090/aai/v9/network/generic-vnfs/generic-vnf?vnf-name=genricVnf_test&depth=1")
- }
-
- @Test
- public void testGetVnfByNameEndpointNull() {
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("aai.endpoint")).thenReturn(null)
- when(mockExecution.getVariable(prefix+"vnfName")).thenReturn("genricVnf_test")
- when(mockExecution.getVariable(prefix+"type")).thenReturn("generic-vnf")
- when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
-
- mockData()
- try{
- GenericGetVnf obj = new GenericGetVnf()
- obj.getVnfByName(mockExecution)
- }catch (Exception ex) {
- println " Test End - Handle catch-throw BpmnError()! "
- }
-
- Mockito.verify(mockExecution, times(3)).setVariable(captor.capture(), captor.capture())
- WorkflowException workflowException = captor.getValue()
- Assert.assertEquals(9999, workflowException.getErrorCode())
- Assert.assertEquals("org.apache.http.client.ClientProtocolException", workflowException.getErrorMessage())
- }
-
- @Test
- public void testGetVnfById() {
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:28090")
- when(mockExecution.getVariable(prefix+"vnfId")).thenReturn("genricVnf_test")
- when(mockExecution.getVariable(prefix+"type")).thenReturn("generic-vnf")
- when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
-
- mockData()
- GenericGetVnf obj = new GenericGetVnf()
- obj.getVnfById(mockExecution)
-
- Mockito.verify(mockExecution).setVariable("prefix","GENGV_")
- Mockito.verify(mockExecution).setVariable(prefix+"getVnfPath","http://localhost:28090/aai/v9/network/generic-vnfs/generic-vnf/genricVnf_test?depth=1")
- }
-
- @Test
- public void testGetVnfByIdEndpointNull() {
-
- ExecutionEntity mockExecution = setupMock()
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("aai.endpoint")).thenReturn(null)
- when(mockExecution.getVariable(prefix+"vnfId")).thenReturn("genricVnf_test")
- when(mockExecution.getVariable(prefix+"type")).thenReturn("generic-vnf")
- when(mockExecution.getVariable("mso.workflow.DoCreateVfModule.aai.generic-vnf.uri")).thenReturn("/aai/v9/network/generic-vnfs/generic-vnf")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn("http://org.openecomp.aai.inventory/")
-
- mockData()
- try{
- GenericGetVnf obj = new GenericGetVnf()
- obj.getVnfById(mockExecution)
- }catch (Exception ex) {
- println " Test End - Handle catch-throw BpmnError()! "
- }
-
- Mockito.verify(mockExecution, times(3)).setVariable(captor.capture(), captor.capture())
- WorkflowException workflowException = captor.getValue()
- Assert.assertEquals(9999, workflowException.getErrorCode())
- Assert.assertEquals("org.apache.http.client.ClientProtocolException", workflowException.getErrorMessage())
- }
-
- private static ExecutionEntity setupMock() {
- ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
- when(mockProcessDefinition.getKey()).thenReturn("DoCreateVfModule")
- RepositoryService mockRepositoryService = mock(RepositoryService.class)
- when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
- when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("DoCreateVfModule")
- when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
- ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
- when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
- when(mockExecution.getId()).thenReturn("100")
- when(mockExecution.getProcessDefinitionId()).thenReturn("DoCreateVfModule")
- when(mockExecution.getProcessInstanceId()).thenReturn("DoCreateVfModule")
- when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
- when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
-
- return mockExecution
- }
-
- private static void mockData() {
- stubFor(get(urlMatching(".*/aai/v[0-9]+/network/generic-vnfs/generic-vnf.*"))
- .willReturn(aResponse()
- .withStatus(200).withHeader("Content-Type", "text/xml")
- .withBodyFile("GenericFlows/getGenericVnfResponse.xml")))
- }
-}
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericPutServiceTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericPutServiceTest.groovy
deleted file mode 100644
index d4ea8ce71f..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/GenericPutServiceTest.groovy
+++ /dev/null
@@ -1,235 +0,0 @@
-/*-
- * ============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.onap.so.bpmn.common.scripts
-
-import static org.mockito.Mockito.*
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutServiceInstance;
-
-import org.camunda.bpm.engine.ProcessEngineServices
-import org.camunda.bpm.engine.RepositoryService
-import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
-import org.camunda.bpm.engine.repository.ProcessDefinition
-import org.junit.Before
-import org.junit.Ignore
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.mockito.MockitoAnnotations
-import org.mockito.internal.debugging.MockitoDebuggerImpl
-import org.mockito.runners.MockitoJUnitRunner
-
-import com.github.tomakehurst.wiremock.client.WireMock
-import com.github.tomakehurst.wiremock.junit.WireMockRule
-import org.apache.commons.lang3.*
-
-@RunWith(MockitoJUnitRunner.class)
-@Ignore
-class GenericPutServiceTest {
-
- @Rule
- public WireMockRule wireMockRule = new WireMockRule(8090);
-
- @Before
- public void init()
- {
- MockitoAnnotations.initMocks(this)
-
- }
-
- @Test
- public void preProcessRequest() {
-
-
- println "************ preProcessRequest ************* "
-
- ExecutionEntity mockExecution = setupMock()
-
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("GENPS_globalSubscriberId")).thenReturn("1604-MVM-26")
- when(mockExecution.getVariable("GENPS_serviceInstanceId")).thenReturn("MIS%2F1604%2F0026%2FSW_INTERNET")
- when(mockExecution.getVariable("GENPS_serviceType")).thenReturn("SDN-ETHERNET-INTERNET")
- when(mockExecution.getVariable("GENPS_serviceInstanceData")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("GENPS_type")).thenReturn("service-instance")
-
- GenericPutService putServiceInstance= new GenericPutService()
- putServiceInstance.preProcessRequest(mockExecution)
-
- // check the sequence of variable invocation
- //MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- //preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
- verify(mockExecution).setVariable("prefix", "GENPS_")
-
- // execution.getVariable("isDebugLogEnabled")
-
- verify(mockExecution).setVariable("GENPS_SuccessIndicator", false)
- // verify(mockExecution).setVariable("globalSubscriberId", "1604-MVM-26")
- // verify(mockExecution).setVariable("serviceInstanceId", "MIS%2F1604%2F0026%2FSW_INTERNET")
- // verify(mockExecution).setVariable("serviceType", "SDN-ETHERNET-INTERNET")
- // verify(mockExecution).setVariable("ServiceInstanceData", "f70e927b-6087-4974-9ef8-c5e4d5847ca4")
-
-
- }
-
-
- @Test
- @Ignore
- public void putServiceInstance() {
- println "************ putServiceInstance ************* "
-
- WireMock.reset();
-
- MockPutServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml");
- ExecutionEntity mockExecution = setupMock()
-
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("GENPS_globalSubscriberId")).thenReturn("1604-MVM-26")
- when(mockExecution.getVariable("GENPS_serviceInstanceId")).thenReturn("MIS%2F1604%2F0026%2FSW_INTERNET")
- when(mockExecution.getVariable("GENPS_serviceType")).thenReturn("SDN-ETHERNET-INTERNET")
- when(mockExecution.getVariable("GENPS_serviceInstanceData")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
- when(mockExecution.getVariable("mso.workflow.PutServiceInstance.aai.business.customer.uri")).thenReturn("/aai/v7/business/customers/customer")
- when(mockExecution.getVariable("GENPS_serviceInstanceData")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("GENPS_type")).thenReturn("service-instance")
- when(mockExecution.getVariable("mso.workflow.global.default.aai.namespace")).thenReturn('http://org.openecomp.aai.inventory/')
- when(mockExecution.getVariable("mso.workflow.global.default.aai.version")).thenReturn("7")
- when(mockExecution.getVariable("mso.workflow.default.aai.v7.customer.uri")).thenReturn("/aai/v7/business/customers/customer")
- when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
- when(mockExecution.getVariable("aai.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC")
-
- GenericPutService serviceInstance= new GenericPutService()
- serviceInstance.putServiceInstance(mockExecution)
-
- // check the sequence of variable invocation
- MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
- verify(mockExecution).setVariable("prefix", "GENPS_")
-
- // execution.getVariable("isDebugLogEnabled")
- // verify(mockExecution).setVariable("GENPSI_serviceInstanceData","f70e927b-6087-4974-9ef8-c5e4d5847ca4")
-
- String servicePayload = """<service-instance xmlns="http://org.openecomp.aai.inventory/v7">f70e927b-6087-4974-9ef8-c5e4d5847ca4</service-instance>""" as String
- verify(mockExecution).setVariable("GENPS_serviceInstancePayload",servicePayload)
-
- String serviceAaiPath = "http://localhost:28090/aai/v7/business/customers/customer/1604-MVM-26/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET"
- verify(mockExecution).setVariable("GENPS_putServiceInstanceAaiPath", serviceAaiPath)
-
- int responseCode = 200
- verify(mockExecution).setVariable("GENPS_putServiceInstanceResponseCode", responseCode)
-
- String aaiResponse = """<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Content-Length" value="0"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:551-132672"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
-</rest:RESTResponse>"""
-
- verify(mockExecution).setVariable("GENPS_putServiceInstanceResponse", aaiResponse)
-
- verify(mockExecution).setVariable("GENPS_SuccessIndicator", true)
- }
-
- @Test
- @Ignore
- public void putServiceInstance_404() {
-
-
- println "************ putServiceInstance ************* "
-
- WireMock.reset();
-
- ExecutionEntity mockExecution = setupMock()
-
- when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
- when(mockExecution.getVariable("GENPS_globalSubscriberId")).thenReturn("1604-MVM-26")
- when(mockExecution.getVariable("GENPS_serviceInstanceId")).thenReturn("MIS%2F1604%2F0026%2FSW_INTERNET")
- when(mockExecution.getVariable("GENPS_serviceType")).thenReturn("SDN-ETHERNET-INTERNET")
- when(mockExecution.getVariable("GENPS_ServiceInstanceData")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
- when(mockExecution.getVariable("aai.endpoint")).thenReturn("http://localhost:8090")
- when(mockExecution.getVariable("mso.workflow.PutServiceInstance.aai.business.customer_uri")).thenReturn("/aai/v7/business/customers/customer")
- when(mockExecution.getVariable("GENPS_ServiceInstanceData")).thenReturn("f70e927b-6087-4974-9ef8-c5e4d5847ca4")
-
- GenericPutService serviceInstance= new GenericPutService()
- serviceInstance.putServiceInstance(mockExecution)
-
- // check the sequence of variable invocation
- MockitoDebuggerImpl preDebugger = new MockitoDebuggerImpl()
- preDebugger.printInvocations(mockExecution)
-
- verify(mockExecution, atLeast(1)).getVariable("isDebugLogEnabled")
- verify(mockExecution).setVariable("prefix", "GENPS_")
-
- // execution.getVariable("isDebugLogEnabled")
-
-
- verify(mockExecution).setVariable("GENPS_serviceInstanceData","f70e927b-6087-4974-9ef8-c5e4d5847ca4")
-
- String serviceInstancepayload = """<service-instance xmlns="http://org.onap.so.aai.inventory/v7">f70e927b-6087-4974-9ef8-c5e4d5847ca4
- </service-instance>""" as String
- verify(mockExecution).setVariable("GENPS_serviceInstancePayload",serviceInstancepayload)
-
- String serviceInstanceAaiPath = "http://localhost:8090/aai/v7/business/customers/customer/1604-MVM-26/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET"
- verify(mockExecution).setVariable("GENPS_putServiceInstanceAaiPath", serviceInstanceAaiPath)
-
- int responseCode = 404
- verify(mockExecution).setVariable("GENPS_putServiceInstanceResponseCode", responseCode)
-
- String aaiResponse = ""
- verify(mockExecution).setVariable("GENPS_putServiceInstanceResponse", aaiResponse)
-
- verify(mockExecution).setVariable("GENPS_SuccessIndicator", false)
-
-
- }
-
-
- private ExecutionEntity setupMock() {
-
- ProcessDefinition mockProcessDefinition = mock(ProcessDefinition.class)
- when(mockProcessDefinition.getKey()).thenReturn("PutServiceInstance")
- RepositoryService mockRepositoryService = mock(RepositoryService.class)
- when(mockRepositoryService.getProcessDefinition()).thenReturn(mockProcessDefinition)
- when(mockRepositoryService.getProcessDefinition().getKey()).thenReturn("PutServiceInstance")
- when(mockRepositoryService.getProcessDefinition().getId()).thenReturn("100")
- ProcessEngineServices mockProcessEngineServices = mock(ProcessEngineServices.class)
- when(mockProcessEngineServices.getRepositoryService()).thenReturn(mockRepositoryService)
-
- ExecutionEntity mockExecution = mock(ExecutionEntity.class)
- // Initialize prerequisite variables
-
- when(mockExecution.getId()).thenReturn("100")
- when(mockExecution.getProcessDefinitionId()).thenReturn("PutServiceInstance")
- when(mockExecution.getProcessInstanceId()).thenReturn("PutServiceInstance")
- when(mockExecution.getProcessEngineServices()).thenReturn(mockProcessEngineServices)
- when(mockExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(mockExecution.getProcessDefinitionId())).thenReturn(mockProcessDefinition)
-
- return mockExecution
- }
-
-}
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml
deleted file mode 100644
index 7c879879ef..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfByNameResponse.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<generic-vnfs xmlns="http://com.aai.inventory/v3">
- <generic-vnf>
- <vnf-id>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnf-id>
- <vnf-name>testVnfName123</vnf-name>
- <vnf-type>mmsc-capacity</vnf-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <equipment-role>vMMSC</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <resource-version>testReVer123</resource-version>
- <relationship-list>
- <relationship>
- <related-to>nothing</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <l-interfaces/>
- <lag-interfaces/>
- </generic-vnf>
- </generic-vnfs> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml
deleted file mode 100644
index 0b5a822b68..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<generic-vnfs xmlns="http://com.aai.inventory/v3">
- <generic-vnf>
- <vnf-id>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnf-id>
- <vnf-name>testVnfName123</vnf-name>
- <vnf-type>mmsc-capacity</vnf-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <equipment-role>vMMSC</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <relationship-list>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <l-interfaces/>
- <lag-interfaces/>
- </generic-vnf>
- <generic-vnf>
- <vnf-id>802767b3-18a6-4432-96db-25522786aee0</vnf-id>
- <vnf-name>ZRDM1MMSC03</vnf-name>
- <vnf-type>mmsc-capacity</vnf-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <equipment-role>vMMSC</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <relationship-list>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <l-interfaces/>
- <lag-interfaces/>
- </generic-vnf>
- </generic-vnfs> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml
deleted file mode 100644
index 0b5a822b68..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getGenericVnfResponse_hasRelationships.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<generic-vnfs xmlns="http://com.aai.inventory/v3">
- <generic-vnf>
- <vnf-id>2f1cc940-455f-4ee2-9411-a7899cd4f124</vnf-id>
- <vnf-name>testVnfName123</vnf-name>
- <vnf-type>mmsc-capacity</vnf-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <equipment-role>vMMSC</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <relationship-list>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <l-interfaces/>
- <lag-interfaces/>
- </generic-vnf>
- <generic-vnf>
- <vnf-id>802767b3-18a6-4432-96db-25522786aee0</vnf-id>
- <vnf-name>ZRDM1MMSC03</vnf-name>
- <vnf-type>mmsc-capacity</vnf-type>
- <service-id>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</service-id>
- <equipment-role>vMMSC</equipment-role>
- <orchestration-status>pending-create</orchestration-status>
- <relationship-list>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/c597ab81-fece-49f4-a4f5-710cebb13c29/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>c597ab81-fece-49f4-a4f5-710cebb13c29</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/53956c91-6e5e-49aa-88dd-535f57e66e70/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>53956c91-6e5e-49aa-88dd-535f57e66e70</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/44e0d9e0-9334-4ec6-9344-07a96dac629f/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>44e0d9e0-9334-4ec6-9344-07a96dac629f</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>l3-network</related-to>
- <related-link>https://aai-app-e2e.test.com:8443/aai/v3/network/l3-networks/l3-network/ac49d99b-5daf-4624-9f8e-188b126ea166/</related-link>
- <relationship-data>
- <relationship-key>l3-network.network-id</relationship-key>
- <relationship-value>ac49d99b-5daf-4624-9f8e-188b126ea166</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <l-interfaces/>
- <lag-interfaces/>
- </generic-vnf>
- </generic-vnfs> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml
deleted file mode 100644
index d0fccd80c9..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlById.xml
+++ /dev/null
@@ -1,6 +0,0 @@
- <search-results xmlns="http://com.aai.inventory">
- <result-data>
- <resource-type>service-instance</resource-type>
- <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
- </result-data>
- </search-results> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByName.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByName.xml
deleted file mode 100644
index d0fccd80c9..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByName.xml
+++ /dev/null
@@ -1,6 +0,0 @@
- <search-results xmlns="http://com.aai.inventory">
- <result-data>
- <resource-type>service-instance</resource-type>
- <resource-link>https://aai-ext1.test.com:8443/aai/v7/business/customers/customer/SDN-ETHERNET-INTERNET/service-subscriptions/service-subscription/123456789/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
- </result-data>
- </search-results> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByNameMultiCustomer.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByNameMultiCustomer.xml
deleted file mode 100644
index fce47fcd0d..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getSIUrlByNameMultiCustomer.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<search-results xmlns="http://org.openecomp.aai.inventory/v11">
- <result-data>
- <resource-type>service-instance</resource-type>
- <resource-link>/aai/v11/business/customers/customer/AbcBank/service-subscriptions/service-subscription/ABC-ST/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
- </result-data>
- <result-data>
- <resource-type>service-instance</resource-type>
- <resource-link>/aai/v11/business/customers/customer/XyCorporation/service-subscriptions/service-subscription/XY-ST/service-instances/service-instance/MIS%252F1604%252F0026%252FSW_INTERNET</resource-link>
- </result-data>
-</search-results> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml
deleted file mode 100644
index e377c70474..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceInstance.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<service-instance>
- <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
- <resource-version>123456789</resource-version>
- <relationship-list>
- <relationship>
- <related-to>cvlan-tag</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/port-groups/port-group/slcp1447vbc.ipag/cvlan-tags/cvlan-tag/2003/</related-link>
- <relationship-data>
- <relationship-key>cvlan-tag.cvlan-tag</relationship-key>
- <relationship-value>2003</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>port-group.interface-id</relationship-key>
- <relationship-value>slcp1447vbc.ipag</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>vce.vnf-id</relationship-key>
- <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vce</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/</related-link>
- <relationship-data>
- <relationship-key>vce.vnf-id</relationship-key>
- <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </service-instance> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceSubscription.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceSubscription.xml
deleted file mode 100644
index 52e75d970a..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getServiceSubscription.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<service-subscription xmlns="http://com.aai.inventory">
- <service-type>SDN-ETHERNET-INTERNET</service-type>
- <resource-version>1234</resource-version>
- <service-instance>
- <service-instance-id>MIS/1604/0026/SW_INTERNET</service-instance-id>
- <resource-version>123456789</resource-version>
- <relationship-list>
- <relationship>
- <related-to>cvlan-tag</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/port-groups/port-group/slcp1447vbc.ipag/cvlan-tags/cvlan-tag/2003/</related-link>
- <relationship-data>
- <relationship-key>cvlan-tag.cvlan-tag</relationship-key>
- <relationship-value>2003</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>port-group.interface-id</relationship-key>
- <relationship-value>slcp1447vbc.ipag</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>vce.vnf-id</relationship-key>
- <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vce</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/network/vces/vce/832bace2-3fb0-49e0-a6a4-07c47223c535/</related-link>
- <relationship-data>
- <relationship-key>vce.vnf-id</relationship-key>
- <relationship-value>832bace2-3fb0-49e0-a6a4-07c47223c535</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </service-instance>
- </service-subscription> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceByNameResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceByNameResponse.xml
deleted file mode 100644
index b55d51971d..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceByNameResponse.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<vce xmlns="http://com.aai.inventory">
- <vnf-id>1936628a-d22f-4943-8587-a57bab2ece7a</vnf-id>
- <vnf-name>testVnfName123</vnf-name>
- <vnf-name2>US0112SLCP1VBRT076</vnf-name2>
- <vnf-type>esx-vce</vnf-type>
- <prov-status>NVTPROV</prov-status>
- <orchestration-status>created</orchestration-status>
- <resource-version>0000020</resource-version>
- <heat-stack-id>slcp1476vbc/94a3c72b-94d5-444b-9a1f-647a36c2181d</heat-stack-id>
- <mso-catalog-key/>
- <vpe-id>VPESAT-mtanjrsv126</vpe-id>
- <ipv4-oam-address>135.21.249.160</ipv4-oam-address>
- <port-groups>
- <port-group>
- <interface-id>slcp1476vbc.vpe</interface-id>
- <neutron-network-id>e7568706-a2a9-45f8-aef8-95a0e2910953</neutron-network-id>
- <neutron-network-name>dvspg-VCE_VPE-slcp1476vbc</neutron-network-name>
- <interface-role>Internet</interface-role>
- <port-group-name>dvspg-VCE_VPE-slcp1476vbc</port-group-name>
- <resource-version>0000020</resource-version>
- <switch-name>dvs-slcp1-01</switch-name>
- <orchestration-status>created</orchestration-status>
- <heat-stack-id>dvspg-VCE_VPE-slcp1476vbc/c1299f74-da35-4228-b1e0-d2fd07176196</heat-stack-id>
- <mso-catalog-key/>
- <cvlan-tags>
- <cvlan-tag-entry>
- <cvlan-tag>3012</cvlan-tag>
- <resource-version>0000020</resource-version>
- </cvlan-tag-entry>
- </cvlan-tags>
- </port-group>
- <port-group>
- <interface-id>slcp1476vbc.ipag</interface-id>
- <neutron-network-id>3477ddb6-b925-4971-ab62-c84b69634c49</neutron-network-id>
- <neutron-network-name>dvspg-IPAG_VCE-slcp1476vbc</neutron-network-name>
- <interface-role>Customer</interface-role>
- <port-group-name>dvspg-IPAG_VCE-slcp1476vbc</port-group-name>
- <switch-name>dvs-slcp1-01</switch-name>
- <resource-version>0000020</resource-version>
- <orchestration-status>created</orchestration-status>
- <heat-stack-id>dvspg-IPAG_VCE-slcp1476vbc/1e9c033a-2eef-47f5-9d48-98e0b59538e7</heat-stack-id>
- <mso-catalog-key/>
- <cvlan-tags>
- <cvlan-tag-entry>
- <cvlan-tag>2003</cvlan-tag>
- <resource-version>0000020</resource-version>
- </cvlan-tag-entry>
- </cvlan-tags>
- </port-group>
- </port-groups>
- <relationship-list>
- <relationship>
- <related-to>service-instance</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/business/customers/customer/011216-1602-SDNC001/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET/service-instances/service-instance/SDNC%2FVLXM%2F0112001%2F%2FSW_INTERNET/</related-link>
- <relationship-data>
- <relationship-key>service-instance.service-instance-id</relationship-key>
- <relationship-value>SDNC/VLXM/0112001//SW_INTERNET</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>service-subscription.service-type</relationship-key>
- <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>customer.global-customer-id</relationship-key>
- <relationship-value>011216-1602-SDNC001</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vserver</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/servers/v2/3d5f3fe23821416fac2b69af65248c74/vservers/ecab47d5-3450-4507-ada9-2b3c58485c51/</related-link>
- <relationship-data>
- <relationship-key>vserver.vserver-id</relationship-key>
- <relationship-value>ecab47d5-3450-4507-ada9-2b3c58485c51</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>3d5f3fe23821416fac2b69af65248c74</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>complex</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/cloud-infrastructure/complexes/complex/MDTWNJ21A4/</related-link>
- <relationship-data>
- <relationship-key>complex.physical-location-id</relationship-key>
- <relationship-value>MDTWNJ21A4</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>availability-zone</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/cloud-infrastructure/availability-zones/availability-zone/slcp1-esx-az01/</related-link>
- <relationship-data>
- <relationship-key>availability-zone.availability-zone-name</relationship-key>
- <relationship-value>slcp1-esx-az01</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </vce> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceResponse.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceResponse.xml
deleted file mode 100644
index e5f98bfe33..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericFlows/getVceResponse.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<vce xmlns="http://com.aai.inventory">
- <vnf-id>1936628a-d22f-4943-8587-a57bab2ece7a</vnf-id>
- <vnf-name>testVnfName123</vnf-name>
- <vnf-name2>US0112SLCP1VBRT076</vnf-name2>
- <vnf-type>esx-vce</vnf-type>
- <prov-status>NVTPROV</prov-status>
- <orchestration-status>created</orchestration-status>
- <heat-stack-id>slcp1476vbc/94a3c72b-94d5-444b-9a1f-647a36c2181d</heat-stack-id>
- <mso-catalog-key/>
- <vpe-id>VPESAT-mtanjrsv126</vpe-id>
- <ipv4-oam-address>135.21.249.160</ipv4-oam-address>
- <port-groups>
- <port-group>
- <interface-id>slcp1476vbc.vpe</interface-id>
- <neutron-network-id>e7568706-a2a9-45f8-aef8-95a0e2910953</neutron-network-id>
- <neutron-network-name>dvspg-VCE_VPE-slcp1476vbc</neutron-network-name>
- <interface-role>Internet</interface-role>
- <port-group-name>dvspg-VCE_VPE-slcp1476vbc</port-group-name>
- <switch-name>dvs-slcp1-01</switch-name>
- <orchestration-status>created</orchestration-status>
- <heat-stack-id>dvspg-VCE_VPE-slcp1476vbc/c1299f74-da35-4228-b1e0-d2fd07176196</heat-stack-id>
- <mso-catalog-key/>
- <cvlan-tags>
- <cvlan-tag-entry>
- <cvlan-tag>3012</cvlan-tag>
- </cvlan-tag-entry>
- </cvlan-tags>
- </port-group>
- <port-group>
- <interface-id>slcp1476vbc.ipag</interface-id>
- <neutron-network-id>3477ddb6-b925-4971-ab62-c84b69634c49</neutron-network-id>
- <neutron-network-name>dvspg-IPAG_VCE-slcp1476vbc</neutron-network-name>
- <interface-role>Customer</interface-role>
- <port-group-name>dvspg-IPAG_VCE-slcp1476vbc</port-group-name>
- <switch-name>dvs-slcp1-01</switch-name>
- <orchestration-status>created</orchestration-status>
- <heat-stack-id>dvspg-IPAG_VCE-slcp1476vbc/1e9c033a-2eef-47f5-9d48-98e0b59538e7</heat-stack-id>
- <mso-catalog-key/>
- <cvlan-tags>
- <cvlan-tag-entry>
- <cvlan-tag>2003</cvlan-tag>
- </cvlan-tag-entry>
- </cvlan-tags>
- </port-group>
- </port-groups>
- <relationship-list>
- <relationship>
- <related-to>service-instance</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/business/customers/customer/011216-1602-SDNC001/service-subscriptions/service-subscription/SDN-ETHERNET-INTERNET/service-instances/service-instance/SDNC%2FVLXM%2F0112001%2F%2FSW_INTERNET/</related-link>
- <relationship-data>
- <relationship-key>service-instance.service-instance-id</relationship-key>
- <relationship-value>SDNC/VLXM/0112001//SW_INTERNET</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>service-subscription.service-type</relationship-key>
- <relationship-value>SDN-ETHERNET-INTERNET</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>customer.global-customer-id</relationship-key>
- <relationship-value>011216-1602-SDNC001</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>vserver</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/servers/v2/3d5f3fe23821416fac2b69af65248c74/vservers/ecab47d5-3450-4507-ada9-2b3c58485c51/</related-link>
- <relationship-data>
- <relationship-key>vserver.vserver-id</relationship-key>
- <relationship-value>ecab47d5-3450-4507-ada9-2b3c58485c51</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>tenant.tenant-id</relationship-key>
- <relationship-value>3d5f3fe23821416fac2b69af65248c74</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>complex</related-to>
- <related-link>https://aai-ext1.test.com:8443/aai/v2/cloud-infrastructure/complexes/complex/MDTWNJ21A4/</related-link>
- <relationship-data>
- <relationship-key>complex.physical-location-id</relationship-key>
- <relationship-value>MDTWNJ21A4</relationship-value>
- </relationship-data>
- </relationship>
- <relationship>
- <related-to>availability-zone</related-to>
- <related-link>https://aai-ext1.test..com:8443/aai/v2/cloud-infrastructure/availability-zones/availability-zone/slcp1-esx-az01/</related-link>
- <relationship-data>
- <relationship-key>availability-zone.availability-zone-name</relationship-key>
- <relationship-value>slcp1-esx-az01</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </vce> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml
deleted file mode 100644
index eedbda9343..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/GenericPutServiceInstance_PutServiceInstance_AAIResponse_Success.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
- statusCode="200">
- <rest:headers>
- <rest:header name="Date" value="Thu,10 Mar 2016 00:01:18 GMT"/>
- <rest:header name="Content-Length" value="0"/>
- <rest:header name="Expires" value="Thu,01 Jan 1970 00:00:00 UTC"/>
- <rest:header name="X-AAI-TXID" value="mtcnjv9aaas03-20160310-00:01:18:551-132672"/>
- <rest:header name="Server" value="Apache-Coyote/1.1"/>
- <rest:header name="Cache-Control" value="private"/>
- </rest:headers>
-</rest:RESTResponse> \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/aaiFault.xml b/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/aaiFault.xml
deleted file mode 100644
index 66ed8f5758..0000000000
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/GenericPutServiceInstance/aaiFault.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<Fault>
-<requestError>
-<serviceException>
-<messageId>SVC3002</messageId>
-<text>Error writing output performing %1 on %2 (msg=%3) (ec=%4)</text>
-<variables>
-<variable>PUTcustomer</variable>
-<variable>SubName01</variable>
-<variable>Unexpected error reading/updating database:Adding this property for key [service-instance-id] and value [USSTU2CFCNC0101UJZZ01] violates a uniqueness constraint [service-instance-id]</variable>
-<variable>ERR.5.4.5105</variable>
-</variables>
-</serviceException>
-</requestError>
-</Fault> \ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetServiceIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetServiceIT.java
deleted file mode 100644
index 38d05fe28e..0000000000
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetServiceIT.java
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
- */
-/*-
- * ============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.onap.so.bpmn.common;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance_404;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance_500;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceSubscription;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById_404;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById_500;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName_404;
-import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName_500;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.junit.Test;
-import org.onap.so.BaseIntegrationTest;
-
-
-/**
- * Unit Test for the GenericGetService Sub Flow
- */
-
-public class GenericGetServiceIT extends BaseIntegrationTest {
-
-
- @Test
- public void testGenericGetService_success_serviceInstance() throws Exception{
- MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
- String processId = invokeSubProcess( "GenericGetService", variables);
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- assertEquals("true", successIndicator);
- assertEquals("true", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertNotNull(response);
- assertEquals(null, workflowException);
- }
-
-
- @Test
-
- public void testGenericGetService_success_serviceSubscription() throws Exception{
-
- MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", "GenericFlows/getServiceSubscription.xml");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesSubscription(variables, "", null , "1604-MVM-26", "SDN-ETHERNET-INTERNET");
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("true", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertNotNull(response);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstance_byName() throws Exception{
-
- MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByName.xml");
- MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, null, "1604-MVM-26", null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("true", found);
- assertEquals("true", obtainUrl);
- assertEquals("true", byName);
- assertNotNull(response);
- assertEquals("200", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstance_byId() throws Exception{
-
- MockNodeQueryServiceInstanceById("MIS%2F1604%2F0026%2FSW_INTERNET", "GenericFlows/getSIUrlById.xml");
- MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_genericQueryResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("true", found);
- assertEquals("true", obtainUrl);
- assertEquals("false", byName);
- assertNotNull(response);
- assertEquals("200", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstance_404Response() throws Exception{
-
- MockGetServiceInstance_404("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceSubscription404() throws Exception{
- MockGetServiceSubscription("SDN-ETHERNET-INTERNET", "1604-MVM-26", 404);
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", "1604-MVM-26");
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertNotNull(response);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstanceByName404() throws Exception{
-
- MockNodeQueryServiceInstanceByName_404("1604-MVM-26");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "", "1604-MVM-26", null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("true", obtainUrl);
- assertEquals("true", byName);
- assertEquals("404", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstanceById404() throws Exception{
-
- MockNodeQueryServiceInstanceById_404("MIS%2F1604%2F0026%2FSW_INTERNET");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_genericQueryResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("true", obtainUrl);
- assertEquals("false", byName);
- assertEquals("404", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstanceEmptyResponse() throws Exception{
-
- MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstanceByNameEmpty() throws Exception{
- MockNodeQueryServiceInstanceByName("1604-MVM-26", "");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "", "1604-MVM-26", null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("true", obtainUrl);
- assertEquals("true", byName);
- assertEquals("200", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstanceByIdEmpty() throws Exception{
-
- MockNodeQueryServiceInstanceById("MIS[%]2F1604[%]2F0026[%]2FSW_INTERNET", "");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_genericQueryResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals("true", obtainUrl);
- assertEquals("false", byName);
- assertEquals("200", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
-
- @Test
-
- public void testGenericGetService_error_serviceInstanceInvalidVariables() throws Exception{
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, null, null, "SDN-ETHERNET-INTERNET", null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
-
- String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.,workStep=*]";
-
- assertEquals("false", successIndicator);
- assertEquals("false", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertEquals(expectedWorkflowException, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceSubscriptionInvalidVariables() throws Exception{
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
-
- String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.,workStep=*]";
-
-
- assertEquals("false", successIndicator);
- assertEquals("false", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertEquals(expectedWorkflowException, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_error_serviceInstance_getSIBadResponse() throws Exception{
-
- MockGetServiceInstance_500("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "123456789");
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
-
- String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Received a bad response from AAI,workStep=*]";
-
- assertEquals("false", successIndicator);
- assertEquals("false", found);
- assertEquals("false", obtainUrl);
- assertEquals("false", byName);
- assertEquals(expectedWorkflowException, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_error_serviceInstance_getUrlByIdBadResponse() throws Exception{
-
- MockNodeQueryServiceInstanceById_500("MIS%2F1604%2F0026%2FSW_INTERNET");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_genericQueryResponseCode",processId);
-
- String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Received a bad response from AAI,workStep=*]";
-
- assertEquals("false", successIndicator);
- assertEquals("false", found);
- assertEquals("true", obtainUrl);
- assertEquals("false", byName);
- assertEquals("500", siUrlResponseCode);
- assertEquals(expectedWorkflowException, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_error_serviceInstance_getUrlByNameBadResponse() throws Exception{
-
- MockNodeQueryServiceInstanceByName_500("1604-MVM-26");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, null, "1604-MVM-26", null, null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
- String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
-
- String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Received a bad response from AAI,workStep=*]";
-
- assertEquals("false", successIndicator);
- assertEquals("false", found);
- assertEquals("true", obtainUrl);
- assertEquals("true", byName);
- assertEquals("500", siUrlResponseCode);
- assertEquals(expectedWorkflowException, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstance_byNameServicePresent() throws Exception{
-
- MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByNameMultiCustomer.xml");
- MockGetServiceInstance("AbcBank", "ABC-ST", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, null, "1604-MVM-26", "XyCorporation", null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String resourceLink = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_resourceLink",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("true", found);
- assertNotNull(resourceLink);
- assertNotNull(response);
- assertEquals("200", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- @Test
-
- public void testGenericGetService_success_serviceInstance_byNameServiceNotPresent() throws Exception{
-
- MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByNameMultiCustomer.xml");
- MockGetServiceInstance("CorporationNotPresent", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
-
- Map<String, Object> variables = new HashMap<>();
- setVariablesInstance(variables, null, "1604-MVM-26", "CorporationNotPresent", null);
-
- String processId = invokeSubProcess( "GenericGetService", variables);
-
-
- String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
- String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
- String resourceLink = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_resourceLink",processId);
- String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
- String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
- String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
-
- assertEquals("true", successIndicator);
- assertEquals("false", found);
- assertEquals(null, resourceLink);
- assertEquals(" ", response);
- assertEquals("200", siUrlResponseCode);
- assertEquals(null, workflowException);
- }
-
- private void setVariablesInstance(Map<String, Object> variables, String siId, String siName, String globalCustId, String serviceType) {
- variables.put("isDebugLogEnabled", "true");
- variables.put("GENGS_serviceInstanceId", siId);
- variables.put("GENGS_serviceInstanceName", siName);
- variables.put("GENGS_globalCustomerId",globalCustId);
- variables.put("GENGS_serviceType", serviceType);
- variables.put("GENGS_type", "service-instance");
- variables.put("mso-request-id", UUID.randomUUID().toString());
- }
-
- private void setVariablesSubscription(Map<String, Object> variables, String siId, String siName, String globalCustId, String serviceType) {
- variables.put("isDebugLogEnabled", "true");
- variables.put("GENGS_serviceInstanceId", siId);
- variables.put("GENGS_serviceInstanceName", siName);
- variables.put("GENGS_globalCustomerId",globalCustId);
- variables.put("GENGS_serviceType", serviceType);
- variables.put("GENGS_type", "service-subscription");
- variables.put("mso-request-id", UUID.randomUUID().toString());
- }
-
-
-}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy
index eceba5abe3..3702862a04 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* ONAP - SO
* ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. 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.
@@ -20,47 +20,29 @@
package org.onap.so.bpmn.infrastructure.scripts;
import static org.apache.commons.lang3.StringUtils.*;
-import groovy.xml.XmlUtil
-import groovy.json.*
-import org.onap.so.bpmn.core.domain.ServiceDecomposition
-import org.onap.so.bpmn.core.domain.ServiceInstance
+import javax.ws.rs.NotFoundException
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.ServiceInstance
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.core.domain.CompareModelsResult
import org.onap.so.bpmn.core.domain.ModelInfo
import org.onap.so.bpmn.core.domain.Resource
-import org.onap.so.bpmn.core.domain.CompareModelsResult
import org.onap.so.bpmn.core.domain.ResourceModelInfo
import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.bpmn.common.scripts.AaiUtil
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.onap.so.bpmn.common.scripts.ExceptionUtil
-import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
-import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
-import org.onap.so.bpmn.core.RollbackData
-import org.onap.so.bpmn.core.WorkflowException
-import org.onap.so.rest.APIResponse;
-import org.onap.so.rest.RESTClient
-import org.onap.so.rest.RESTConfig
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import groovy.json.*
-import java.util.List
-import java.util.Map
-import java.util.UUID;
-import javax.xml.parsers.DocumentBuilder
-import javax.xml.parsers.DocumentBuilderFactory
-
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.json.JSONObject;
-import org.json.JSONArray;
-import org.apache.commons.lang3.*
-import org.apache.commons.codec.binary.Base64;
-import org.springframework.web.util.UriUtils;
-
-import org.w3c.dom.Document
-import org.w3c.dom.Element
-import org.w3c.dom.Node
-import org.w3c.dom.NodeList
-import org.xml.sax.InputSource
/**
* This groovy class supports the <class>DoCompareModelofE2EServiceInstance.bpmn</class> process.
*
@@ -80,7 +62,7 @@ public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProce
String Prefix="DCMPMDSI_"
private static final String DebugFlag = "isDebugEnabled"
-
+
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
@@ -94,11 +76,11 @@ public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProce
execution.setVariable("prefix", Prefix)
//Inputs
-
+
//subscriberInfo. for AAI GET
String globalSubscriberId = execution.getVariable("globalSubscriberId")
utils.log("INFO"," ***** globalSubscriberId *****" + globalSubscriberId, isDebugEnabled)
-
+
String serviceType = execution.getVariable("serviceType")
utils.log("INFO"," ***** serviceType *****" + serviceType, isDebugEnabled)
@@ -142,85 +124,48 @@ public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProce
utils.log("INFO", "Exited " + method, isDebugEnabled)
}
-
- public void postProcessAAIGET(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
- String msg = ""
+ /**
+ * Gets the service instance from aai
+ *
+ * @author cb645j
+ */
+ public void getServiceInstance(DelegateExecution execution) {
try {
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- String serviceType = ""
-
- if(foundInAAI){
- utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)
-
- String siData = execution.getVariable("GENGS_service")
- utils.log("INFO", "SI Data", isDebugEnabled)
- if (isBlank(siData))
- {
- msg = "Could not retrive ServiceInstance data from AAI, Id:" + serviceInstanceId
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
- else
- {
- utils.log("INFO", "SI Data" + siData, isDebugEnabled)
-
- // Get Template uuid and version
- if (utils.nodeExists(siData, "model-invariant-id") && utils.nodeExists(siData, "model-version-id") ) {
- utils.log("INFO", "SI Data model-invariant-id and model-version-id exist", isDebugEnabled)
-
- def modelInvariantId = utils.getNodeText(siData, "model-invariant-id")
- def modelVersionId = utils.getNodeText(siData, "model-version-id")
-
- // Set Original Template info
- execution.setVariable("model-invariant-id-original", modelInvariantId)
- execution.setVariable("model-version-id-original", modelVersionId)
- }
- }
- }else{
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceId, isDebugEnabled)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- utils.logAudit("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
-
- utils.log("INFO","Service-instance NOT found in AAI. Silent Success", isDebugEnabled)
- }
- }catch (BpmnError e) {
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+ String globalSubscriberId = execution.getVariable('globalSubscriberId')
+ String serviceType = execution.getVariable('serviceType')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+ AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
+
+ ServiceInstance si = wrapper.asBean(ServiceInstance.class)
+ execution.setVariable("model-invariant-id-original", si.getModelInvariantId())
+ execution.setVariable("model-version-id-original", si.getModelVersionId())
+
+ }catch(BpmnError e) {
throw e;
- } catch (Exception ex) {
- msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
+ }catch(NotFoundException e) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Service-instance does not exist AAI")
+ }catch(Exception ex) {
+ String msg = "Internal Error in getServiceInstance: " + ex.getMessage()
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- msoLogger.trace("Exit postProcessAAIGET ")
}
public void postCompareModelVersions(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
+
List<Resource> addResourceList = execution.getVariable("addResourceList")
List<Resource> delResourceList = execution.getVariable("delResourceList")
-
+
CompareModelsResult cmpResult = new CompareModelsResult()
List<ResourceModelInfo> addedResourceList = new ArrayList<ResourceModelInfo>()
List<ResourceModelInfo> deletedResourceList = new ArrayList<ResourceModelInfo>()
-
-
+
+
String serviceModelUuid = execution.getVariable("model-version-id-target")
List<String> requestInputs = new ArrayList<String>()
ModelInfo mi = null;
@@ -233,11 +178,11 @@ public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProce
rmodel.setResourceUuid(mi.getModelUuid())
rmodel.setResourceCustomizationUuid(resourceCustomizationUuid)
addedResourceList.add(rmodel)
-
+
Map<String, Object> resourceParameters = ResourceRequestBuilder.buildResouceRequest(serviceModelUuid, resourceCustomizationUuid, null)
- requestInputs.addAll(resourceParameters.keySet())
+ requestInputs.addAll(resourceParameters.keySet())
}
-
+
for(Resource rc : delResourceList) {
mi = rc.getModelInfo()
String resourceCustomizationUuid = mi.getModelCustomizationUuid()
@@ -246,15 +191,15 @@ public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProce
rmodel.setResourceInvariantUuid(mi.getModelInvariantUuid())
rmodel.setResourceUuid(mi.getModelUuid())
rmodel.setResourceCustomizationUuid(resourceCustomizationUuid)
- deletedResourceList.add(rmodel)
+ deletedResourceList.add(rmodel)
}
-
+
cmpResult.setAddedResourceList(addedResourceList)
cmpResult.setDeletedResourceList(deletedResourceList)
- cmpResult.setRequestInputs(requestInputs)
+ cmpResult.setRequestInputs(requestInputs)
execution.setVariable("compareModelsResult", cmpResult)
}
-
+
}
-
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index bb48671e73..b5d196181b 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -3,14 +3,14 @@
* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.
@@ -22,9 +22,12 @@ package org.onap.so.bpmn.infrastructure.scripts;
import static org.apache.commons.lang3.StringUtils.*;
+import javax.ws.rs.NotFoundException
+
import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.ServiceInstance
import org.onap.so.bpmn.common.scripts.AaiUtil
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.CatalogDbUtils;
@@ -35,6 +38,11 @@ import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.domain.Resource
import org.onap.so.bpmn.core.domain.ServiceDecomposition
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
import org.springframework.web.util.UriUtils;
@@ -58,7 +66,7 @@ import groovy.json.*
* @param - failExists - TODO
* @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
* @param - sdncVersion ("1610")
- * @param - serviceDecomposition - Decomposition for R1710
+ * @param - serviceDecomposition - Decomposition for R1710
* (if macro provides serviceDecompsition then serviceModelInfo, serviceInstanceId & serviceInstanceName will be ignored)
*
* Outputs:
@@ -98,17 +106,17 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.info(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
+
if (isBlank(serviceType)) {
msg = "Input serviceType is null"
msoLogger.info(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
+
if (productFamilyId == null) {
execution.setVariable("productFamilyId", "")
}
-
+
String sdncCallbackUrl = execution.getVariable('URN_mso_workflow_sdncadapter_callback')
if (isBlank(sdncCallbackUrl)) {
msg = "URN_mso_workflow_sdncadapter_callback is null"
@@ -118,8 +126,8 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
msoLogger.info("SDNC Callback URL: " + sdncCallbackUrl)
- //requestDetails.modelInfo.for AAI PUT servieInstanceData
- //requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData
+ //requestDetails.modelInfo.for AAI PUT servieInstanceData
+ //requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData
String serviceInstanceName = execution.getVariable("serviceInstanceName")
String serviceInstanceId = execution.getVariable("serviceInstanceId")
String uuiRequest = execution.getVariable("uuiRequest")
@@ -130,7 +138,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
//aai serviceType and Role can be setted as fixed value now.
String aaiServiceType = "E2E Service"
String aaiServiceRole = "E2E Service"
-
+
execution.setVariable("modelInvariantUuid", modelInvariantUuid)
execution.setVariable("modelUuid", modelUuid)
@@ -142,7 +150,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
String statusLine = isBlank(oStatus) ? "" : "<orchestration-status>${MsoUtils.xmlEscape(oStatus)}</orchestration-status>"
-
+
AaiUtil aaiUriUtil = new AaiUtil(this)
String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
@@ -155,7 +163,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
${statusLine}
<model-invariant-id>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-id>
<model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
- </service-instance>""".trim()
+ </service-instance>""".trim()
execution.setVariable("serviceInstanceData", serviceInstanceData)
msoLogger.debug(serviceInstanceData)
msoLogger.info(" aai_uri " + aai_uri + " namespace:" + namespace)
@@ -170,7 +178,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit preProcessRequest ")
}
-
+
public void prepareDecomposeService(DelegateExecution execution) {
try {
msoLogger.trace("Inside prepareDecomposeService of create generic e2e service ")
@@ -193,7 +201,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
public void processDecomposition(DelegateExecution execution) {
- msoLogger.trace("Inside processDecomposition() of create generic e2e service flow ")
+ msoLogger.trace("Inside processDecomposition() of create generic e2e service flow ")
try {
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
} catch (Exception ex) {
@@ -202,23 +210,23 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
}
}
-
+
public void doServicePreOperation(DelegateExecution execution){
- //we need a service plugin platform here.
+ //we need a service plugin platform here.
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
- String uuiRequest = execution.getVariable("uuiRequest")
+ String uuiRequest = execution.getVariable("uuiRequest")
String newUuiRequest = ServicePluginFactory.getInstance().preProcessService(serviceDecomposition, uuiRequest);
- execution.setVariable("uuiRequest", newUuiRequest)
+ execution.setVariable("uuiRequest", newUuiRequest)
}
-
+
public void doServiceHoming(DelegateExecution execution) {
- //we need a service plugin platform here.
+ //we need a service plugin platform here.
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
- String uuiRequest = execution.getVariable("uuiRequest")
+ String uuiRequest = execution.getVariable("uuiRequest")
String newUuiRequest = ServicePluginFactory.getInstance().doServiceHoming(serviceDecomposition, uuiRequest);
- execution.setVariable("uuiRequest", newUuiRequest)
+ execution.setVariable("uuiRequest", newUuiRequest)
}
-
+
public void postProcessAAIGET(DelegateExecution execution) {
msoLogger.trace("postProcessAAIGET ")
String msg = ""
@@ -260,6 +268,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.trace("Exit postProcessAAIGET ")
}
+ //TODO use create if not exist
public void postProcessAAIPUT(DelegateExecution execution) {
msoLogger.trace("postProcessAAIPUT ")
String msg = ""
@@ -296,7 +305,32 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit postProcessAAIPUT ")
}
-
+
+ /**
+ * Gets the service instance and its relationships from aai
+ */
+ public void getServiceInstance(DelegateExecution execution) {
+ try {
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+ String globalSubscriberId = execution.getVariable('globalSubscriberId')
+ String serviceType = execution.getVariable('subscriptionServiceType')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+ AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
+
+ ServiceInstance si = wrapper.asBean(ServiceInstance.class)
+ execution.setVariable("serviceInstanceName", si.getServiceInstanceName())
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch(Exception ex) {
+ String msg = "Internal Error in getServiceInstance: " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+
public void postProcessAAIGET2(DelegateExecution execution) {
msoLogger.trace("postProcessAAIGET2 ")
String msg = ""
@@ -342,7 +376,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
public void preProcessRollback (DelegateExecution execution) {
msoLogger.trace("preProcessRollback ")
try {
-
+
Object workflowException = execution.getVariable("WorkflowException");
if (workflowException instanceof WorkflowException) {
@@ -397,10 +431,10 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("operationType", operationType)
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
List<Resource> resourceList = serviceDecomposition.getServiceResources()
-
+
for(Resource resource : resourceList){
resourceTemplateUUIDs = resourceTemplateUUIDs + resource.getModelInfo().getModelCustomizationUuid() + ":"
- }
+ }
def dbAdapterEndpoint = "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter"
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
@@ -429,23 +463,23 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preInitResourcesOperStatus.", "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, e);
execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preInitResourcesOperStatus Method:\n" + e.getMessage())
}
- msoLogger.trace("COMPLETED preInitResourcesOperStatus Process ")
+ msoLogger.trace("COMPLETED preInitResourcesOperStatus Process ")
}
// prepare input param for using DoCreateResources.bpmn
public void preProcessForAddResource(DelegateExecution execution) {
msoLogger.trace("STARTED preProcessForAddResource Process ")
-
+
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
List<Resource> addResourceList = serviceDecomposition.getServiceResources()
execution.setVariable("addResourceList", addResourceList)
-
+
msoLogger.trace("COMPLETED preProcessForAddResource Process ")
}
public void postProcessForAddResource(DelegateExecution execution) {
// do nothing now
-
+
}
}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
index 4bbaef8ecb..a376e581fe 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -36,6 +36,14 @@ import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.logger.MsoLogger
import org.onap.so.rest.APIResponse;
import org.springframework.web.util.UriUtils
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.Relationships
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.json.JSONObject
+import javax.ws.rs.NotFoundException
import groovy.json.*
import groovy.xml.XmlUtil
@@ -47,7 +55,7 @@ import groovy.xml.XmlUtil
*/
public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateNetworkInstance.class);
-
+
String Prefix="CRENWKI_"
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
@@ -56,7 +64,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
def className = getClass().getSimpleName()
-
+
/**
* This method is executed during the preProcessRequest task of the <class>DoCreateNetworkInstance.bpmn</class> process.
* @param execution
@@ -78,7 +86,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "networkOutputs", "")
execution.setVariable(Prefix + "networkId","")
execution.setVariable(Prefix + "networkName","")
-
+
// AAI query Name
execution.setVariable(Prefix + "queryNameAAIRequest","")
execution.setVariable(Prefix + "queryNameAAIResponse", "")
@@ -149,7 +157,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
//execution.setVariable(Prefix + "rollbackSDNCReturnCode", "")
execution.setVariable(Prefix + "isSdncRollbackNeeded", false)
execution.setVariable(Prefix + "sdncResponseSuccess", false)
-
+
execution.setVariable(Prefix + "activateSDNCRequest", "")
execution.setVariable(Prefix + "activateSDNCResponse", "")
execution.setVariable(Prefix + "rollbackActivateSDNCRequest", "")
@@ -164,7 +172,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "Success", false)
execution.setVariable(Prefix + "isException", false)
-
+
}
// **************************************************
@@ -175,25 +183,25 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
* @param execution
*/
public void preProcessRequest (DelegateExecution execution) {
-
- execution.setVariable("prefix",Prefix)
+
+ execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside preProcessRequest() of " + className + ".groovy")
-
+
try {
// initialize flow variables
InitializeProcessVariables(execution)
-
+
// GET Incoming request & validate 3 kinds of format.
execution.setVariable("action", "CREATE")
String networkRequest = execution.getVariable("bpmnRequest")
if (networkRequest != null) {
if (networkRequest.contains("requestDetails")) {
- // JSON format request is sent, create xml
+ // JSON format request is sent, create xml
try {
def prettyJson = JsonOutput.prettyPrint(networkRequest.toString())
msoLogger.debug(" Incoming message formatted . . . : " + '\n' + prettyJson)
networkRequest = vidUtils.createXmlNetworkRequestInfra(execution, networkRequest)
-
+
} catch (Exception ex) {
String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
msoLogger.debug(dataErrorMessage)
@@ -201,26 +209,26 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
} else {
// XML format request is sent
-
+
}
} else {
// vIPR format request is sent, create xml from individual variables
networkRequest = vidUtils.createXmlNetworkRequestInstance(execution)
}
-
+
networkRequest = utils.formatXml(networkRequest)
execution.setVariable(Prefix + "networkRequest", networkRequest)
msoLogger.debug(Prefix + "networkRequest - " + '\n' + networkRequest)
-
+
// validate 'backout-on-failure' to override 'mso.rollback'
boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest)
execution.setVariable(Prefix + "rollbackEnabled", rollbackEnabled)
msoLogger.debug(Prefix + "rollbackEnabled - " + rollbackEnabled)
-
+
String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
execution.setVariable(Prefix + "networkInputs", networkInputs)
msoLogger.debug(Prefix + "networkInputs - " + '\n' + networkInputs)
-
+
// prepare messageId
String messageId = execution.getVariable("testMessageId") // for testing
if (messageId == null || messageId == "") {
@@ -230,12 +238,12 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(Prefix + "messageId, pre-assigned: " + messageId)
}
execution.setVariable(Prefix + "messageId", messageId)
-
+
String source = utils.getNodeText(networkRequest, "source")
execution.setVariable(Prefix + "source", source)
msoLogger.debug(Prefix + "source - " + source)
-
- // validate cloud region
+
+ // validate cloud region
String lcpCloudRegionId = utils.getNodeText(networkRequest, "aic-cloud-region")
if ((lcpCloudRegionId == null) || (lcpCloudRegionId == "") || (lcpCloudRegionId == "null")) {
String dataErrorMessage = "Missing value/element: 'lcpCloudRegionId' or 'cloudConfiguration' or 'aic-cloud-region'."
@@ -244,7 +252,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
// validate service instance id
- String serviceInstanceId = utils.getNodeText(networkRequest, "service-instance-id")
+ String serviceInstanceId = utils.getNodeText(networkRequest, "service-instance-id")
if ((serviceInstanceId == null) || (serviceInstanceId == "") || (serviceInstanceId == "null")) {
String dataErrorMessage = "Missing value/element: 'serviceInstanceId'."
msoLogger.debug(" Invalid Request - " + dataErrorMessage)
@@ -253,12 +261,12 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
// PO Authorization Info / headers Authorization=
String basicAuthValuePO = UrnPropertiesReader.getVariable("mso.adapters.po.auth",execution)
-
+
try {
def encodedString = utils.getBasicAuth(basicAuthValuePO, UrnPropertiesReader.getVariable("mso.msoKey",execution))
execution.setVariable("BasicAuthHeaderValuePO",encodedString)
execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
-
+
} catch (IOException ex) {
String exceptionMessage = "Exception Encountered in DoCreateNetworkInstance, PreProcessRequest() - "
String dataErrorMessage = exceptionMessage + " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
@@ -273,11 +281,11 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable("GENGS_type", "service-instance")
msoLogger.debug("GENGS_type - " + "service-instance")
msoLogger.debug(" Url for SDNC adapter: " + UrnPropertiesReader.getVariable("mso.adapters.sdnc.endpoint",execution))
-
+
String sdncVersion = execution.getVariable("sdncVersion")
msoLogger.debug("sdncVersion? : " + sdncVersion)
-
- // build 'networkOutputs'
+
+ // build 'networkOutputs'
String networkId = utils.getNodeText(networkRequest, "network-id")
if ((networkId == null) || (networkId == "null")) {
networkId = ""
@@ -295,25 +303,49 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(Prefix + "networkOutputs - " + '\n' + networkOutputs)
execution.setVariable(Prefix + "networkId", networkId)
execution.setVariable(Prefix + "networkName", networkName)
-
+
} catch (BpmnError e) {
throw e;
-
+
} catch (Exception ex) {
sendSyncError(execution)
// caught exception
String exceptionMessage = "Exception Encountered in PreProcessRequest() of " + className + ".groovy ***** : " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
-
+
}
}
-
+
+ /**
+ * Gets the service instance uri from aai
+ */
+ public void getServiceInstance(DelegateExecution execution) {
+ try {
+ String serviceInstanceId = execution.getVariable('CRENWKI_serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(!resourceClient.exists(uri)){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai")
+ }
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch (Exception ex){
+ String msg = "Exception in getServiceInstance. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
+
public void callRESTQueryAAINetworkName (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.debug(" ***** Inside callRESTQueryAAINetworkName() of DoCreateNetworkInstance ***** " )
// get variables
@@ -348,7 +380,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "orchestrationStatus", orchestrationStatus.toUpperCase())
msoLogger.debug(Prefix + "orchestrationStatus - " + orchestrationStatus.toUpperCase())
execution.setVariable("orchestrationStatus", orchestrationStatus)
-
+
} catch (Exception ex) {
// response is empty
execution.setVariable(Prefix + "orchestrationStatus", orchestrationStatus)
@@ -385,9 +417,9 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void callRESTQueryAAICloudRegion (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.debug(" ***** Inside callRESTQueryAAICloudRegion() of DoCreateNetworkInstance ***** " )
try {
@@ -434,7 +466,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void callRESTQueryAAINetworkId(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.debug(" ***** Inside callRESTQueryAAINetworkId() of DoCreateNetworkInstance ***** " )
@@ -445,15 +477,15 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
String assignSDNCResponse = execution.getVariable(Prefix + "assignSDNCResponse")
if (execution.getVariable("sdncVersion") != "1610") {
String networkResponseInformation = ""
- try {
+ try {
networkResponseInformation = utils.getNodeXml(assignSDNCResponse, "network-response-information", false).replace("tag0:","").replace(":tag0","")
networkId = utils.getNodeText(networkResponseInformation, "instance-id")
} catch (Exception ex) {
String dataErrorMessage = " SNDC Response network validation for 'instance-id' (network-id) failed: Empty <network-response-information>"
msoLogger.debug(dataErrorMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
- }
-
+ }
+
} else {
networkId = utils.getNodeText(assignSDNCResponse, "network-id")
}
@@ -465,11 +497,11 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(" SNDC Response network validation for 'instance-id' (network-id)' is good: " + networkId)
}
-
+
execution.setVariable(Prefix + "networkId", networkId)
String networkName = utils.getNodeText(assignSDNCResponse, "network-name")
execution.setVariable(Prefix + "networkName", networkName)
-
+
networkId = UriUtils.encode(networkId,"UTF-8")
// Prepare AA&I url
@@ -491,7 +523,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
if (returnCode=='200') {
execution.setVariable(Prefix + "queryIdAAIResponse", aaiResponseAsString)
msoLogger.debug(" QueryAAINetworkId Success REST Response - " + "\n" + aaiResponseAsString)
-
+
String netId = utils.getNodeText(aaiResponseAsString, "network-id")
execution.setVariable(Prefix + "networkId", netId)
String netName = utils.getNodeText(aaiResponseAsString, "network-name")
@@ -532,7 +564,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void callRESTReQueryAAINetworkId(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.debug(" ***** Inside callRESTReQueryAAINetworkId() of DoCreateNetworkInstance ***** " )
@@ -540,7 +572,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
try {
// get variables
String networkId = execution.getVariable(Prefix + "networkId")
- String netId = networkId
+ String netId = networkId
networkId = UriUtils.encode(networkId,"UTF-8")
// Prepare AA&I url
@@ -606,7 +638,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void callRESTQueryAAINetworkVpnBinding(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.debug(" ***** Inside callRESTQueryAAINetworkVpnBinding() of DoCreateNetworkInstance ***** " )
@@ -748,7 +780,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void callRESTQueryAAINetworkPolicy(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.debug(" ***** Inside callRESTQueryAAINetworkPolicy() of DoCreateNetworkInstance ***** " )
@@ -882,7 +914,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void callRESTQueryAAINetworkTableRef(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.debug(" ***** Inside callRESTQueryAAINetworkTableRef() of DoCreateNetworkInstance ***** " )
@@ -1017,7 +1049,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
public void callRESTUpdateContrailAAINetwork(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.debug(" ***** Inside callRESTUpdateContrailAAINetwork() of DoCreateNetworkInstance ***** " )
@@ -1046,7 +1078,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(" 'payload' to Update Contrail - " + "\n" + payloadXml)
APIResponse response = aaiUriUtil.executeAAIPutCall(execution, updateContrailAAIUrlRequest, payloadXml)
-
+
String returnCode = response.getStatusCode()
execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", returnCode)
msoLogger.debug(" ***** AAI Update Contrail Response Code : " + returnCode)
@@ -1060,7 +1092,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "isPONR", false)
} else {
execution.setVariable(Prefix + "isPONR", true)
- }
+ }
msoLogger.debug(Prefix + "isPONR" + ": " + execution.getVariable(Prefix + "isPONR"))
} else {
if (returnCode=='404') {
@@ -1096,7 +1128,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void prepareCreateNetworkRequest (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside prepareCreateNetworkRequest() of DoCreateNetworkInstance")
@@ -1106,7 +1138,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
// get variables
String requestId = execution.getVariable("msoRequestId")
if (requestId == null) {
- requestId = execution.getVariable("mso-request-id")
+ requestId = execution.getVariable("mso-request-id")
}
String messageId = execution.getVariable(Prefix + "messageId")
String source = execution.getVariable(Prefix + "source")
@@ -1115,7 +1147,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
String queryIdResponse = execution.getVariable(Prefix + "queryIdAAIResponse")
String cloudRegionId = execution.getVariable(Prefix + "cloudRegionPo")
String backoutOnFailure = execution.getVariable(Prefix + "rollbackEnabled")
-
+
// Prepare Network request
String routeCollection = execution.getVariable(Prefix + "routeCollection")
String policyCollection = execution.getVariable(Prefix + "networkCollection")
@@ -1138,7 +1170,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void prepareSDNCRequest (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside prepareSDNCRequest() of DoCreateNetworkInstance")
@@ -1158,9 +1190,9 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable("mso-request-id", requestId)
} else {
requestId = execution.getVariable("mso-request-id")
- }
+ }
execution.setVariable(Prefix + "requestId", requestId)
-
+
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, createNetworkInput, serviceInstanceId, sdncCallback, "assign", "NetworkActivateRequest", cloudRegionId, networkId, null, null)
@@ -1179,21 +1211,21 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void prepareRpcSDNCRequest (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside prepareRpcSDNCRequest() of DoCreateNetworkInstance")
try {
// get variables
-
+
String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
String networkId = execution.getVariable(Prefix + "networkId")
String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
-
+
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, "assign", "CreateNetworkInstance", cloudRegionId, networkId, null)
@@ -1209,11 +1241,11 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
-
+
public void prepareRpcSDNCActivateRequest (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside prepareRpcSDNCActivateRequest() of DoCreateNetworkInstance")
try {
@@ -1223,7 +1255,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
String cloudRegionId = execution.getVariable(Prefix + "cloudRegionSdnc")
String networkId = execution.getVariable(Prefix + "networkId")
String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
-
+
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
String sndcTopologyCreateRequest = sdncAdapterUtils.sdncTopologyRequestRsrc(execution, createNetworkInput, serviceInstanceId, sdncCallback, "activate", "CreateNetworkInstance", cloudRegionId, networkId, null)
@@ -1240,7 +1272,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
-
+
@@ -1249,7 +1281,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
// **************************************************
public void validateCreateNetworkResponse (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside validateNetworkResponse() of DoCreateNetworkInstance")
@@ -1321,7 +1353,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void validateSDNCResponse (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside validateSDNCResponse() of DoCreateNetworkInstance")
@@ -1329,7 +1361,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
String response = execution.getVariable(Prefix + "assignSDNCResponse")
boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
WorkflowException workflowException = execution.getVariable("WorkflowException")
-
+
SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
// reset variable
@@ -1349,7 +1381,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void validateRpcSDNCActivateResponse (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside validateRpcSDNCActivateResponse() of DoCreateNetworkInstance")
@@ -1373,12 +1405,12 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug("Did NOT Successfully Validated Rpc SDNC Activate Response")
throw new BpmnError("MSOWorkflowException")
}
-
+
}
public void prepareSDNCRollbackRequest (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside prepareSDNCRollbackRequest() of DoCreateNetworkInstance")
@@ -1392,7 +1424,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
String networkId = execution.getVariable(Prefix + "networkId")
if (networkId == 'null') {networkId = ""}
String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
-
+
// 2. prepare rollback topology via SDNC Adapter SUBFLOW call
String sndcTopologyRollbackRequest = sdncAdapterUtils.sdncTopologyRequestV2(execution, createNetworkInput, serviceInstanceId, sdncCallback, "rollback", "NetworkActivateRequest", cloudRegionId, networkId, null, null)
String sndcTopologyRollbackRequestAsString = utils.formatXml(sndcTopologyRollbackRequest)
@@ -1410,7 +1442,7 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
public void prepareRpcSDNCRollbackRequest (DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside prepareRpcSDNCRollbackRequest() of DoCreateNetworkInstance")
@@ -1440,15 +1472,15 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
-
+
public void prepareRpcSDNCActivateRollback(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
msoLogger.trace("Inside prepareRpcSDNCActivateRollback() of DoCreateNetworkInstance")
try {
-
+
// get variables
String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
@@ -1473,76 +1505,76 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
-
+
public void prepareRollbackData(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside prepareRollbackData() of DoCreateNetworkInstance")
-
+
try {
-
+
Map<String, String> rollbackData = new HashMap<String, String>();
String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
- if (rollbackSDNCRequest != null) {
+ if (rollbackSDNCRequest != null) {
if (rollbackSDNCRequest != "") {
rollbackData.put("rollbackSDNCRequest", execution.getVariable(Prefix + "rollbackSDNCRequest"))
}
- }
+ }
String rollbackNetworkRequest = execution.getVariable(Prefix + "rollbackNetworkRequest")
if (rollbackNetworkRequest != null) {
- if (rollbackNetworkRequest != "") {
+ if (rollbackNetworkRequest != "") {
rollbackData.put("rollbackNetworkRequest", execution.getVariable(Prefix + "rollbackNetworkRequest"))
- }
+ }
}
String rollbackActivateSDNCRequest = execution.getVariable(Prefix + "rollbackActivateSDNCRequest")
if (rollbackActivateSDNCRequest != null) {
- if (rollbackActivateSDNCRequest != "") {
+ if (rollbackActivateSDNCRequest != "") {
rollbackData.put("rollbackActivateSDNCRequest", execution.getVariable(Prefix + "rollbackActivateSDNCRequest"))
- }
+ }
}
execution.setVariable("rollbackData", rollbackData)
msoLogger.debug("** rollbackData : " + rollbackData)
-
+
execution.setVariable("WorkflowException", execution.getVariable(Prefix + "WorkflowException"))
msoLogger.debug("** WorkflowException : " + execution.getVariable("WorkflowException"))
-
+
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareRollbackData() - " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
-
+
}
-
+
}
-
+
public void postProcessResponse(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside postProcessResponse() of DoCreateNetworkInstance")
-
+
try {
-
+
//Conditions:
- // 1. Silent Success: execution.getVariable("CRENWKI_orchestrationStatus") == "ACTIVE"
+ // 1. Silent Success: execution.getVariable("CRENWKI_orchestrationStatus") == "ACTIVE"
// 2. Success: execution.getVariable("WorkflowException") == null (NULL)
- // 3. WorkflowException: execution.getVariable("WorkflowException") != null (NOT NULL)
-
+ // 3. WorkflowException: execution.getVariable("WorkflowException") != null (NOT NULL)
+
msoLogger.debug(" ***** Is Exception Encountered (isException)? : " + execution.getVariable(Prefix + "isException"))
// successful flow
- if (execution.getVariable(Prefix + "isException") == false) {
+ if (execution.getVariable(Prefix + "isException") == false) {
// set rollback data
execution.setVariable("orchestrationStatus", "")
execution.setVariable("networkId", execution.getVariable(Prefix + "networkId"))
execution.setVariable("networkName", execution.getVariable(Prefix + "networkName"))
- prepareSuccessRollbackData(execution) // populate rollbackData
+ prepareSuccessRollbackData(execution) // populate rollbackData
execution.setVariable("WorkflowException", null)
execution.setVariable(Prefix + "Success", true)
msoLogger.debug(" ***** postProcessResponse(), GOOD !!!")
} else {
// inside sub-flow logic
- execution.setVariable(Prefix + "Success", false)
+ execution.setVariable(Prefix + "Success", false)
execution.setVariable("rollbackData", null)
String exceptionMessage = " Exception encountered in MSO Bpmn. "
if (execution.getVariable("workflowException") != null) { // Output of Rollback flow.
@@ -1553,45 +1585,45 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
if (execution.getVariable(Prefix + "WorkflowException") != null) {
WorkflowException pwfex = execution.getVariable(Prefix + "WorkflowException")
exceptionMessage = pwfex.getErrorMessage()
- }
+ }
}
// going to the Main flow: a-la-carte or macro
msoLogger.debug(" ***** postProcessResponse(), BAD !!!")
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
throw new BpmnError("MSOWorkflowException")
}
-
+
} catch(BpmnError b){
msoLogger.debug("Rethrowing MSOWorkflowException")
throw b
-
+
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
throw new BpmnError("MSOWorkflowException")
-
+
}
-
-
-
+
+
+
}
-
+
public void prepareSuccessRollbackData(DelegateExecution execution) {
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside prepareSuccessRollbackData() of DoCreateNetworkInstance")
-
+
try {
-
+
if (execution.getVariable("sdncVersion") != '1610') {
prepareRpcSDNCRollbackRequest(execution)
prepareRpcSDNCActivateRollback(execution)
} else {
prepareSDNCRollbackRequest(execution)
- }
-
+ }
+
Map<String, String> rollbackData = new HashMap<String, String>();
String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
if (rollbackSDNCRequest != null) {
@@ -1612,63 +1644,63 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
execution.setVariable("rollbackData", rollbackData)
-
+
msoLogger.debug("** 'rollbackData' for Full Rollback : " + rollbackData)
execution.setVariable("WorkflowException", null)
-
+
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DoCreateNetworkInstance flow. prepareSuccessRollbackData() - " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
-
+
}
-
+
}
public void setExceptionFlag(DelegateExecution execution){
-
+
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside setExceptionFlag() of DoCreateNetworkInstance")
-
+
try {
-
+
execution.setVariable(Prefix + "isException", true)
-
+
if (execution.getVariable("SavedWorkflowException1") != null) {
execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1"))
} else {
execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
}
msoLogger.debug(Prefix + "WorkflowException - " +execution.getVariable(Prefix + "WorkflowException"))
-
+
} catch(Exception ex){
String exceptionMessage = "Bpmn error encountered in DoCreateNetworkInstance flow. setExceptionFlag(): " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
- }
-
+ }
+
}
-
-
+
+
// *******************************
// Build Error Section
// *******************************
-
+
public void processJavaException(DelegateExecution execution){
-
+
execution.setVariable("prefix",Prefix)
-
+
try{
msoLogger.debug( "Caught a Java Exception in " + Prefix)
msoLogger.debug("Started processJavaException Method")
msoLogger.debug("Variables List: " + execution.getVariables())
execution.setVariable("UnexpectedError", "Caught a Java Lang Exception - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception")
-
+
}catch(Exception e){
msoLogger.debug("Caught Exception during processJavaException Method: " + e)
execution.setVariable("UnexpectedError", "Exception in processJavaException method - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
index 93a260a544..b44940eb20 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -62,7 +62,7 @@ import groovy.json.*
* @param - failExists - TODO
* @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM)
* @param - sdncVersion ("1610")
- * @param - serviceDecomposition - Decomposition for R1710
+ * @param - serviceDecomposition - Decomposition for R1710
* (if macro provides serviceDecompsition then serviceModelInfo, serviceInstanceId & serviceInstanceName will be ignored)
*
* Outputs:
@@ -71,7 +71,7 @@ import groovy.json.*
* @param - WorkflowException
* @param - serviceInstanceName - (GET from AAI if null in input)
*
- * This BB processes Macros(except TRANSPORT all sent to sdnc) and Alacartes(sdncSvcs && nonSdncSvcs)
+ * This BB processes Macros(except TRANSPORT all sent to sdnc) and Alacartes(sdncSvcs && nonSdncSvcs)
*/
public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
@@ -89,7 +89,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
try {
String requestId = execution.getVariable("msoRequestId")
execution.setVariable("prefix", Prefix)
-
+
setBasicDBAuthHeader(execution, isDebugEnabled)
//Inputs
//requestDetails.subscriberInfo. for AAI GET & PUT & SDNC assignToplology
@@ -106,17 +106,17 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
+
if (isBlank(subscriptionServiceType)) {
msg = "Input subscriptionServiceType is null"
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
+
if (productFamilyId == null) {
execution.setVariable("productFamilyId", "")
}
-
+
String sdncCallbackUrl = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
if (isBlank(sdncCallbackUrl)) {
msg = "mso.workflow.sdncadapter.callback is null"
@@ -131,19 +131,19 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
String modelVersion = ""
String modelUuid = ""
String modelName = ""
- String serviceInstanceName = ""
+ String serviceInstanceName = ""
//Generated in parent.for AAI PUT
String serviceInstanceId = ""
String serviceType = ""
String serviceRole = ""
-
+
ServiceDecomposition serviceDecomp = (ServiceDecomposition) execution.getVariable("serviceDecomposition")
if (serviceDecomp != null)
{
serviceType = serviceDecomp.getServiceType() ?: ""
msoLogger.debug("serviceType:" + serviceType)
serviceRole = serviceDecomp.getServiceRole() ?: ""
-
+
ServiceInstance serviceInstance = serviceDecomp.getServiceInstance()
if (serviceInstance != null)
{
@@ -152,7 +152,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("serviceInstanceId", serviceInstanceId)
execution.setVariable("serviceInstanceName", serviceInstanceName)
}
-
+
ModelInfo modelInfo = serviceDecomp.getModelInfo()
if (modelInfo != null)
{
@@ -161,7 +161,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
modelUuid = modelInfo.getModelUuid() ?: ""
modelName = modelInfo.getModelName() ?: ""
}
- else
+ else
{
msg = "Input serviceModelInfo is null"
msoLogger.debug(msg)
@@ -173,21 +173,21 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
//requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData & SDNC assignToplology
serviceInstanceName = execution.getVariable("serviceInstanceName") ?: ""
serviceInstanceId = execution.getVariable("serviceInstanceId") ?: ""
-
+
String serviceModelInfo = execution.getVariable("serviceModelInfo")
if (isBlank(serviceModelInfo)) {
msg = "Input serviceModelInfo is null"
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
+ }
modelInvariantUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantUuid") ?: ""
modelVersion = jsonUtil.getJsonValue(serviceModelInfo, "modelVersion") ?: ""
modelUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelUuid") ?: ""
modelName = jsonUtil.getJsonValue(serviceModelInfo, "modelName") ?: ""
//modelCustomizationUuid NA for SI
-
+
}
-
+
execution.setVariable("serviceType", serviceType)
execution.setVariable("serviceRole", serviceRole)
execution.setVariable("serviceInstanceName", serviceInstanceName)
@@ -196,7 +196,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("modelVersion", modelVersion)
execution.setVariable("modelUuid", modelUuid)
execution.setVariable("modelName", modelName)
-
+
//alacarte SIs are NOT sent to sdnc. exceptions are listed in config variable
String svcTypes = UrnPropertiesReader.getVariable("sdnc.si.svc.types",execution) ?: ""
msoLogger.debug("SDNC SI serviceTypes:" + svcTypes)
@@ -208,13 +208,13 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
break;
}
}
-
+
//All Macros are sent to SDNC, TRANSPORT(Macro) is sent to SDNW
//Alacartes are sent to SDNC if they are listed in config variable above
execution.setVariable("sendToSDNC", true)
if(execution.getVariable("sdncVersion").equals("1610")) //alacarte
{
- if(!isSdncService){
+ if(!isSdncService){
execution.setVariable("sendToSDNC", false)
//alacarte non-sdnc svcs must provide name (sdnc provides name for rest)
if (isBlank(execution.getVariable("serviceInstanceName" )))
@@ -225,25 +225,25 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
}
}
}
-
+
msoLogger.debug("isSdncService: " + isSdncService)
msoLogger.debug("Send To SDNC: " + execution.getVariable("sendToSDNC"))
msoLogger.debug("Service Type: " + execution.getVariable("serviceType"))
-
+
//macro may provide name and alacarte-portm may provide name
execution.setVariable("checkAAI", false)
if (!isBlank(execution.getVariable("serviceInstanceName" )))
{
execution.setVariable("checkAAI", true)
}
-
+
if (isBlank(serviceInstanceId)){
msg = "Input serviceInstanceId is null"
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
-
+
+
StringBuilder sbParams = new StringBuilder()
Map<String, String> paramsMap = execution.getVariable("serviceInputParams")
if (paramsMap != null)
@@ -278,16 +278,16 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
String statusLine = isBlank(oStatus) ? "" : "<orchestration-status>${MsoUtils.xmlEscape(oStatus)}</orchestration-status>"
String serviceTypeLine = isBlank(serviceType) ? "" : "<service-type>${MsoUtils.xmlEscape(serviceType)}</service-type>"
String serviceRoleLine = isBlank(serviceRole) ? "" : "<service-role>${MsoUtils.xmlEscape(serviceRole)}</service-role>"
-
+
//QUERY CATALOG DB AND GET WORKLOAD / ENVIRONMENT CONTEXT
String environmentContext = ""
String workloadContext =""
-
+
try{
String json = cutils.getServiceResourcesByServiceModelInvariantUuidString(execution,modelInvariantUuid )
-
+
msoLogger.debug("JSON IS: "+json)
-
+
environmentContext = jsonUtil.getJsonValue(json, "serviceResources.environmentContext") ?: ""
workloadContext = jsonUtil.getJsonValue(json, "serviceResources.workloadContext") ?: ""
msoLogger.debug("Env Context is: "+ environmentContext)
@@ -299,7 +299,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
-
+
//Create AAI Payload
AaiUtil aaiUriUtil = new AaiUtil(this)
String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
@@ -318,7 +318,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("serviceInstanceData", serviceInstanceData)
msoLogger.debug(" 'payload' to create Service Instance in AAI - " + "\n" + serviceInstanceData)
-
+
} catch (BpmnError e) {
throw e;
} catch (Exception ex){
@@ -329,7 +329,6 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.trace("Exit preProcessRequest")
}
- //TODO: Will be able to replace with call to GenericGetService
public void getAAICustomerById (DelegateExecution execution) {
// https://{aaiEP}/aai/v8/business/customers/customer/{globalCustomerId}
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
@@ -400,47 +399,6 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
}
- public void postProcessAAIGET(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- msoLogger.trace("postProcessAAIGET")
- String msg = ""
-
- try {
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- msoLogger.debug("Error getting Service-instance from AAI", + serviceInstanceName)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
- else
- {
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI){
- msoLogger.debug("Found Service-instance in AAI")
- msg = "ServiceInstance already exists in AAI:" + serviceInstanceName
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex) {
- msg = "Exception in DoCreateServiceInstance.postProcessAAIGET. " + ex.getMessage()
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- msoLogger.trace("Exit postProcessAAIGET")
- }
-
public void postProcessAAIPUT(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.trace("postProcessAAIPUT")
@@ -498,17 +456,17 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
def modelVersion = execution.getVariable("modelVersion")
def modelUuid = execution.getVariable("modelUuid")
def modelName = execution.getVariable("modelName")
-
+
def sdncRequestId = UUID.randomUUID().toString()
-
+
def siParamsXml = execution.getVariable("siParamsXml")
-
+
// special URL for SDNW, msoAction helps set diff url in SDNCA
if("TRANSPORT".equalsIgnoreCase(execution.getVariable("serviceType")))
{
msoAction = "TRANSPORT"
}
-
+
String sdncAssignRequest =
"""<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
@@ -563,7 +521,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
rollbackData.put("SERVICEINSTANCE", "sdncDeactivate", sdncDeactivate)
rollbackData.put("SERVICEINSTANCE", "sdncDelete", sdncDelete)
execution.setVariable("rollbackData", rollbackData)
-
+
msoLogger.debug("rollbackData:\n" + rollbackData.toString())
} catch (BpmnError e) {
@@ -575,7 +533,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit preProcessSDNCAssignRequest")
}
-
+
public void postProcessSDNCAssign (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.trace("postProcessSDNCAssign")
@@ -612,7 +570,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit postProcessSDNCAssign")
}
-
+
public void postProcessAAIGET2(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.trace("postProcessAAIGET2")
@@ -660,7 +618,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.trace("preProcessRollback")
try {
-
+
Object workflowException = execution.getVariable("WorkflowException");
if (workflowException instanceof WorkflowException) {
@@ -697,19 +655,19 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit postProcessRollback")
}
-
+
public void createProject(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.trace("createProject")
- String bpmnRequest = execution.getVariable("requestJson")
- String projectName = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.project.projectName")
+ String bpmnRequest = execution.getVariable("requestJson")
+ String projectName = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.project.projectName")
String serviceInstance = execution.getVariable("serviceInstanceId")
-
+
msoLogger.debug("BPMN REQUEST IS: "+ bpmnRequest)
msoLogger.debug("PROJECT NAME: " + projectName)
msoLogger.debug("Service Instance: " + serviceInstance)
-
+
if(projectName == null||projectName.equals("")){
msoLogger.debug("Project Name was not found in input. Skipping task...")
}else{
@@ -722,27 +680,27 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.error(ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- }
+ }
msoLogger.trace("Exit createProject")
}
-
+
public void createOwningEntity(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
msoLogger.trace("createOwningEntity")
String msg = "";
- String bpmnRequest = execution.getVariable("requestJson")
- String owningEntityId = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.owningEntity.owningEntityId")
+ String bpmnRequest = execution.getVariable("requestJson")
+ String owningEntityId = jsonUtil.getJsonValue(bpmnRequest, "requestDetails.owningEntity.owningEntityId")
String owningEntityName = jsonUtil.getJsonValue(bpmnRequest,"requestDetails.owningEntity.owningEntityName");
String serviceInstance = execution.getVariable("serviceInstanceId")
-
+
msoLogger.debug("owningEntity: " + owningEntityId)
msoLogger.debug("OwningEntityName: "+ owningEntityName)
msoLogger.debug("Service Instance: " + serviceInstance)
-
+
try{
AAICreateResources aaiCR = new AAICreateResources()
if(owningEntityId==null||owningEntityId.equals("")){
- msg = "Exception in createOwningEntity. OwningEntityId is null in input.";
+ msg = "Exception in createOwningEntity. OwningEntityId is null in input.";
throw new IllegalStateException();
}else{
if(aaiCR.existsOwningEntity(owningEntityId)){
@@ -769,21 +727,21 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
}
msoLogger.trace("Exit createOwningEntity")
}
-
+
// *******************************
// Build Error Section
// *******************************
public void processJavaException(DelegateExecution execution){
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
-
+
try{
msoLogger.debug("Caught a Java Exception in DoCreateServiceInstance")
msoLogger.debug("Started processJavaException Method")
msoLogger.debug("Variables List: " + execution.getVariables())
execution.setVariable("UnexpectedError", "Caught a Java Lang Exception in DoCreateServiceInstance") // Adding this line temporarily until this flows error handling gets updated
exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception in DoCreateServiceInstance")
-
+
}catch(Exception e){
msoLogger.debug("Caught Exception during processJavaException Method: " + e)
execution.setVariable("UnexpectedError", "Exception in processJavaException") // Adding this line temporarily until this flows error handling gets updated
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
index f734ffb3ff..f87f32c610 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleVolumeV2.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -35,6 +35,14 @@ import org.onap.so.bpmn.core.json.JsonUtils;
import org.onap.so.logger.MsoLogger
import org.onap.so.rest.APIResponse
import org.springframework.web.util.UriUtils
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.Relationships
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.json.JSONObject
+import javax.ws.rs.NotFoundException
class DoCreateVfModuleVolumeV2 extends VfModuleBase {
@@ -53,16 +61,16 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
}
public void preProcessRequest(DelegateExecution execution, isDebugLogEnabled) {
-
+
execution.setVariable("prefix",prefix)
execution.setVariable(prefix+'SuccessIndicator', false)
execution.setVariable(prefix+'isPONR', false)
displayInput(execution, isDebugLogEnabled)
setRollbackData(execution, isDebugLogEnabled)
- setRollbackEnabled(execution, isDebugLogEnabled)
-
-
+ setRollbackEnabled(execution, isDebugLogEnabled)
+
+
def tenantId = execution.getVariable("tenantId")
if (tenantId == null) {
String cloudConfiguration = execution.getVariable("cloudConfiguration")
@@ -84,17 +92,17 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
def modelCustomizationUuid = jsonUtil.getJsonValue(vfModuleModelInfo, "modelCustomizationUuid")
execution.setVariable("modelCustomizationId", modelCustomizationUuid)
msoLogger.debug("modelCustomizationId: " + modelCustomizationUuid)
-
+
//modelName
def modelName = jsonUtil.getJsonValue(vfModuleModelInfo, "modelName")
execution.setVariable("modelName", modelName)
msoLogger.debug("modelName: " + modelName)
-
+
// The following is used on the get Generic Service Instance call
execution.setVariable('GENGS_type', 'service-instance')
}
-
+
/**
* Display input variables
* @param execution
@@ -111,10 +119,10 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
}
msoLogger.debug('End input.')
}
-
-
+
+
/**
- * Define and set rollbackdata object
+ * Define and set rollbackdata object
* @param execution
* @param isDebugEnabled
*/
@@ -127,25 +135,29 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
rollbackData.put("DCVFMODULEVOL", "volumeGroupName", volumeGroupName)
execution.setVariable("rollbackData", rollbackData)
}
-
-
+
+
/**
- * validate getServiceInstance response
- * @param execution
- * @param isDebugEnabled
+ * Gets the service instance uri from aai
*/
- public void validateGetServiceInstanceCall(DelegateExecution execution, isDebugEnabled) {
- def found = execution.getVariable('GENGS_FoundIndicator')
- def success = execution.getVariable('GENGS_SuccessIndicator')
- def serviceInstanceId = execution.getVariable('serviceInstanceId')
- msoLogger.debug("getServiceInstance success: " + success)
- msoLogger.debug("getServiceInstance found: " + found)
- if(!found || !success) {
- String errorMessage = "Service instance id not found in AAI: ${serviceInstanceId}."
- msoLogger.debug(errorMessage)
- (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, errorMessage)
+ public void getServiceInstance(DelegateExecution execution) {
+ try {
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(!resourceClient.exists(uri)){
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai")
+ }
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch (Exception ex){
+ String msg = "Exception in getServiceInstance. " + ex.getMessage()
+ msoLogger.debug(msg)
+ (new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, msg)
}
-
}
/**
@@ -175,7 +187,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
msoLogger.debug(errorMessage)
(new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, errorMessage)
}
-
+
def poCloudRegion = aaiUtil.getAAICloudReqion(execution, queryCloudRegionRequest, "PO", cloudRegion)
if ((poCloudRegion != "ERROR")) {
execution.setVariable("poLcpCloudRegionId", poCloudRegion)
@@ -185,7 +197,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
msoLogger.debug(errorMessage)
(new ExceptionUtil()).buildAndThrowWorkflowException(execution, 2500, errorMessage)
}
-
+
def rollbackData = execution.getVariable("rollbackData")
rollbackData.put("DCVFMODULEVOL", "aiccloudregion", cloudRegion)
}
@@ -242,7 +254,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
/**
- * Create a WorkflowException
+ * Create a WorkflowException
* @param execution
* @param isDebugEnabled
*/
@@ -265,7 +277,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
throw new BpmnError("MSOWorkflowException")
}
-
+
/**
* Create volume group in AAI
* @param execution
@@ -280,7 +292,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
def vnfType = execution.getVariable("vnfType")
def tenantId = execution.getVariable("tenantId")
def cloudRegion = execution.getVariable('lcpCloudRegionId')
-
+
msoLogger.debug("volumeGroupId: " + volumeGroupId)
def testGroupId = execution.getVariable('test-volume-group-id')
@@ -316,7 +328,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
execution.setVariable(prefix+"createAAIVolumeGrpNameReturnCode", returnCode)
execution.setVariable(prefix+"createAAIVolumeGrpNameResponse", aaiResponseAsString)
-
+
ExceptionUtil exceptionUtil = new ExceptionUtil()
if (returnCode =='201') {
@@ -333,7 +345,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
}
}
}
-
+
/**
* Prepare VNF adapter create request XML
@@ -345,7 +357,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
def vnfId = utils.getNodeText(aaiGenericVnfResponse, 'vnf-id')
def vnfName = utils.getNodeText(aaiGenericVnfResponse, 'vnf-name')
def vnfType = utils.getNodeText(aaiGenericVnfResponse, "vnf-type")
-
+
def requestId = execution.getVariable('msoRequestId')
def serviceId = execution.getVariable('serviceInstanceId')
def cloudSiteId = execution.getVariable('poLcpCloudRegionId')
@@ -353,11 +365,11 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
def volumeGroupId = execution.getVariable('volumeGroupId')
def volumeGroupnName = execution.getVariable('volumeGroupName')
- def vnfVersion = execution.getVariable("asdcServiceModelVersion")
+ def vnfVersion = execution.getVariable("asdcServiceModelVersion")
def vnfModuleType = execution.getVariable("modelName")
def modelCustomizationId = execution.getVariable("modelCustomizationId")
-
+
// for testing
msoLogger.debug("volumeGroupId: " + volumeGroupId)
def testGroupId = execution.getVariable('test-volume-group-id')
@@ -367,9 +379,9 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
execution.setVariable("test-volume-group-name", "MSOTESTVOL101a-vSAMP12_base_vol_module-0")
}
msoLogger.debug("volumeGroupId to be used: " + volumeGroupId)
-
+
// volume group parameters
-
+
String volumeGroupParams = ''
StringBuilder sbParams = new StringBuilder()
Map<String, String> paramsMap = execution.getVariable("vfModuleInputParams")
@@ -396,17 +408,17 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
if(failIfExists == null) {
failIfExists = 'true'
}
-
+
String messageId = UUID.randomUUID()
msoLogger.debug("messageId to be used is generated: " + messageId)
-
+
def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
def useQualifiedHostName = UrnPropertiesReader.getVariable("mso.use.qualified.host",execution)
if ('true'.equals(useQualifiedHostName)) {
notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
}
msoLogger.debug("CreateVfModuleVolume - notificationUrl: "+ notificationUrl)
-
+
// build request
String vnfSubCreateWorkflowRequest =
"""
@@ -465,9 +477,9 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
String vnfSubRollbackWorkflowRequestAsString = utils.formatXml(vnfSubRollbackWorkflowRequest)
execution.setVariable(prefix+"rollbackVnfARequest", vnfSubRollbackWorkflowRequestAsString)
}
-
+
public String buildRollbackVolumeGroupRequestXml(volumeGroupId, cloudSiteId, tenantId, requestId, serviceId, messageId, notificationUrl) {
-
+
def request = """
<rollbackVolumeGroupRequest>
<volumeGroupRollback>
@@ -485,16 +497,16 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
<skipAAI>true</skipAAI>
<notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
</rollbackVolumeGroupRequest>
- """
-
- return request
+ """
+
+ return request
}
public String updateRollbackVolumeGroupRequestXml(String rollabackRequest, String heatStackId) {
String newRequest = rollabackRequest.replace("{{VOLUMEGROUPSTACKID}}", heatStackId)
return newRequest
}
-
+
/**
* Validate VNF adapter response
* @param execution
@@ -513,10 +525,10 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
rollbackData.put("DCVFMODULEVOL", "isCreateVnfRollbackNeeded", "true")
}
}
-
+
/**
- * Update voulume group in AAI
+ * Update voulume group in AAI
* @TODO: Can we re-use the create method??
* @param execution
* @param isDebugEnabled
@@ -525,7 +537,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
String requeryAAIVolGrpNameResponse = execution.getVariable(prefix+"queryAAIVolGrpNameResponse")
String volumeGroupId = utils.getNodeText(requeryAAIVolGrpNameResponse, "volume-group-id")
- String modelCustomizationId = execution.getVariable("modelCustomizationId")
+ String modelCustomizationId = execution.getVariable("modelCustomizationId")
String cloudRegion = execution.getVariable("lcpCloudRegionId")
AaiUtil aaiUtil = new AaiUtil(this)
@@ -538,7 +550,7 @@ class DoCreateVfModuleVolumeV2 extends VfModuleBase {
String createVnfAResponse = execution.getVariable(prefix+"createVnfAResponse")
def heatStackID = utils.getNodeText(createVnfAResponse, "volumeGroupStackId")
-
+
execution.setVariable(prefix+"heatStackId", heatStackID)
NetworkUtils networkUtils = new NetworkUtils()
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
index 46a502e124..7fa8b4409b 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
@@ -43,6 +43,7 @@ import org.onap.so.client.aai.entities.AAIResultWrapper
import org.onap.so.client.aai.entities.uri.AAIResourceUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.springframework.web.util.UriUtils
+import org.json.JSONObject
/**
@@ -247,6 +248,32 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
msoLogger.trace("COMPLETED DoCreateVnf PreProcessRequest Process")
}
+ /**
+ * Gets the service instance from aai
+ */
+ public void getServiceInstance(DelegateExecution execution) {
+ try {
+ String serviceInstanceId = execution.getVariable('DoCVNF_serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(resourceClient.exists(uri)){
+ execution.setVariable("GENGS_siResourceLink", uri.build().toString())
+
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai")
+ }
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch(Exception ex) {
+ String msg = "Exception in getServiceInstance. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
private Object getVariableEnforced(DelegateExecution execution, String name){
Object enforced = execution.getVariable(name)
if(!enforced){
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
index 20a7f43de7..21bf0f2c5c 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
@@ -37,7 +37,14 @@ import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
import org.onap.so.rest.APIResponse;
import org.springframework.web.util.UriUtils;
-
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.Relationships
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.json.JSONObject
+import javax.ws.rs.NotFoundException
import groovy.json.*
@@ -149,63 +156,32 @@ public class DoCustomDeleteE2EServiceInstanceV2 extends AbstractServiceTaskProce
msoLogger.info("Exited " + method)
}
-
-
- public void postProcessAAIGET(DelegateExecution execution) {
- def method = getClass().getSimpleName() + '.postProcessAAIGET(' +'execution=' + execution.getId() +')'
- msoLogger.info("Entered " + method)
-
- String msg = ""
-
+ /**
+ * Gets the service instance and its relationships from aai
+ *
+ * @author cb645j
+ */
+ public void getServiceInstance(DelegateExecution execution) {
try {
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- msoLogger.info("serviceInstanceId: "+serviceInstanceId)
-
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- msoLogger.info("foundInAAI: "+foundInAAI)
-
- String serviceType = ""
-
-
- if(foundInAAI){
- msoLogger.info("Found Service-instance in AAI")
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+ String globalSubscriberId = execution.getVariable('globalSubscriberId')
+ String serviceType = execution.getVariable('serviceType')
- String siData = execution.getVariable("GENGS_service")
- msoLogger.info("SI Data")
- if (isBlank(siData))
- {
- msg = "Could not retrive ServiceInstance data from AAI to delete id:" + serviceInstanceId
- msoLogger.info(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+ AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
+ String json = wrapper.getJson()
- }else{
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- msoLogger.info("Error getting Service-instance from AAI", + serviceInstanceId)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- msoLogger.debug("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- msoLogger.info(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
+ execution.setVariable("serviceInstance", json)
- msoLogger.info("Service-instance NOT found in AAI. Silent Success")
- }
- }catch (BpmnError e) {
+ }catch(BpmnError e) {
throw e;
- } catch (Exception ex) {
- msg = "Bpmn error encountered in " + method + "--" + ex.getMessage()
- msoLogger.info(msg)
+ }catch(NotFoundException e) {
+ msoLogger.info("SI not found in aai. Silent Success ")
+ }catch(Exception ex) {
+ String msg = "Internal Error in getServiceInstance: " + ex.getMessage()
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- msoLogger.info("Exited " + method)
}
private void loadResourcesProperties(DelegateExecution execution) {
@@ -334,23 +310,14 @@ public class DoCustomDeleteE2EServiceInstanceV2 extends AbstractServiceTaskProce
String serviceInstanceId = execution.getVariable("serviceInstanceId")
- // confirm if ServiceInstance was found
- if ( !execution.getVariable("GENGS_FoundIndicator") )
- {
- String exceptionMessage = "Bpmn error encountered in DeleteMobileAPNCustService flow. Service Instance was not found in AAI by id: " + serviceInstanceId
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
execution.setVariable(Prefix+"resourceList", "")
execution.setVariable(Prefix+"resourceCount", 0)
execution.setVariable(Prefix+"nextResource", 0)
execution.setVariable(Prefix+"resourceFinish", true)
- // get SI extracted by GenericGetService
- String serviceInstanceAaiRecord = execution.getVariable("GENGS_service");
- msoLogger.info("serviceInstanceAaiRecord: " +serviceInstanceAaiRecord)
-
- String aaiJsonRecord = jsonUtil.xml2json(serviceInstanceAaiRecord)
+ String aaiJsonRecord = execution.getVariable("serviceInstance");
+ msoLogger.info("serviceInstanceAaiRecord: " +aaiJsonRecord)
msoLogger.info("aaiJsonRecord: " +aaiJsonRecord)
def serviceInstanceName = jsonUtil.getJsonValue(aaiJsonRecord, "service-instance.service-instance-name")
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
index 198144ad34..c7e3eb437c 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
@@ -22,12 +22,10 @@ package org.onap.so.bpmn.infrastructure.scripts
import static org.apache.commons.lang3.StringUtils.*;
-import javax.xml.parsers.DocumentBuilder
-import javax.xml.parsers.DocumentBuilderFactory
-
import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.ServiceInstance
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
@@ -35,17 +33,13 @@ import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.logger.MsoLogger
-import org.onap.so.client.aai.entities.uri.AAIResourceUri
-import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.client.aai.AAIObjectType
import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.onap.so.logger.MsoLogger
import org.springframework.web.util.UriUtils;
-import org.w3c.dom.Document
-import org.w3c.dom.Element
-import org.w3c.dom.Node
-import org.w3c.dom.NodeList
-import org.xml.sax.InputSource
import groovy.json.*
@@ -282,170 +276,86 @@ public class DoDeleteServiceInstance extends AbstractServiceTaskProcessor {
msoLogger.trace("Exit postProcessSDNC " + method + " ")
}
- public void postProcessAAIGET(DelegateExecution execution) {
-
- msoLogger.trace("postProcessAAIGET ")
- String msg = ""
-
+ /**
+ * Gets the service instance uri from aai
+ */
+ public void getServiceInstance(DelegateExecution execution) {
+ msoLogger.trace("getServiceInstance ")
try {
-
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- String serviceType = ""
-
- if(foundInAAI == true){
- msoLogger.debug("Found Service-instance in AAI")
-
- //Extract GlobalSubscriberId
- String siRelatedLink = execution.getVariable("GENGS_siResourceLink")
- if (isBlank(siRelatedLink))
- {
- msg = "Could not retrive ServiceInstance data from AAI to delete id:" + serviceInstanceId
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(resourceClient.exists(uri)){
+ execution.setVariable("GENGS_siResourceLink", uri.build().toString())
+ Map<String, String> keys = uri.getURIKeys()
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ if(isBlank(globalSubscriberId)){
+ globalSubscriberId = keys.get("global-customer-id")
+ execution.setVariable("globalSubscriberId", globalSubscriberId)
}
- else
- {
- msoLogger.debug("Found Service-instance in AAI. link: " + siRelatedLink)
- String globalSubscriberId = execution.getVariable("globalSubscriberId")
- if(isBlank(globalSubscriberId)){
- int custStart = siRelatedLink.indexOf("customer/")
- int custEnd = siRelatedLink.indexOf("/service-subscriptions")
- globalSubscriberId = siRelatedLink.substring(custStart + 9, custEnd)
- execution.setVariable("globalSubscriberId", globalSubscriberId)
- }
-
- //Extract Service Type if not provided on request
- String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
- if(isBlank(subscriptionServiceType)){
- int serviceStart = siRelatedLink.indexOf("service-subscription/")
- int serviceEnd = siRelatedLink.indexOf("/service-instances/")
- String serviceTypeEncoded = siRelatedLink.substring(serviceStart + 21, serviceEnd)
- subscriptionServiceType = UriUtils.decode(serviceTypeEncoded, "UTF-8")
- execution.setVariable("subscriptionServiceType", subscriptionServiceType)
- }
- if (isBlank(globalSubscriberId) || isBlank(subscriptionServiceType))
- {
- msg = "Could not retrive global-customer-id & subscription-service-type from AAI to delete id:" + serviceInstanceId
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
+ //Extract Service Type if not provided on request
+ String subscriptionServiceType = execution.getVariable("subscriptionServiceType")
+ if(isBlank(subscriptionServiceType)){
+ String serviceTypeEncoded = keys.get("service-type") //TODO will this produce as already decoded?
+ subscriptionServiceType = UriUtils.decode(serviceTypeEncoded, "UTF-8")
+ execution.setVariable("subscriptionServiceType", subscriptionServiceType)
}
- String siData = execution.getVariable("GENGS_service")
- msoLogger.debug("SI Data")
- if (isBlank(siData))
- {
- msg = "Could not retrive ServiceInstance data from AAI to delete id:" + serviceInstanceId
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
- else
- {
- msoLogger.debug("SI Data" + siData)
- serviceType = utils.getNodeText(siData,"service-type")
+ AAIResultWrapper wrapper = resourceClient.get(uri)
+ List<AAIResourceUri> uriList = wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.ALLOTTED_RESOURCE)
+ uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.GENERIC_VNF))
+ uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.L3_NETWORK))
+
+ if(uriList.isEmpty){
+ ServiceInstance si = wrapper.asBean(ServiceInstance.class)
+ String orchestrationStatus = si.getOrchestrationStatus()
+ String serviceType = si.getServiceType()
execution.setVariable("serviceType", serviceType)
- execution.setVariable("serviceRole", utils.getNodeText(siData,"service-role"))
- String orchestrationStatus = utils.getNodeText(siData,"orchestration-status")
-
- //Confirm there are no related service instances (vnf/network or volume)
- if (utils.nodeExists(siData, "relationship-list")) {
- msoLogger.debug("SI Data relationship-list exists:")
- InputSource source = new InputSource(new StringReader(siData));
- DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
- Document serviceXml = docBuilder.parse(source)
-
- NodeList nodeList = serviceXml.getElementsByTagName("relationship")
- for (int x = 0; x < nodeList.getLength(); x++) {
- Node node = nodeList.item(x)
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- Element eElement = (Element) node
- def e = eElement.getElementsByTagName("related-to").item(0).getTextContent()
- if(e.equals("generic-vnf") || e.equals("l3-network") || e.equals("allotted-resource") ){
- msoLogger.debug("ServiceInstance still has relationship(s) to generic-vnfs, l3-networks or allotted-resources")
- execution.setVariable("siInUse", true)
- //there are relationship dependencies to this Service Instance
- msg = " Stopped deleting Service Instance, it has dependencies. Service instance id: " + serviceInstanceId
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }else{
- msoLogger.debug("Relationship NOT related to OpenStack")
- }
- }
- }
- }
+ execution.setVariable("serviceRole", si.getServiceRole())
- if ("TRANSPORT".equalsIgnoreCase(serviceType))
- {
- if ("PendingDelete".equals(orchestrationStatus))
- {
+ if("TRANSPORT".equalsIgnoreCase(serviceType)){
+ if("PendingDelete".equals(orchestrationStatus)){
execution.setVariable("skipDeactivate", true)
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "ServiceInstance of type TRANSPORT must in PendingDelete status to allow Delete. Orchestration-status: " + orchestrationStatus)
}
- else
- {
- msg = "ServiceInstance of type TRANSPORT must in PendingDelete status to allow Delete. Orchestration-status:" + orchestrationStatus
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
-
}
- //alacarte SIs are NOT sent to sdnc. exceptions are listed in config variable
String svcTypes = UrnPropertiesReader.getVariable("sdnc.si.svc.types",execution) ?: ""
- msoLogger.debug("SDNC SI serviceTypes:" + svcTypes)
List<String> svcList = Arrays.asList(svcTypes.split("\\s*,\\s*"));
boolean isSdncService= false
- for (String listEntry : svcList){
- if (listEntry.equalsIgnoreCase(serviceType)){
+ for(String listEntry : svcList){
+ if(listEntry.equalsIgnoreCase(serviceType)){
isSdncService = true
break;
}
}
-
- //All Macros are sent to SDNC, TRANSPORT(Macro) is sent to SDNW
- //Alacartes are sent to SDNC if they are listed in config variable above
execution.setVariable("sendToSDNC", true)
- if(execution.getVariable("sdncVersion").equals("1610")) //alacarte
- {
+ if(execution.getVariable("sdncVersion").equals("1610")){
if(!isSdncService){
execution.setVariable("sendToSDNC", false)
}
}
- msoLogger.debug("isSdncService: " + isSdncService)
- msoLogger.debug("Send To SDNC: " + execution.getVariable("sendToSDNC"))
- msoLogger.debug("Service Type: " + execution.getVariable("serviceType"))
-
+ }else{
+ execution.setVariable("siInUse", true)
+ msoLogger.debug("Stopped deleting Service Instance, it has dependencies")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Stopped deleting Service Instance, it has dependencies")
}
}else{
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(succInAAI != true){
- msoLogger.debug("Error getting Service-instance from AAI", + serviceInstanceId)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- msoLogger.debug("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- msoLogger.debug(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
-
- msoLogger.debug("Service-instance NOT found in AAI. Silent Success")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "ServiceInstance not found in aai")
}
- } catch (BpmnError e) {
+
+ }catch(BpmnError e) {
throw e;
- } catch (Exception ex) {
- msg = "Exception in DoDeleteServiceInstance.postProcessAAIGET. " + ex.getMessage()
+ }catch (Exception ex){
+ String msg = "Exception in getServiceInstance. " + ex.getMessage()
msoLogger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- msoLogger.trace("Exit postProcessAAIGET ")
}
/**
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
index 5fb6a9df9a..cb50fbbee6 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* ONAP - SO
* ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. 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.
@@ -53,7 +53,7 @@ import groovy.json.*
* @param - serviceDecomposition_Original
* @param - addResourceList
* @param - delResourceList
- *
+ *
* Outputs:
* @param - rollbackData (localRB->null)
* @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
@@ -63,15 +63,15 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
String Prefix="DUPDSI_"
private static final String DebugFlag = "isDebugEnabled"
-
+
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
public void preProcessRequest (DelegateExecution execution) {
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** Enter DoUpdateE2EServiceInstance preProcessRequest *****", isDebugEnabled)
-
- String msg = ""
+
+ String msg = ""
try {
execution.setVariable("prefix", Prefix)
@@ -79,11 +79,11 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
//for AAI GET & PUT & SDNC assignToplology
String globalSubscriberId = execution.getVariable("globalSubscriberId") //globalCustomerId
utils.log("INFO"," ***** globalSubscriberId *****" + globalSubscriberId, isDebugEnabled)
-
+
//for AAI PUT & SDNC assignTopology
String serviceType = execution.getVariable("serviceType")
utils.log("INFO"," ***** serviceType *****" + serviceType, isDebugEnabled)
-
+
//for SDNC assignTopology
String productFamilyId = execution.getVariable("productFamilyId") //AAI productFamilyId
@@ -92,14 +92,14 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
+
if (isBlank(serviceType)) {
msg = "Input serviceType is null"
utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
- //Generated in parent for AAI
+
+ //Generated in parent for AAI
String serviceInstanceId = execution.getVariable("serviceInstanceId")
if (isBlank(serviceInstanceId)){
msg = "Input serviceInstanceId is null"
@@ -108,21 +108,21 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
String serviceInstanceName = execution.getVariable("serviceInstanceName")
-
+
// user params
String uuiRequest = execution.getVariable("uuiRequest")
-
+
// target model Invariant uuid
String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceInvariantUuid")
- execution.setVariable("modelInvariantUuid", modelInvariantUuid)
- utils.log("INFO", "modelInvariantUuid: " + modelInvariantUuid, isDebugEnabled)
-
+ execution.setVariable("modelInvariantUuid", modelInvariantUuid)
+ utils.log("INFO", "modelInvariantUuid: " + modelInvariantUuid, isDebugEnabled)
+
// target model uuid
String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid")
execution.setVariable("modelUuid", modelUuid)
-
+
utils.log("INFO","modelUuid: " + modelUuid, isDebugEnabled)
-
+
} catch (BpmnError e) {
throw e;
} catch (Exception ex){
@@ -130,10 +130,10 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.log("INFO", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("INFO", "======== COMPLETED preProcessRequest Process ======== ", isDebugEnabled)
+ utils.log("INFO", "======== COMPLETED preProcessRequest Process ======== ", isDebugEnabled)
}
-
+
public void preInitResourcesOperStatus(DelegateExecution execution){
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
@@ -161,7 +161,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
for(Resource resource : resourceList){
resourceTemplateUUIDs = resourceTemplateUUIDs + resource.getModelInfo().getModelCustomizationUuid() + ":"
}
-
+
def dbAdapterEndpoint = "http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter"
execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
utils.log("INFO", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled)
@@ -189,34 +189,34 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.log("ERROR", "Exception Occured Processing preInitResourcesOperStatus. Exception is:\n" + e, isDebugEnabled)
execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preInitResourcesOperStatus Method:\n" + e.getMessage())
}
- utils.log("INFO", "======== COMPLETED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
+ utils.log("INFO", "======== COMPLETED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
}
-
+
public void preProcessForAddResource(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** preProcessForAddResource ***** ", isDebugEnabled)
-
+
execution.setVariable("operationType", "create")
-
+
execution.setVariable("hasResourcetoAdd", false)
List<Resource> addResourceList = execution.getVariable("addResourceList")
if(addResourceList != null && !addResourceList.isEmpty()) {
- execution.setVariable("hasResourcetoAdd", true)
+ execution.setVariable("hasResourcetoAdd", true)
}
-
+
utils.log("INFO"," *** Exit preProcessForAddResource *** ", isDebugEnabled)
}
public void postProcessForAddResource(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** postProcessForAddResource ***** ", isDebugEnabled)
-
+
execution.setVariable("operationType", "update")
utils.log("INFO"," *** Exit postProcessForAddResource *** ", isDebugEnabled)
}
-
+
public void preProcessForDeleteResource(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** preProcessForDeleteResource ***** ", isDebugEnabled)
@@ -232,7 +232,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
if(hasResourcetoDelete) {
def jsonSlurper = new JsonSlurper()
- String serviceRelationShip = execution.getVariable("serviceRelationShip")
+ String serviceRelationShip = execution.getVariable("serviceRelationShip")
List relationShipList = jsonSlurper.parseText(serviceRelationShip)
//Set the real resource instance id to the decomosed resource list
@@ -249,7 +249,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
}
}
-
+
execution.setVariable("deleteResourceList", delResourceList)
utils.log("INFO"," *** Exit preProcessForDeleteResource *** ", isDebugEnabled)
@@ -258,60 +258,13 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
public void postProcessForDeleteResource(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** postProcessForDeleteResource ***** ", isDebugEnabled)
-
+
execution.setVariable("operationType", "update")
utils.log("INFO"," *** Exit postProcessForDeleteResource *** ", isDebugEnabled)
- }
-
- public void preProcessAAIGET(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- }
-
- public void postProcessAAIGET(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
- String msg = ""
-
- try {
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- utils.log("INFO","Error getting Service-instance from AAI in postProcessAAIGET", + serviceInstanceName, isDebugEnabled)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- utils.logAudit("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
- else
- {
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI){
- String aaiService = execution.getVariable("GENGS_service")
- if (!isBlank(aaiService) && (utils.nodeExists(aaiService, "resource-version"))) {
- execution.setVariable("serviceInstanceVersion", utils.getNodeText(aaiService, "resource-version"))
- utils.log("INFO","Found Service-instance in AAI.serviceInstanceName:" + execution.getVariable("serviceInstanceName"), isDebugEnabled)
- }
- }
- }
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex) {
- msg = "Exception in DoUpdateE2EServiceInstance.postProcessAAIGET " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- utils.log("INFO"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
- }
+ }
- public void preProcessAAIPUT(DelegateExecution execution) {
+ public void preProcessAAIPUT(DelegateExecution execution) {
def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
utils.log("INFO","Entered " + method, isDebugEnabled)
@@ -321,7 +274,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
String serviceInstanceVersion = execution.getVariable("serviceInstanceVersion")
//execution.setVariable("GENPS_serviceResourceVersion", serviceInstanceVersion)
-
+
//requestDetails.modelInfo.for AAI PUT servieInstanceData
//requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData
String serviceInstanceName = execution.getVariable("serviceInstanceName")
@@ -334,7 +287,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
AaiUtil aaiUriUtil = new AaiUtil(this)
- utils.log("INFO","start create aai uri: " + aaiUriUtil, isDebugEnabled)
+ utils.log("INFO","start create aai uri: " + aaiUriUtil, isDebugEnabled)
String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
utils.log("INFO","aai_uri: " + aai_uri, isDebugEnabled)
String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri)
@@ -349,7 +302,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
<service-role>${MsoUtils.xmlEscape(aaiServiceRole)}</service-role>
<resource-version>${MsoUtils.xmlEscape(serviceInstanceVersion)}</resource-version>
<model-invariant-id>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-id>
- <model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
+ <model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
</service-instance>""".trim()
execution.setVariable("serviceInstanceData", serviceInstanceData)
@@ -357,10 +310,10 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.logAudit(serviceInstanceData)
utils.log("INFO", " aai_uri " + aai_uri + " namespace:" + namespace, isDebugEnabled)
utils.log("INFO", " 'payload' to update Service Instance in AAI - " + "\n" + serviceInstanceData, isDebugEnabled)
-
+
utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
-
+ }
+
public void postProcessAAIPUT(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** postProcessAAIPUT ***** ", isDebugEnabled)
@@ -397,13 +350,13 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
utils.log("INFO"," *** Exit postProcessAAIPUT *** ", isDebugEnabled)
- }
+ }
public void preProcessRollback (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** preProcessRollback ***** ", isDebugEnabled)
try {
-
+
Object workflowException = execution.getVariable("WorkflowException");
if (workflowException instanceof WorkflowException) {
@@ -441,11 +394,11 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.log("INFO"," *** Exit postProcessRollback *** ", isDebugEnabled)
}
-
+
public void postConfigRequest(execution){
//now do noting
}
-
+
}
-
+
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy
index a2d94baaed..b5a8c898a1 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstanceRollback.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -67,13 +67,13 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
execution.setVariable("rollbackAAI",false)
execution.setVariable("rollbackAdded",false)
execution.setVariable("rollbackDeleted",false)
-
+
List addResourceList = execution.getVariable("addResourceList")
List delResourceList = execution.getVariable("delResourceList")
execution.setVariable("addResourceList_o", addResourceList)
execution.setVariable("delResourceList_o", delResourceList)
//exchange add and delete resource list
- execution.setVariable("addResourceList", delResourceList)
+ execution.setVariable("addResourceList", delResourceList)
execution.setVariable("delResourceList", addResourceList)
try {
@@ -103,14 +103,14 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
{
execution.setVariable("rollbackAdded", true)
}
-
+
def rollbackDeleted = rollbackData.get("SERVICEINSTANCE", "rollbackDeleted")
if ("true".equals(rollbackDeleted))
{
execution.setVariable("rollbackDeleted", true)
- }
+ }
- if (execution.getVariable("rollbackAAI") != true && execution.getVariable("rollbackAdded") != true
+ if (execution.getVariable("rollbackAAI") != true && execution.getVariable("rollbackAdded") != true
&& execution.getVariable("rollbackDeleted") != true)
{
execution.setVariable("skipRollback", true)
@@ -148,7 +148,7 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
boolean rollbackAAI = execution.getVariable("rollbackAAI")
boolean rollbackAdded = execution.getVariable("rollbackAdded")
boolean rollbackDeleted = execution.getVariable("rollbackDeleted")
-
+
List addResourceList = execution.getVariable("addResourceList_o")
List delResourceList = execution.getVariable("delResourceList_o")
execution.setVariable("addResourceList", addResourceList)
@@ -177,66 +177,21 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
msoLogger.debug(msg)
}
}
-
-
+
+
public void preProcessForAddResource(DelegateExecution execution) {
}
public void postProcessForAddResource(DelegateExecution execution) {
}
-
+
public void preProcessForDeleteResource(DelegateExecution execution) {
}
public void postProcessForDeleteResource(DelegateExecution execution) {
- }
-
- public void preProcessAAIGET(DelegateExecution execution) {
- }
-
- public void postProcessAAIGET(DelegateExecution execution) {
- msoLogger.trace("postProcessAAIGET ")
- String msg = ""
-
- try {
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- msoLogger.info("Error getting Service-instance from AAI in postProcessAAIGET", + serviceInstanceName)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- msoLogger.debug("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- msoLogger.info(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
- else
- {
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- if(foundInAAI){
- String aaiService = execution.getVariable("GENGS_service")
- if (!isBlank(aaiService) && (utils.nodeExists(aaiService, "resource-version"))) {
- execution.setVariable("serviceInstanceVersion_n", utils.getNodeText(aaiService, "resource-version"))
- msoLogger.info("Found Service-instance in AAI.serviceInstanceName:" + execution.getVariable("serviceInstanceName"))
- }
- }
- }
- } catch (BpmnError e) {
- throw e;
- } catch (Exception ex) {
- msg = "Exception in DoCreateServiceInstance.postProcessAAIGET " + ex.getMessage()
- msoLogger.info(msg)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
- }
- msoLogger.trace("Exit postProcessAAIGET ")
- }
+ }
- public void preProcessAAIPUT(DelegateExecution execution) {
+ public void preProcessAAIPUT(DelegateExecution execution) {
def method = getClass().getSimpleName() + '.preProcessRequest(' +'execution=' + execution.getId() +')'
msoLogger.info("Entered " + method)
String msg = ""
@@ -244,7 +199,7 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
String serviceInstanceVersion = execution.getVariable("serviceInstanceVersion_n")
// execution.setVariable("GENPS_serviceResourceVersion", serviceInstanceVersion)
-
+
//requestDetails.modelInfo.for AAI PUT servieInstanceData
//requestDetails.requestInfo. for AAI GET/PUT serviceInstanceData
String serviceInstanceName = execution.getVariable("serviceInstanceName")
@@ -255,7 +210,7 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
String modelInvariantUuid = execution.getVariable("modelInvariantUuid")
String modelUuid = execution.getVariable("model-version-id-original")
- //AAI PUT
+ //AAI PUT
AaiUtil aaiUriUtil = new AaiUtil(this)
utils.log("INFO","start create aai uri: " + aaiUriUtil, isDebugEnabled)
String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
@@ -271,7 +226,7 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
<service-role>${MsoUtils.xmlEscape(aaiServiceRole)}</service-role>
<resource-version>${MsoUtils.xmlEscape(serviceInstanceVersion)}</resource-version>
<model-invariant-id>${MsoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-id>
- <model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
+ <model-version-id>${MsoUtils.xmlEscape(modelUuid)}</model-version-id>
</service-instance>""".trim()
execution.setVariable("serviceInstanceData", serviceInstanceData)
@@ -279,10 +234,10 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
msoLogger.debug(serviceInstanceData)
msoLogger.info(" aai_uri " + aai_uri + " namespace:" + namespace)
msoLogger.info(" 'payload' to update Service Instance in AAI - " + "\n" + serviceInstanceData)
-
+
msoLogger.info("Exited " + method)
- }
-
+ }
+
public void postProcessAAIPUT(DelegateExecution execution) {
msoLogger.trace("postProcessAAIPUT ")
String msg = ""
@@ -299,7 +254,7 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
}
else
{
-
+
}
} catch (BpmnError e) {
@@ -310,7 +265,7 @@ public class DoUpdateE2EServiceInstanceRollback extends AbstractServiceTaskProce
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
msoLogger.trace("Exit postProcessAAIPUT ")
- }
+ }
public void processRollbackException(DelegateExecution execution){
msoLogger.trace("processRollbackException ")
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
index 7272f421fc..4f6fbf9966 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -37,6 +37,15 @@ import org.onap.so.logger.MsoLogger
import org.onap.so.rest.APIResponse
import org.springframework.web.util.UriUtils
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.Relationships
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.json.JSONObject
+import javax.ws.rs.NotFoundException
+
import groovy.json.*
import groovy.xml.XmlUtil
@@ -46,7 +55,7 @@ import groovy.xml.XmlUtil
*/
public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoUpdateNetworkInstance.class);
-
+
String Prefix="UPDNETI_"
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
@@ -109,7 +118,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "networkTableRefUriList", null)
execution.setVariable(Prefix + "networkTableRefCount", 0)
execution.setVariable(Prefix + "tableRefCollection", "")
-
+
// AAI requery Id
execution.setVariable(Prefix + "requeryIdAAIRequest","")
execution.setVariable(Prefix + "requeryIdAAIResponse", "")
@@ -137,9 +146,9 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "isVnfBindingPresent", false)
execution.setVariable(Prefix + "Success", false)
execution.setVariable(Prefix + "serviceInstanceId", "")
-
+
execution.setVariable(Prefix + "isException", false)
-
+
}
// **************************************************
@@ -158,7 +167,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
try {
// initialize flow variables
InitializeProcessVariables(execution)
-
+
// GET Incoming request & validate 3 kinds of format.
execution.setVariable("action", "UPDATE")
String networkRequest = execution.getVariable("bpmnRequest")
@@ -169,7 +178,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
def prettyJson = JsonOutput.prettyPrint(networkRequest.toString())
msoLogger.debug(" Incoming message formatted . . . : " + '\n' + prettyJson)
networkRequest = vidUtils.createXmlNetworkRequestInfra(execution, networkRequest)
-
+
} catch (Exception ex) {
String dataErrorMessage = " Invalid json format Request - " + ex.getMessage()
msoLogger.debug(dataErrorMessage)
@@ -177,27 +186,27 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
}
} else {
// XML format request is sent
-
+
}
} else {
// vIPR format request is sent, create xml from individual variables
networkRequest = vidUtils.createXmlNetworkRequestInstance(execution)
}
-
+
networkRequest = utils.formatXml(networkRequest)
msoLogger.debug(networkRequest)
execution.setVariable(Prefix + "networkRequest", networkRequest)
msoLogger.debug(" network-request - " + '\n' + networkRequest)
-
+
// validate 'disableRollback' (aka, 'suppressRollback')
boolean rollbackEnabled = networkUtils.isRollbackEnabled(execution, networkRequest)
execution.setVariable(Prefix + "rollbackEnabled", rollbackEnabled)
msoLogger.debug(Prefix + "rollbackEnabled - " + rollbackEnabled)
-
+
String networkInputs = utils.getNodeXml(networkRequest, "network-inputs", false).replace("tag0:","").replace(":tag0","")
execution.setVariable(Prefix + "networkInputs", networkInputs)
msoLogger.debug(Prefix + "networkInputs - " + '\n' + networkInputs)
-
+
// prepare messageId
String messageId = execution.getVariable(Prefix + "messageId") // for testing
if (messageId == null || messageId == "") {
@@ -207,11 +216,11 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(" UPDNETI_messageId, pre-assigned: " + messageId)
}
execution.setVariable(Prefix + "messageId", messageId)
-
+
String source = utils.getNodeText(networkRequest, "source")
execution.setVariable(Prefix + "source", source)
msoLogger.debug(Prefix + "source - " + source)
-
+
String networkId = ""
if (utils.nodeExists(networkRequest, "network-id")) {
networkId = utils.getNodeText(networkRequest, "network-id")
@@ -221,10 +230,10 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
String dataErrorMessage = "Variable 'network-id' value/element is missing."
msoLogger.debug(" Invalid Request - " + dataErrorMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
+
}
}
-
+
String lcpCloudRegion = ""
if (utils.nodeExists(networkRequest, "aic-cloud-region")) {
lcpCloudRegion = utils.getNodeText(networkRequest, "aic-cloud-region")
@@ -235,7 +244,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
}
}
-
+
String serviceInstanceId = ""
if (utils.nodeExists(networkRequest, "service-instance-id")) {
serviceInstanceId = utils.getNodeText(networkRequest, "service-instance-id")
@@ -246,35 +255,33 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
}
}
-
+
// PO Authorization Info / headers Authorization=
String basicAuthValuePO = UrnPropertiesReader.getVariable("mso.adapters.po.auth",execution)
-
+
try {
def encodedString = utils.getBasicAuth(basicAuthValuePO, UrnPropertiesReader.getVariable("mso.msoKey", execution))
execution.setVariable("BasicAuthHeaderValuePO",encodedString)
execution.setVariable("BasicAuthHeaderValueSDNC", encodedString)
-
+
} catch (IOException ex) {
String exceptionMessage = "Exception Encountered in DoUpdateNetworkInstance, PreProcessRequest() - "
String dataErrorMessage = exceptionMessage + " Unable to encode PO/SDNC user/password string - " + ex.getMessage()
msoLogger.debug(dataErrorMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
}
-
+
// Set variables for Generic Get Sub Flow use
execution.setVariable(Prefix + "serviceInstanceId", serviceInstanceId)
msoLogger.debug(Prefix + "serviceInstanceId - " + serviceInstanceId)
-
- execution.setVariable("GENGS_type", "service-instance")
- msoLogger.debug("GENGS_type - " + "service-instance")
+
msoLogger.debug(" Url for SDNC adapter: " + UrnPropertiesReader.getVariable("mso.adapters.sdnc.endpoint",execution))
-
+
String sdncVersion = execution.getVariable("sdncVersion")
msoLogger.debug("sdncVersion? : " + sdncVersion)
-
- // build 'networkOutputs'
+
+ // build 'networkOutputs'
networkId = utils.getNodeText(networkRequest, "network-id")
if ((networkId == null) || (networkId == "null")) {
networkId = ""
@@ -292,7 +299,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug(Prefix + "networkOutputs - " + '\n' + networkOutputs)
execution.setVariable(Prefix + "networkId", networkId)
execution.setVariable(Prefix + "networkName", networkName)
-
+
} catch (BpmnError e) {
throw e;
@@ -307,6 +314,31 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
+ /**
+ * Gets the service instance uri from aai
+ *
+ */
+ public void getServiceInstance(DelegateExecution execution) {
+ msoLogger.trace("getServiceInstance ")
+ try {
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(!resourceClient.exists(uri)){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Service Instance not found in aai")
+ }
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch (Exception ex){
+ String msg = "Exception in getServiceInstance. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ }
+
public void callRESTQueryAAICloudRegion (DelegateExecution execution) {
execution.setVariable("prefix", Prefix)
@@ -383,7 +415,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
String returnCode = response.getStatusCode()
execution.setVariable(Prefix + "aaiIdReturnCode", returnCode)
msoLogger.debug(" ***** AAI Response Code : " + returnCode)
-
+
String aaiResponseAsString = response.getResponseBodyAsString()
if (returnCode=='200') {
@@ -462,12 +494,12 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
String netName = utils.getNodeText(aaiResponseAsString, "network-name")
String networkOutputs =
"""<network-outputs>
- <network-id>${MsoUtils.xmlEscape(netId)}</network-id>
+ <network-id>${MsoUtils.xmlEscape(netId)}</network-id>
<network-name>${MsoUtils.xmlEscape(netName)}</network-name>
</network-outputs>"""
execution.setVariable(Prefix + "networkOutputs", networkOutputs)
msoLogger.debug(" networkOutputs - " + '\n' + networkOutputs)
-
+
} else {
if (returnCode=='404') {
String dataErrorMessage = "Response Error from ReQueryAAINetworkId is 404 (Not Found)."
@@ -866,13 +898,13 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
String dataErrorMessage = "Response Error from QueryAAINetworkTableRef is 404 (Not Found)."
msoLogger.debug(dataErrorMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
-
+
} else {
if (aaiResponseAsString.contains("RESTFault")) {
WorkflowException exceptionObject = exceptionUtil.MapAAIExceptionToWorkflowException(aaiResponseAsString, execution)
execution.setVariable("WorkflowException", exceptionObject)
throw new BpmnError("MSOWorkflowException")
-
+
} else {
// aai all errors
String dataErrorMessage = "Unexpected Response from QueryAAINetworkTableRef - " + returnCode
@@ -908,7 +940,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
} catch (BpmnError e) {
throw e;
-
+
} catch (Exception ex) {
String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. callRESTQueryAAINetworkTableRef() - " + ex.getMessage()
msoLogger.debug(exceptionMessage)
@@ -917,7 +949,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
-
+
public void callRESTUpdateContrailAAINetwork(DelegateExecution execution) {
execution.setVariable("prefix", Prefix)
@@ -953,7 +985,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
APIResponse response = aaiUriUtil.executeAAIPutCall(execution, updateContrailAAIUrlRequest, payload)
String returnCode = response.getStatusCode()
String aaiUpdateContrailResponseAsString = response.getResponseBodyAsString()
-
+
execution.setVariable(Prefix + "aaiUpdateContrailReturnCode", returnCode)
msoLogger.debug(" ***** AAI Update Contrail Response Code : " + returnCode)
@@ -1015,7 +1047,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
String queryIdResponse = execution.getVariable(Prefix + "requeryIdAAIResponse")
String cloudRegionId = execution.getVariable(Prefix + "cloudRegionPo")
String backoutOnFailure = execution.getVariable(Prefix + "rollbackEnabled")
-
+
// Prepare Network request
String routeCollection = execution.getVariable(Prefix + "routeCollection")
String policyCollection = execution.getVariable(Prefix + "networkCollection")
@@ -1057,7 +1089,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
if (networkId == null) {networkId = ""}
String serviceInstanceId = utils.getNodeText(updateNetworkInput, "service-instance-id")
-
+
String queryAAIResponse = execution.getVariable(Prefix + "queryIdAAIResponse")
// 1. prepare assign topology via SDNC Adapter SUBFLOW call
@@ -1078,7 +1110,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
}
-
+
// **************************************************
@@ -1212,7 +1244,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "Success", true)
msoLogger.debug(" ***** postProcessResponse(), GOOD !!!")
} else {
- execution.setVariable(Prefix + "Success", false)
+ execution.setVariable(Prefix + "Success", false)
execution.setVariable("rollbackData", null)
String exceptionMessage = " Exception encountered in MSO Bpmn. "
if (execution.getVariable("workflowException") != null) { // Output of Rollback flow.
@@ -1223,18 +1255,18 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
if (execution.getVariable(Prefix + "WorkflowException") != null) {
WorkflowException pwfex = execution.getVariable(Prefix + "WorkflowException")
exceptionMessage = pwfex.getErrorMessage()
- }
+ }
}
// going to the Main flow: a-la-carte or macro
msoLogger.debug(" ***** postProcessResponse(), BAD !!!")
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
throw new BpmnError("MSOWorkflowException")
}
-
+
} catch(BpmnError b){
msoLogger.debug("Rethrowing MSOWorkflowException")
throw b
-
+
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. postProcessResponse() - " + ex.getMessage()
@@ -1253,7 +1285,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.trace("Inside prepareSDNCRollbackRequest of DoUpdateNetworkInstance ")
try {
- // for some reason the WorkflowException object is null after the sdnc rollback call task, need to save WorkflowException.
+ // for some reason the WorkflowException object is null after the sdnc rollback call task, need to save WorkflowException.
execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
// get variables
String sdncCallback = UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
@@ -1282,11 +1314,11 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
public void prepareRollbackData(DelegateExecution execution) {
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside prepareRollbackData() of DoUpdateNetworkInstance ")
-
+
try {
-
+
Map<String, String> rollbackData = new HashMap<String, String>();
String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
if (rollbackSDNCRequest != null) {
@@ -1302,33 +1334,33 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
}
execution.setVariable("rollbackData", rollbackData)
msoLogger.debug("** rollbackData : " + rollbackData)
-
+
execution.setVariable("WorkflowException", execution.getVariable(Prefix + "WorkflowException"))
msoLogger.debug("** WorkflowException : " + execution.getVariable("WorkflowException"))
-
+
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareRollbackData() - " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
-
+
}
-
+
}
-
+
public void prepareSuccessRollbackData(DelegateExecution execution) {
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside prepareSuccessRollbackData() of DoUpdateNetworkInstance ")
-
+
try {
-
+
if (execution.getVariable("sdncVersion") != '1610') {
// skip: 1702 for 'changeassign' or equivalent not yet defined in SNDC, so no rollback.
} else {
prepareSDNCRollbackRequest(execution)
}
-
+
Map<String, String> rollbackData = new HashMap<String, String>();
String rollbackSDNCRequest = execution.getVariable(Prefix + "rollbackSDNCRequest")
if (rollbackSDNCRequest != null) {
@@ -1343,43 +1375,43 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
}
}
execution.setVariable("rollbackData", rollbackData)
-
+
msoLogger.debug("** 'rollbackData' for Full Rollback : " + rollbackData)
execution.setVariable("WorkflowException", null)
-
+
} catch (Exception ex) {
String exceptionMessage = " Bpmn error encountered in DoUpdateNetworkInstance flow. prepareSuccessRollbackData() - " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
-
+
}
-
+
}
-
+
public void setExceptionFlag(DelegateExecution execution){
execution.setVariable("prefix",Prefix)
-
+
msoLogger.trace("Inside setExceptionFlag() of DoUpdateNetworkInstance ")
-
+
try {
-
+
execution.setVariable(Prefix + "isException", true)
-
+
if (execution.getVariable("SavedWorkflowException1") != null) {
execution.setVariable(Prefix + "WorkflowException", execution.getVariable("SavedWorkflowException1"))
} else {
execution.setVariable(Prefix + "WorkflowException", execution.getVariable("WorkflowException"))
}
msoLogger.debug(Prefix + "WorkflowException - " +execution.getVariable(Prefix + "WorkflowException"))
-
+
} catch(Exception ex){
String exceptionMessage = "Bpmn error encountered in DoUpdateNetworkInstance flow. setExceptionFlag(): " + ex.getMessage()
msoLogger.debug(exceptionMessage)
exceptionUtil.buildWorkflowException(execution, 7000, exceptionMessage)
}
-
+
}
@@ -1396,7 +1428,7 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor {
msoLogger.debug("Variables List: " + execution.getVariables())
execution.setVariable("UnexpectedError", "Caught a Java Lang Exception - " + Prefix) // Adding this line temporarily until this flows error handling gets updated
exceptionUtil.buildWorkflowException(execution, 500, "Caught a Java Lang Exception")
-
+
}catch(Exception e){
msoLogger.debug("Caught Exception during processJavaException Method: " + e)
execution.setVariable("UnexpectedError", "Exception in processJavaException method") // Adding this line temporarily until this flows error handling gets updated
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
index 538f882c2b..ac8e506e1f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* ONAP - SO
* ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. 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.
@@ -22,17 +22,25 @@ package org.onap.so.bpmn.infrastructure.scripts;
import static org.apache.commons.lang3.StringUtils.*;
+import javax.ws.rs.NotFoundException
+
import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.json.JSONArray
import org.json.JSONObject
+import org.onap.aai.domain.yang.ServiceInstance
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.domain.Resource
import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.springframework.web.util.UriUtils
import groovy.json.*
@@ -68,7 +76,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
msg = "Input serviceInstanceId' is null"
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
-
+
//subscriberInfo for aai
String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "requestDetails.subscriberInfo.globalSubscriberId")
if (isBlank(globalSubscriberId)) {
@@ -86,16 +94,16 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
if (isBlank(productFamilyId))
{
msg = "Input productFamilyId is null"
- utils.log("INFO", msg, isDebugEnabled)
+ utils.log("INFO", msg, isDebugEnabled)
} else {
execution.setVariable("productFamilyId", productFamilyId)
}
-
+
//user params
- String userParams = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams")
+ String userParams = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams")
utils.log("INFO", "userParams:" + userParams, isDebugEnabled)
List<String> paramList = jsonUtil.StringArrayToList(execution, userParams)
- String uuiRequest = jsonUtil.getJsonValue(paramList.get(0), "UUIRequest")
+ String uuiRequest = jsonUtil.getJsonValue(paramList.get(0), "UUIRequest")
if (isBlank(uuiRequest)) {
msg = "Input uuiRequest is null"
utils.log("INFO", msg, isDebugEnabled)
@@ -116,34 +124,34 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
} else {
execution.setVariable("serviceType", serviceType)
}
-
+
// target model info
String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceInvariantUuid")
utils.log("INFO","modelInvariantUuid: " + modelInvariantUuid, isDebugEnabled)
execution.setVariable("modelInvariantUuid", modelInvariantUuid)
execution.setVariable("model-invariant-id-target", modelInvariantUuid)
-
+
String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid")
utils.log("INFO","modelUuid: " + modelUuid, isDebugEnabled)
execution.setVariable("modelUuid", modelUuid)
execution.setVariable("model-version-id-target", modelUuid)
-
+
String serviceModelName = jsonUtil.getJsonValue(uuiRequest, "service.parameters.templateName")
utils.log("INFO","serviceModelName: " + serviceModelName, isDebugEnabled)
if(serviceModelName == null) {
serviceModelName = ""
}
- execution.setVariable("serviceModelName", serviceModelName)
-
+ execution.setVariable("serviceModelName", serviceModelName)
+
//operationId
String operationId = jsonUtil.getJsonValue(siRequest, "operationId")
if (isBlank(operationId)) {
operationId = UUID.randomUUID().toString()
- }
- execution.setVariable("operationId", operationId)
+ }
+ execution.setVariable("operationId", operationId)
execution.setVariable("operationType", "update")
execution.setVariable("hasResourcetoUpdate", false)
-
+
execution.setVariable("URN_mso_adapters_openecomp_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
} catch (BpmnError e) {
@@ -155,164 +163,69 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
}
utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled)
}
-
-
- public void postProcessAAIGET(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
- String msg = ""
+ /**
+ * Gets the service instance and its relationships from aai
+ */
+ public void getServiceInstance(DelegateExecution execution) {
try {
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator")
- String serviceType = ""
-
- if(foundInAAI){
- utils.log("INFO","Found Service-instance in AAI", isDebugEnabled)
-
- String siData = execution.getVariable("GENGS_service")
- utils.log("INFO", "SI Data", isDebugEnabled)
- if (isBlank(siData))
- {
- msg = "Could not retrive ServiceInstance data from AAI, Id:" + serviceInstanceId
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- }
-
- utils.log("INFO", "SI Data" + siData, isDebugEnabled)
-
- // serviceInstanceName
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- if(isBlank(serviceInstanceName) && utils.nodeExists(siData, "service-instance-name")) {
- serviceInstanceName = utils.getNodeText(siData, "service-instance-name")
- execution.setVariable("serviceInstanceName", serviceInstanceName)
- }
-
- // Get Template uuid and version
- if (utils.nodeExists(siData, "model-invariant-id") && utils.nodeExists(siData, "model-version-id") ) {
- utils.log("INFO", "SI Data model-invariant-id and model-version-id exist:", isDebugEnabled)
-
- def modelInvariantId = utils.getNodeText(siData, "model-invariant-id")
- def modelVersionId = utils.getNodeText(siData, "model-version-id")
-
- // Set Original Template info
- execution.setVariable("model-invariant-id-original", modelInvariantId)
- execution.setVariable("model-version-id-original", modelVersionId)
- }
-
- //get related service instances (vnf/network or volume) for delete
- if (utils.nodeExists(siData, "relationship-list")) {
- utils.log("INFO", "SI Data relationship-list exists:", isDebugEnabled)
-
- JSONArray jArray = new JSONArray()
-
- XmlParser xmlParser = new XmlParser()
- Node root = xmlParser.parseText(siData)
- def relation_list = utils.getChildNode(root, 'relationship-list')
- def relationships = utils.getIdenticalChildren(relation_list, 'relationship')
-
- for (def relation: relationships) {
- def jObj = getRelationShipData(relation, isDebugEnabled)
- jArray.put(jObj)
- }
-
- execution.setVariable("serviceRelationShip", jArray.toString())
- }
- }else{
- boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator")
- if(!succInAAI){
- utils.log("INFO","Error getting Service-instance from AAI", + serviceInstanceId, isDebugEnabled)
- WorkflowException workflowException = execution.getVariable("WorkflowException")
- utils.logAudit("workflowException: " + workflowException)
- if(workflowException != null){
- exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage())
- }
- else
- {
- msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI
- utils.log("INFO", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg)
- }
- }
-
- utils.log("INFO","Service-instance NOT found in AAI. Silent Success", isDebugEnabled)
- }
- }catch (BpmnError e) {
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+ String globalSubscriberId = execution.getVariable('globalSubscriberId')
+ String serviceType = execution.getVariable('serviceType')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, serviceInstanceId)
+ AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
+
+ ServiceInstance si = wrapper.asBean(ServiceInstance.class)
+ execution.setVariable("serviceInstanceName", si.getServiceInstanceName())
+ execution.setVariable("model-invariant-id-original", si.getModelInvariantId())
+ execution.setVariable("model-version-id-original", si.getModelVersionId())
+
+ JSONObject ob = new JSONObject(wrapper.getJson())
+ JSONArray ar = ob.getJSONObject("relationship-list").getJSONArray("relationship")
+
+ execution.setVariable("serviceRelationShip", ar.toString())
+
+
+ }catch(BpmnError e) {
throw e;
- } catch (Exception ex) {
- msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
- utils.log("INFO", msg, isDebugEnabled)
+ }catch(NotFoundException e) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Service-instance does not exist AAI")
+ }catch(Exception ex) {
+ String msg = "Internal Error in getServiceInstance: " + ex.getMessage()
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("INFO"," *** Exit postProcessAAIGET *** ", isDebugEnabled)
}
-
- private JSONObject getRelationShipData(node, isDebugEnabled){
- JSONObject jObj = new JSONObject()
-
- def relation = utils.nodeToString(node)
- def rt = utils.getNodeText(relation, "related-to")
-
- def rl = utils.getNodeText(relation, "related-link")
- utils.log("INFO", "ServiceInstance Related NS/Configuration :" + rl, isDebugEnabled)
-
- def rl_datas = utils.getIdenticalChildren(node, "relationship-data")
- for(def rl_data : rl_datas) {
- def eKey = utils.getChildNodeText(rl_data, "relationship-key")
- def eValue = utils.getChildNodeText(rl_data, "relationship-value")
-
- if ((rt == "service-instance" && eKey.equals("service-instance.service-instance-id"))
- //for overlay/underlay
- || (rt == "configuration" && eKey.equals("configuration.configuration-id"))){
- jObj.put("resourceInstanceId", eValue)
- }
- }
-
- def rl_props = utils.getIdenticalChildren(node, "related-to-property")
- for(def rl_prop : rl_props) {
- def eKey = utils.getChildNodeText(rl_prop, "property-key")
- def eValue = utils.getChildNodeText(rl_prop, "property-value")
- if((rt == "service-instance" && eKey.equals("service-instance.service-instance-name"))
- //for overlay/underlay
- || (rt == "configuration" && eKey.equals("configuration.configuration-type"))){
- jObj.put("resourceType", eValue)
- }
- }
-
- utils.log("INFO", "Relationship related to Resource:" + jObj.toString(), isDebugEnabled)
- return jObj
- }
-
-
public void preCompareModelVersions(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
}
- public void postCompareModelVersions(DelegateExecution execution) {
+ public void postCompareModelVersions(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("DEBUG", " ======== STARTED postCompareModelVersions Process ======== ", isDebugEnabled)
-
+
def hasResourcetoUpdate = false
def hasResourcetoAdd = false
def hasResourcetoDelete = false
List<Resource> addResourceList = execution.getVariable("addResourceList")
List<Resource> delResourceList = execution.getVariable("delResourceList")
-
+
if(addResourceList != null && !addResourceList.isEmpty()) {
hasResourcetoAdd = true
}
-
+
if(delResourceList != null && !delResourceList.isEmpty()) {
hasResourcetoDelete = true
}
-
+
hasResourcetoUpdate = hasResourcetoAdd || hasResourcetoDelete
execution.setVariable("hasResourcetoUpdate", hasResourcetoUpdate)
-
- utils.log("DEBUG", "======== COMPLETED postCompareModelVersions Process ======== ", isDebugEnabled)
+
+ utils.log("DEBUG", "======== COMPLETED postCompareModelVersions Process ======== ", isDebugEnabled)
}
-
+
/**
* Init the service Operation Status
*/
@@ -367,28 +280,28 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
}
utils.log("DEBUG", "======== COMPLETED prepareInitServiceOperationStatus Process ======== ", isDebugEnabled)
}
-
+
/**
* Update the service Operation Status
*/
- public void preUpdateServiceOperationStatus(DelegateExecution execution){
+ public void preUpdateServiceOperationStatus(DelegateExecution execution){
def method = getClass().getSimpleName() + '.preUpdateServiceOperationStatus(' +'execution=' + execution.getId() +')'
def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
utils.log("INFO","Entered " + method, isDebugEnabled)
-
+
try{
String serviceId = execution.getVariable("serviceInstanceId")
String operationId = execution.getVariable("operationId")
String operationType = execution.getVariable("operationType")
String serviceName = execution.getVariable("serviceInstanceName")
- String result = execution.getVariable("operationResult")
+ String result = execution.getVariable("operationResult")
String progress = execution.getVariable("progress")
String reason = execution.getVariable("operationReason")
String userId = ""
utils.log("INFO", "progress: " + progress , isDebugEnabled)
String operationContent = "Prepare service : " + execution.getVariable("operationStatus")
-
+
utils.log("INFO", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId, isDebugEnabled)
serviceId = UriUtils.encode(serviceId,"UTF-8")
execution.setVariable("serviceInstanceId", serviceId)
@@ -421,7 +334,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
payload = utils.formatXml(payload)
execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload)
utils.log("INFO", "Outgoing preUpdateServiceOperationStatus: \n" + payload, isDebugEnabled)
-
+
}catch(Exception e){
utils.log("ERROR", "Exception Occured Processing preUpdateServiceOperationStatus. Exception is:\n" + e, isDebugEnabled)
@@ -429,7 +342,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
}
utils.log("INFO", "======== COMPLETED preUpdateServiceOperationStatus Process ======== ", isDebugEnabled)
utils.log("INFO", "Exited " + method, isDebugEnabled)
- }
+ }
public void sendSyncResponse (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
@@ -438,7 +351,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
try {
String operationId = execution.getVariable("operationId")
def hasResourcetoUpdate = execution.getVariable("hasResourcetoUpdate")
-
+
String updateServiceResp = ""
if(hasResourcetoUpdate) {
// RESTResponse for API Handler (APIH) Reply Task
@@ -447,7 +360,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
else {
updateServiceResp = """{"OperationResult":"No Resource to Add or Delete or Service Instance not found in AAI."}"""
}
-
+
utils.log("INFO", " sendSyncResponse to APIH:" + "\n" + updateServiceResp, isDebugEnabled)
sendWorkflowResponse(execution, 202, updateServiceResp)
execution.setVariable("sentSyncResponse", true)
@@ -498,7 +411,7 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
String requestId = execution.getVariable("msoRequestId")
String serviceInstanceId = execution.getVariable("serviceInstanceId")
String source = execution.getVariable("source")
-
+
String msoCompletionRequest =
"""<aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
xmlns:ns="http://org.onap/so/request/types/v1">
@@ -566,5 +479,5 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
execution.setVariable("falloutRequest", falloutRequest)
}
utils.log("INFO", "*** Exit prepareFalloutRequest ***", isDebugEnabled)
- }
+ }
}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
index eaf3631441..85993d6c92 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -33,6 +33,14 @@ import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
import org.onap.so.rest.APIResponse
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.Relationships
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import javax.ws.rs.NotFoundException
+import org.json.JSONObject
import static org.apache.commons.lang3.StringUtils.isBlank
@@ -100,7 +108,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
String dataErrorMessage = " Element 'serviceInstanceId' is missing. "
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, dataErrorMessage)
}
-
+
String requestAction = execution.getVariable("requestAction")
execution.setVariable("requestAction", requestAction)
@@ -117,20 +125,20 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
execution.setVariable("globalSubscriberId", globalSubscriberId)
execution.setVariable("globalCustomerId", globalSubscriberId)
-
+
String suppressRollback = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.requestInfo.suppressRollback")
execution.setVariable("disableRollback", suppressRollback)
msoLogger.debug("Incoming Suppress/Disable Rollback is: " + suppressRollback)
-
+
String productFamilyId = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.requestInfo.productFamilyId")
execution.setVariable("productFamilyId", productFamilyId)
msoLogger.debug("Incoming productFamilyId is: " + productFamilyId)
-
+
// extract subscriptionServiceType
String subscriptionServiceType = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.requestParameters.subscriptionServiceType")
execution.setVariable("subscriptionServiceType", subscriptionServiceType)
msoLogger.debug("Incoming subscriptionServiceType is: " + subscriptionServiceType)
-
+
// extract cloud configuration
String cloudConfiguration = jsonUtil.getJsonValue(DeleteVcpeResCustServiceRequest, "requestDetails.cloudConfiguration")
execution.setVariable("cloudConfiguration", cloudConfiguration)
@@ -145,7 +153,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
String sdncVersion = "1707"
execution.setVariable("sdncVersion", sdncVersion)
msoLogger.debug("sdncVersion: "+ sdncVersion)
-
+
//For Completion Handler & Fallout Handler
String requestInfo =
"""<request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
@@ -155,10 +163,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
</request-info>"""
execution.setVariable(Prefix+"requestInfo", requestInfo)
-
- //Setting for Generic Sub Flows
- execution.setVariable("GENGS_type", "service-instance")
-
+
msoLogger.trace("Completed preProcessRequest DeleteVcpeResCustServiceRequest Request ")
} catch (BpmnError e) {
@@ -189,120 +194,87 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
}
}
- public void prepareServiceDelete(DelegateExecution execution) {
- def isDebugEnabled=execution.getVariable(DebugFlag)
- msoLogger.trace("Inside prepareServiceDelete() of DeleteVcpeResCustService ")
-
+ /**
+ * Gets the service instance and its related resources from aai
+ *
+ * @author cb645j
+ */
+ public void getServiceInstance(DelegateExecution execution) {
try {
-
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
-
- // confirm if ServiceInstance was found
- if ( !execution.getVariable("GENGS_FoundIndicator") )
- {
- String exceptionMessage = "Bpmn error encountered in DeleteVcpeResCustService flow. Service Instance was not found in AAI by id: " + serviceInstanceId
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
-
- // get variable within incoming json
- String DeleteVcpeResCustServiceRequest = execution.getVariable("DeleteVcpeResCustServiceRequest");
-
- // get SI extracted by GenericGetService
- String serviceInstanceAaiRecord = execution.getVariable("GENGS_service");
-
- msoLogger.debug("serviceInstanceAaiRecord: "+serviceInstanceAaiRecord)
- serviceInstanceAaiRecord = utils.removeXmlNamespaces(serviceInstanceAaiRecord)
-
- def (TXC_found, TXC_id) = new Tuple(false, null)
- def (BRG_found, BRG_id) = new Tuple(false, null)
- List relatedVnfIdList = []
-
- for(Node rel: utils.getMultNodeObjects(serviceInstanceAaiRecord, "relationship")) {
- def relto = utils.getChildNodeText(rel, "related-to")
- def relink = utils.getChildNodeText(rel, "related-link")
- msoLogger.debug("check: "+relto+" link: "+relink)
-
- if(isBlank(relto) || isBlank(relink)) {
-
- } else if(relto == "generic-vnf") {
- def id = relink.substring(relink.indexOf("/generic-vnf/")+13)
- if(id.endsWith("/")) {
- id = id.substring(0, id.length()-1)
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(resourceClient.exists(uri)){
+ AAIResultWrapper wrapper = resourceClient.get(uri, NotFoundException.class)
+ Optional<Relationships> relationships = wrapper.getRelationships()
+
+ def (TXC_found, TXC_id) = new Tuple(false, null)
+ def (BRG_found, BRG_id) = new Tuple(false, null)
+ List relatedVnfIdList = []
+
+ if(relationships.isPresent()){
+
+ List<AAIResourceUri> vnfUris = relationships.get().getRelatedAAIUris(AAIObjectType.GENERIC_VNF)
+ for(AAIResourceUri u:vnfUris){
+ Map<String, String> keys = u.getURIKeys()
+ String vnfId = keys.get("vnf-id")
+ relatedVnfIdList.add(vnfId)
}
-
- relatedVnfIdList.add(id)
-
- } else if(relto == "allotted-resource") {
- def (type, id) = getAaiAr(execution, relink)
-
- if(isBlank(type) || isBlank(id)) {
-
- } else if(type == "TunnelXConn" || type == "Tunnel XConn") {
- msoLogger.debug("TunnelXConn AR found")
- TXC_found = true
- TXC_id = id
-
- } else if(type == "BRG") {
- msoLogger.debug("BRG AR found")
- BRG_found = true
- BRG_id = id
+ List<AAIResourceUri> arUris = relationships.get().getRelatedAAIUris(AAIObjectType.ALLOTTED_RESOURCE)
+ for(AAIResourceUri u:arUris){
+ String ar = resourceClient.get(u).getJson()
+
+ def type = jsonUtil.getJsonValue(ar, "type")
+ def id = jsonUtil.getJsonValue(ar, "id")
+
+ if(type == "TunnelXConn" || type == "Tunnel XConn") {
+ msoLogger.debug("TunnelXConn AR found")
+ TXC_found = true
+ TXC_id = id
+
+ }else if(type == "BRG") {
+ msoLogger.debug("BRG AR found")
+ BRG_found = true
+ BRG_id = id
+ }
+
+ execution.setVariable(Prefix+"TunnelXConn", TXC_found)
+ execution.setVariable("TXC_allottedResourceId", TXC_id)
+ msoLogger.debug("TXC_allottedResourceId: " + TXC_id)
+
+ execution.setVariable(Prefix+"BRG", BRG_found)
+ execution.setVariable("BRG_allottedResourceId", BRG_id)
+ msoLogger.debug("BRG_allottedResourceId: " + BRG_id)
+
}
}
+
+ execution.setVariable(Prefix+"vnfsCount", relatedVnfIdList.size())
+ if(relatedVnfIdList.size() > 0) {
+ execution.setVariable(Prefix+"relatedVnfIdList", relatedVnfIdList)
+ }
+
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
}
-
- execution.setVariable(Prefix+"TunnelXConn", TXC_found)
- execution.setVariable("TXC_allottedResourceId", TXC_id)
- msoLogger.debug("TXC_allottedResourceId: " + TXC_id)
-
- execution.setVariable(Prefix+"BRG", BRG_found)
- execution.setVariable("BRG_allottedResourceId", BRG_id)
- msoLogger.debug("BRG_allottedResourceId: " + BRG_id)
-
- int vnfsCount = relatedVnfIdList.size()
- execution.setVariable(Prefix+"vnfsCount", vnfsCount)
- msoLogger.debug(" "+Prefix+"vnfsCount : " + vnfsCount)
- if(vnfsCount > 0) {
- execution.setVariable(Prefix+"relatedVnfIdList", relatedVnfIdList)
- }
-
- msoLogger.trace("Completed prepareServiceDelete() of DeleteVcpeResCustService ")
- } catch (BpmnError e){
+
+ }catch(BpmnError e) {
throw e;
- } catch (Exception ex) {
- sendSyncError(execution)
- String exceptionMessage = "Bpmn error encountered in DeleteVcpeResCustService flow. prepareServiceDelete() - " + ex.getMessage()
- msoLogger.debug(exceptionMessage)
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
- }
- }
-
- private getAaiAr(DelegateExecution execution, String relink) {
- def isDebugEnabled = execution.getVariable(DebugFlag)
- AaiUtil aaiUtil = new AaiUtil(this)
- String aaiEndpoint = UrnPropertiesReader.getVariable("aai.endpoint",execution) + relink
-
- msoLogger.debug("get AR info " + aaiEndpoint)
- APIResponse response = aaiUtil.executeAAIGetCall(execution, aaiEndpoint)
-
- int responseCode = response.getStatusCode()
- msoLogger.debug("get AR info responseCode:" + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- msoLogger.debug("get AR info " + aaiResponse)
-
- if(responseCode < 200 || responseCode >= 300 || isBlank(aaiResponse)) {
- return new Tuple2(null, null)
+ }catch(NotFoundException e) {
+ msoLogger.debug("Service Instance does not exist AAI")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Service Instance was not found in aai")
+ }catch(Exception ex) {
+ String msg = "Internal Error in getServiceInstance: " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
-
- def type = utils.getNodeText(aaiResponse, "type")
- def id = utils.getNodeText(aaiResponse, "id")
-
- return new Tuple2(type, id)
}
-
-
+
+
// *******************************
- //
+ //
// *******************************
public void prepareVnfAndModulesDelete (DelegateExecution execution) {
def isDebugEnabled=execution.getVariable(DebugFlag)
@@ -316,7 +288,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
if (vnfList.size() > 0 ) {
vnfId = vnfList.get(vnfsDeletedCount.intValue())
}
-
+
execution.setVariable("vnfId", vnfId)
msoLogger.debug("need to delete vnfId:" + vnfId)
@@ -327,7 +299,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
}
}
-
+
// *******************************
// Validate Vnf request Section -> increment count
// *******************************
@@ -338,9 +310,9 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
try {
int vnfsDeletedCount = execution.getVariable(Prefix+"vnfsDeletedCount")
vnfsDeletedCount++
-
+
execution.setVariable(Prefix+"vnfsDeletedCount", vnfsDeletedCount)
-
+
msoLogger.debug(" ***** Completed validateVnfDelete of DeleteVcpeResCustService ***** "+" vnf # "+vnfsDeletedCount)
} catch (Exception ex) {
// try error in method block
@@ -349,7 +321,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
}
}
-
+
// *****************************************
// Prepare Completion request Section
// *****************************************
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
index 8a8aa2b2ad..3c08779513 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -37,12 +37,19 @@ import static org.apache.commons.lang3.StringUtils.*
import org.onap.so.logger.MessageEnum
import org.onap.so.logger.MsoLogger
-
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.Relationships
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.json.JSONObject
+import javax.ws.rs.NotFoundException
/**
* This groovy class supports the <class>DoCreateAllottedResourceBRG.bpmn</class> process.
*
* @author
- *
+ *
* Inputs:
* @param - msoRequestId
* @param - isDEbugLogEnabled
@@ -57,15 +64,15 @@ import org.onap.so.logger.MsoLogger
* @param - allottedResourceRole
* @param - allottedResourceType
* @param - brgWanMacAddress
- * @param - vni
- * @param - vgmuxBearerIP
+ * @param - vni
+ * @param - vgmuxBearerIP
*
* Outputs:
* @param - rollbackData (localRB->null)
* @param - rolledBack (no localRB->null, localRB F->false, localRB S->true)
* @param - WorkflowException - O
* @param - allottedResourceId
- * @param - allottedResourceName
+ * @param - allottedResourceName
*
*/
public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
@@ -155,6 +162,33 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
msoLogger.trace("end preProcessRequest")
}
+ /**
+ * Gets the service instance uri from aai
+ */
+ public void getServiceInstance(DelegateExecution execution) {
+ msoLogger.trace("getServiceInstance ")
+ try {
+ String serviceInstanceId = execution.getVariable('serviceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
+
+ if(resourceClient.exists(uri)){
+ execution.setVariable("CSI_resourceLink", uri.build().toString())
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai")
+ }
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch (Exception ex){
+ String msg = "Exception in getServiceInstance. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit getServiceInstance ")
+ }
+
public void getAaiAR (DelegateExecution execution) {
@@ -193,6 +227,39 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
msoLogger.trace("end getAaiAR")
}
+ public void getParentServiceInstance(DelegateExecution execution) {
+ msoLogger.trace("getParentServiceInstance ")
+ try {
+ String serviceInstanceId = execution.getVariable('parentServiceInstanceId')
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.NODES_QUERY, "").queryParam("search-node-type", "service-instance").queryParam("filter", "service-instance-id:EQUALS:" + serviceInstanceId)
+ String json = resourceClient.get(uri).getJson()
+
+ JSONObject obj = new JSONObject(json)
+ if(obj.has("result-data")){
+ JSONObject ob = obj.getJSONArray("result-data").getJSONObject(0)
+ String resourceLink = ob.getString("resource-link")
+
+ String[] split = resourceLink.split("/aai/")
+ String siRelatedLink = "/aai/" + split[1]
+
+ execution.setVariable("PSI_resourceLink", resourceLink)
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai")
+ }
+
+ }catch(BpmnError e) {
+ throw e;
+ }catch (Exception ex){
+ String msg = "Exception in getParentServiceInstance. " + ex.getMessage()
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ msoLogger.trace("Exit getParentServiceInstance ")
+ }
+
+
public void createAaiAR(DelegateExecution execution) {
@@ -387,9 +454,9 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
<global-customer-id>${MsoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
</service-information>
<allotted-resource-information>
- <allotted-resource-id>${MsoUtils.xmlEscape(allottedResourceId)}</allotted-resource-id>
+ <allotted-resource-id>${MsoUtils.xmlEscape(allottedResourceId)}</allotted-resource-id>
<allotted-resource-type>brg</allotted-resource-type>
- <parent-service-instance-id>${MsoUtils.xmlEscape(parentServiceInstanceId)}</parent-service-instance-id>
+ <parent-service-instance-id>${MsoUtils.xmlEscape(parentServiceInstanceId)}</parent-service-instance-id>
<onap-model-information>
<model-invariant-uuid>${MsoUtils.xmlEscape(modelInvariantId)}</model-invariant-uuid>
<model-uuid>${MsoUtils.xmlEscape(modelUUId)}</model-uuid>
@@ -575,7 +642,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
String serviceInstanceId = execution.getVariable("serviceInstanceId")
String sdncRequestId = UUID.randomUUID().toString()
-
+
//neeed the same url as used by vfmodules
String SDNCGetRequest =
"""<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
@@ -600,7 +667,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
}
msoLogger.trace("end preProcessSDNCGet")
}
-
+
public void updateAaiAROrchStatus(DelegateExecution execution, String status){
msoLogger.trace("start updateAaiAROrchStatus")
@@ -609,7 +676,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
String orchStatus = arUtils.updateAROrchStatus(execution, status, aaiARPath)
msoLogger.trace("end updateAaiAROrchStatus")
}
-
+
public void generateOutputs(DelegateExecution execution)
{
@@ -619,7 +686,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
msoLogger.debug("resp:" + sdncGetResponse)
String arData = utils.getNodeXml(sdncGetResponse, "brg-topology")
arData = utils.removeXmlNamespaces(arData)
-
+
String brga = utils.getNodeXml(arData, "brg-assignments")
String ari = utils.getNodeXml(arData, "allotted-resource-identifiers")
execution.setVariable("allotedResourceName", utils.getNodeText(ari, "allotted-resource-name"))
@@ -630,7 +697,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
msoLogger.debug(msg)
}
msoLogger.trace("end generateOutputs")
-
+
}
public void preProcessRollback (DelegateExecution execution) {
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn
index a835946d1d..0d287ebca4 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteVcpeResCustService.bpmn
@@ -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.9.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.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="DeleteVcpeResCustService" name="DeleteVcpeResCustService" isExecutable="true">
<bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
@@ -138,26 +138,12 @@ DeleteVcpeResCustService.prepareFalloutRequest(execution)]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_04ao07f</bpmn2:incoming>
<bpmn2:linkEventDefinition name="FinishProcess" />
</bpmn2:intermediateThrowEvent>
- <bpmn2:callActivity id="callGetServiceInstance" name="Get&#10;Service&#10;Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
- <camunda:in source="GENGS_type" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- </bpmn2:extensionElements>
+ <bpmn2:scriptTask id="ScriptTask_05m3m2e" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_0jek18q</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1ttswdr</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:scriptTask id="ScriptTask_05m3m2e" name="Process Response &#38; ready data for subflows" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1ttswdr</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_18103ca</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
def DeleteVcpeResCustService = new DeleteVcpeResCustService()
-DeleteVcpeResCustService.prepareServiceDelete(execution)]]></bpmn2:script>
+DeleteVcpeResCustService.getServiceInstance(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_112zjtp" name="QueryServiceInstance">
<bpmn2:outgoing>SequenceFlow_0jek18q</bpmn2:outgoing>
@@ -167,10 +153,9 @@ DeleteVcpeResCustService.prepareServiceDelete(execution)]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_18103ca</bpmn2:incoming>
<bpmn2:linkEventDefinition name="DeleteBRG" />
</bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_0jek18q" sourceRef="IntermediateCatchEvent_112zjtp" targetRef="callGetServiceInstance" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0jek18q" sourceRef="IntermediateCatchEvent_112zjtp" targetRef="ScriptTask_05m3m2e" />
<bpmn2:sequenceFlow id="SequenceFlow_18103ca" sourceRef="ScriptTask_05m3m2e" targetRef="IntermediateThrowEvent_162gs5w" />
<bpmn2:sequenceFlow id="SequenceFlow_04ao07f" sourceRef="doDeleteServiceInstance_CallActivity" targetRef="IntermediateThrowEvent_0prlju0" />
- <bpmn2:sequenceFlow id="SequenceFlow_1ttswdr" sourceRef="callGetServiceInstance" targetRef="ScriptTask_05m3m2e" />
<bpmn2:callActivity id="CallActivity_1yap348" name="Delete BRG Resources&#10;" calledElement="DoDeleteAllottedResourceBRG">
<bpmn2:extensionElements>
<camunda:in source="msoRequestId" target="msoRequestId" />
@@ -508,11 +493,8 @@ DeleteVcpeResCustService.validateVnfDelete(execution)]]></bpmn2:script>
<dc:Bounds x="491" y="1072" width="70" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_0nmoax4_di" bpmnElement="callGetServiceInstance">
- <dc:Bounds x="285" y="254" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_05m3m2e_di" bpmnElement="ScriptTask_05m3m2e">
- <dc:Bounds x="476" y="254" width="100" height="80" />
+ <dc:Bounds x="382" y="254" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateCatchEvent_112zjtp_di" bpmnElement="IntermediateCatchEvent_112zjtp">
<dc:Bounds x="96" y="276" width="36" height="36" />
@@ -528,16 +510,16 @@ DeleteVcpeResCustService.validateVnfDelete(execution)]]></bpmn2:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0jek18q_di" bpmnElement="SequenceFlow_0jek18q">
<di:waypoint xsi:type="dc:Point" x="132" y="294" />
- <di:waypoint xsi:type="dc:Point" x="285" y="294" />
+ <di:waypoint xsi:type="dc:Point" x="382" y="294" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="209" y="279" width="0" height="0" />
+ <dc:Bounds x="212" y="279" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_18103ca_di" bpmnElement="SequenceFlow_18103ca">
- <di:waypoint xsi:type="dc:Point" x="576" y="294" />
+ <di:waypoint xsi:type="dc:Point" x="482" y="294" />
<di:waypoint xsi:type="dc:Point" x="732" y="294" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="654" y="279" width="0" height="0" />
+ <dc:Bounds x="562" y="279" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_04ao07f_di" bpmnElement="SequenceFlow_04ao07f">
@@ -547,15 +529,6 @@ DeleteVcpeResCustService.validateVnfDelete(execution)]]></bpmn2:script>
<dc:Bounds x="447" y="1034" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1ttswdr_di" bpmnElement="SequenceFlow_1ttswdr">
- <di:waypoint xsi:type="dc:Point" x="385" y="294" />
- <di:waypoint xsi:type="dc:Point" x="422" y="294" />
- <di:waypoint xsi:type="dc:Point" x="422" y="294" />
- <di:waypoint xsi:type="dc:Point" x="476" y="294" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="437" y="294" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_06llof4_di" bpmnElement="SequenceFlow_06llof4">
<di:waypoint xsi:type="dc:Point" x="159" y="1466" />
<di:waypoint xsi:type="dc:Point" x="237" y="1466" />
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn
index 28bd3f76ea..1be30d62e4 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
<bpmn:process id="UpdateCustomE2EServiceInstance" name="UpdateCustomE2EServiceInstance" isExecutable="true">
<bpmn:startEvent id="StartEvent_00qj6ro" name="Update SI Start Flow">
<bpmn:outgoing>SequenceFlow_0s2spoq</bpmn:outgoing>
@@ -176,29 +176,13 @@ csi.sendSyncResponse(execution)]]></bpmn:script>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0je30si" sourceRef="ScriptTask_0ttvn8r" targetRef="CallActivity_02fyxz0" />
<bpmn:sequenceFlow id="SequenceFlow_1fueo69" name="no" sourceRef="ExclusiveGateway_0aqn64l" targetRef="EndEvent_07uk5iy" />
- <bpmn:callActivity id="CallActivity_1vejucv" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn:extensionElements>
+ <bpmn:scriptTask id="ScriptTask_0cx1y0g" name="AAI&#10;Query&#10;(svc instance)" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0az1n4y</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1bd4711</bpmn:outgoing>
- </bpmn:callActivity>
- <bpmn:scriptTask id="ScriptTask_0cx1y0g" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1bd4711</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_03i6zhx</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new UpdateCustomE2EServiceInstance()
-dcsi.postProcessAAIGET(execution)]]></bpmn:script>
+dcsi.getServiceInstance(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_1bd4711" sourceRef="CallActivity_1vejucv" targetRef="ScriptTask_0cx1y0g" />
<bpmn:scriptTask id="ScriptTask_11y3uq6" name="Post for Compare Model Versions" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0xhbobd</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0t7zinj</bpmn:outgoing>
@@ -237,7 +221,7 @@ ddsi.preCompareModelVersions(execution)]]></bpmn:script>
<bpmn:outgoing>SequenceFlow_0zmd4rt</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_1n8h3zt</bpmn:outgoing>
</bpmn:exclusiveGateway>
- <bpmn:sequenceFlow id="SequenceFlow_0az1n4y" sourceRef="ScriptTask_1s09c7d" targetRef="CallActivity_1vejucv" />
+ <bpmn:sequenceFlow id="SequenceFlow_0az1n4y" sourceRef="ScriptTask_1s09c7d" targetRef="ScriptTask_0cx1y0g" />
<bpmn:intermediateCatchEvent id="IntermediateCatchEvent_0m01dm3" name="StartDoUpdate">
<bpmn:outgoing>SequenceFlow_04qwbbf</bpmn:outgoing>
<bpmn:linkEventDefinition name="StartDoUpdate" />
@@ -354,7 +338,7 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1s09c7d_di" bpmnElement="ScriptTask_1s09c7d">
- <dc:Bounds x="105" y="158" width="100" height="80" />
+ <dc:Bounds x="147" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0ttvn8r_di" bpmnElement="ScriptTask_0ttvn8r">
<dc:Bounds x="782" y="585" width="100" height="80" />
@@ -382,9 +366,9 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0s2spoq_di" bpmnElement="SequenceFlow_0s2spoq">
<di:waypoint xsi:type="dc:Point" x="30" y="198" />
- <di:waypoint xsi:type="dc:Point" x="105" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="147" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="22.5" y="177" width="90" height="12" />
+ <dc:Bounds x="43.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0klbpxx_di" bpmnElement="SequenceFlow_0klbpxx">
@@ -500,40 +484,30 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
<dc:Bounds x="875" y="991" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1vejucv_di" bpmnElement="CallActivity_1vejucv">
- <dc:Bounds x="274" y="158" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0cx1y0g_di" bpmnElement="ScriptTask_0cx1y0g">
- <dc:Bounds x="451" y="158" width="100" height="80" />
+ <dc:Bounds x="364" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1bd4711_di" bpmnElement="SequenceFlow_1bd4711">
- <di:waypoint xsi:type="dc:Point" x="374" y="198" />
- <di:waypoint xsi:type="dc:Point" x="451" y="198" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="367.5" y="177" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_11y3uq6_di" bpmnElement="ScriptTask_11y3uq6">
<dc:Bounds x="959" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0hixtxc_di" bpmnElement="ScriptTask_0hixtxc">
- <dc:Bounds x="614" y="158" width="100" height="80" />
+ <dc:Bounds x="563" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_1rkoyc5_di" bpmnElement="CallActivity_1rkoyc5">
<dc:Bounds x="782" y="158" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_03i6zhx_di" bpmnElement="SequenceFlow_03i6zhx">
- <di:waypoint xsi:type="dc:Point" x="551" y="198" />
- <di:waypoint xsi:type="dc:Point" x="614" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="464" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="563" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="537.5" y="177" width="90" height="12" />
+ <dc:Bounds x="468.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1pdv4qj_di" bpmnElement="SequenceFlow_1pdv4qj">
- <di:waypoint xsi:type="dc:Point" x="714" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="663" y="198" />
<di:waypoint xsi:type="dc:Point" x="782" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="703" y="177" width="90" height="12" />
+ <dc:Bounds x="677.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0xhbobd_di" bpmnElement="SequenceFlow_0xhbobd">
@@ -550,10 +524,10 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0az1n4y_di" bpmnElement="SequenceFlow_0az1n4y">
- <di:waypoint xsi:type="dc:Point" x="205" y="198" />
- <di:waypoint xsi:type="dc:Point" x="274" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="247" y="198" />
+ <di:waypoint xsi:type="dc:Point" x="364" y="198" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="239.5" y="177" width="0" height="12" />
+ <dc:Bounds x="260.5" y="177" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateCatchEvent_0m01dm3_di" bpmnElement="IntermediateCatchEvent_0m01dm3">
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn
index c04c2d97ea..73d3687bfa 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn
@@ -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.11.3" 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.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="DoCompareModelofE2EServiceInstance" name="DoCompareModelofE2EServiceInstance" isExecutable="true">
<bpmn2:sequenceFlow id="SequenceFlow_1rebkae" sourceRef="StartEvent_0jhv664" targetRef="CallActivity_1va14ul" />
<bpmn2:intermediateCatchEvent id="StartEvent_0jhv664" name="StartCompare">
@@ -70,30 +70,14 @@ def dcsi = new DoCompareModelofE2EServiceInstance()
dcsi.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:callActivity id="CallActivity_1a3n88w" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn2:extensionElements>
+ <bpmn2:scriptTask id="ScriptTask_18k4xnm" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1xzphe4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0b6eqin</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:scriptTask id="ScriptTask_18k4xnm" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_0b6eqin</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1cpg3ku</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DoCompareModelofE2EServiceInstance()
-dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
+dcsi.getServiceInstance(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1xzphe4" name="" sourceRef="ScriptTask_0ba0el1" targetRef="CallActivity_1a3n88w" />
- <bpmn2:sequenceFlow id="SequenceFlow_0b6eqin" sourceRef="CallActivity_1a3n88w" targetRef="ScriptTask_18k4xnm" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1xzphe4" name="" sourceRef="ScriptTask_0ba0el1" targetRef="ScriptTask_18k4xnm" />
<bpmn2:sequenceFlow id="SequenceFlow_1cpg3ku" sourceRef="ScriptTask_18k4xnm" targetRef="IntermediateThrowEvent_1dhdmdy" />
</bpmn2:process>
<bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
@@ -102,9 +86,9 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCompareModelofE2EServiceInstance">
<bpmndi:BPMNEdge id="SequenceFlow_1rebkae_di" bpmnElement="SequenceFlow_1rebkae">
<di:waypoint xsi:type="dc:Point" x="6" y="259" />
- <di:waypoint xsi:type="dc:Point" x="363" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="211" y="259" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="139.5" y="238" width="90" height="12" />
+ <dc:Bounds x="63.5" y="238" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateCatchEvent_05z1jyy_di" bpmnElement="StartEvent_0jhv664">
@@ -114,16 +98,16 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_0x8im5g_di" bpmnElement="EndEvent_0x8im5g">
- <dc:Bounds x="1038" y="241" width="36" height="36" />
+ <dc:Bounds x="912" y="241" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1011" y="281" width="90" height="12" />
+ <dc:Bounds x="885" y="281" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1lkpfe2_di" bpmnElement="SequenceFlow_1lkpfe2">
- <di:waypoint xsi:type="dc:Point" x="801" y="259" />
- <di:waypoint xsi:type="dc:Point" x="1038" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="607" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="912" y="259" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="874.5" y="238" width="90" height="12" />
+ <dc:Bounds x="714.5" y="238" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_0roysbg_di" bpmnElement="SubProcess_0roysbg" isExpanded="true">
@@ -165,9 +149,9 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1dhdmdy_di" bpmnElement="IntermediateThrowEvent_1dhdmdy">
- <dc:Bounds x="1048" y="83" width="36" height="36" />
+ <dc:Bounds x="853" y="83" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1023" y="123" width="88" height="36" />
+ <dc:Bounds x="838" y="123" width="68" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1chfao3_di" bpmnElement="SequenceFlow_1chfao3">
@@ -178,48 +162,36 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_1va14ul_di" bpmnElement="CallActivity_1va14ul">
- <dc:Bounds x="363" y="219" width="100" height="80" />
+ <dc:Bounds x="211" y="219" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1odhh8p_di" bpmnElement="ScriptTask_1odhh8p">
- <dc:Bounds x="701" y="219" width="100" height="80" />
+ <dc:Bounds x="507" y="219" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1pe6r93_di" bpmnElement="SequenceFlow_1pe6r93">
- <di:waypoint xsi:type="dc:Point" x="463" y="259" />
- <di:waypoint xsi:type="dc:Point" x="701" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="259" />
+ <di:waypoint xsi:type="dc:Point" x="507" y="259" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="537" y="238" width="90" height="12" />
+ <dc:Bounds x="364" y="238" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0ba0el1_di" bpmnElement="ScriptTask_0ba0el1">
<dc:Bounds x="211" y="61" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_1a3n88w_di" bpmnElement="CallActivity_1a3n88w">
- <dc:Bounds x="499" y="59" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_18k4xnm_di" bpmnElement="ScriptTask_18k4xnm">
- <dc:Bounds x="776" y="61" width="100" height="80" />
+ <dc:Bounds x="507" y="61" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1xzphe4_di" bpmnElement="SequenceFlow_1xzphe4">
- <di:waypoint xsi:type="dc:Point" x="311" y="101" />
- <di:waypoint xsi:type="dc:Point" x="499" y="99" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="360" y="85" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0b6eqin_di" bpmnElement="SequenceFlow_0b6eqin">
- <di:waypoint xsi:type="dc:Point" x="599" y="99" />
- <di:waypoint xsi:type="dc:Point" x="776" y="101" />
+ <di:waypoint xsi:type="dc:Point" x="311" y="102" />
+ <di:waypoint xsi:type="dc:Point" x="507" y="101" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="643.5" y="79" width="0" height="12" />
+ <dc:Bounds x="364" y="80.5" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1cpg3ku_di" bpmnElement="SequenceFlow_1cpg3ku">
- <di:waypoint xsi:type="dc:Point" x="876" y="101" />
- <di:waypoint xsi:type="dc:Point" x="968" y="101" />
- <di:waypoint xsi:type="dc:Point" x="968" y="101" />
- <di:waypoint xsi:type="dc:Point" x="1048" y="101" />
+ <di:waypoint xsi:type="dc:Point" x="607" y="101" />
+ <di:waypoint xsi:type="dc:Point" x="853" y="101" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="983" y="95" width="0" height="12" />
+ <dc:Bounds x="685" y="80" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn
index d7bd54cc4e..6f1609c566 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceBRG.bpmn
@@ -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="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.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="_DkzPAHB4EeaJwpcpVN5gXw" 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:process id="DoCreateAllottedResourceBRG" name="DoCreateAllottedResourceBRG" isExecutable="true">
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -13,49 +13,16 @@ DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
dcar.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="GetAAIServiceInstance" />
- <bpmn2:scriptTask id="buildWorkflowException" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 404, "Input Service Instance Id Not Found in AAI")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="buildWorkflowException" targetRef="EndEvent_1" />
- <bpmn2:callActivity id="GetAAIServiceInstance" name="Get AAI Service Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:out source="GENGS_FoundIndicator" target="CSI_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="CSI_SuccessIndicator" />
- <camunda:out source="GENGS_serviceInstance" target="CSI_serviceInstance" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_resourceLink" target="CSI_resourceLink" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_service" target="CSI_service" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="GetAAIServiceInstance" targetRef="ServiceInstanceExists" />
- <bpmn2:exclusiveGateway id="ServiceInstanceExists" name="Service Instance Exists in AAI?" default="notFound">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- <bpmn2:outgoing>found</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="ServiceInstanceExists" targetRef="buildWorkflowException" />
<bpmn2:scriptTask id="GetAAIAR" name="Get AAI AR" scriptFormat="groovy">
- <bpmn2:incoming>found</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1a2mcyk</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0gbsa12</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
dcar.getAaiAR(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
- </bpmn2:endEvent>
<bpmn2:scriptTask id="CreateAAIAR" name="Create AAI AR&#10;" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_17p4ohs</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1vg5rfa</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
@@ -181,45 +148,7 @@ dcar.validateSDNCResp(execution, response, "activate" )]]></bpmn2:script>
</bpmn2:callActivity>
<bpmn2:sequenceFlow id="SequenceFlow_1iy3cqb" sourceRef="postProcessSDNCGetResponse" targetRef="generateOutputs" />
<bpmn2:sequenceFlow id="SequenceFlow_1dgzhsm" sourceRef="UpdateAAIARActive" targetRef="IntermediateCatchEvent_1f4tse6" />
- <bpmn2:callActivity id="GetAAIParentSI" name="Get AAI Parent ServiceInstance&#10;" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="parentServiceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_SuccessIndicator" target="PSI_SuccessIndicator" />
- <camunda:out source="GENGS_FoundIndicator" target="PSI_FoundIndicator" />
- <camunda:out source="GENGS_serviceInstance" target="PSI_serviceInstance" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_resourceLink" target="PSI_resourceLink" />
- <camunda:out source="GENGS_service" target="PSI_service" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1m8u8dl</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1vg5rfa</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_1vg5rfa" sourceRef="GetAAIParentSI" targetRef="ParentSIExists" />
- <bpmn2:exclusiveGateway id="ParentSIExists" name="Parent Service Instance Exists in AAI?" default="SequenceFlow_0f7u5pu">
- <bpmn2:incoming>SequenceFlow_1vg5rfa</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_17p4ohs</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_0f7u5pu</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_17p4ohs" name="Yes" sourceRef="ParentSIExists" targetRef="CreateAAIAR">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("PSI_FoundIndicator" ) == true && execution.getVariable("PSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="ScriptTask_1hzsbck" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_0f7u5pu</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_16o7col</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 404, "BRG alloted resource Parent ServiceInstance:" +
-execution.getVariable("parentServiceInstanceId") +
- " was not found in AAI")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:endEvent id="EndEvent_0x4moh8">
- <bpmn2:incoming>SequenceFlow_16o7col</bpmn2:incoming>
- <bpmn2:errorEventDefinition errorRef="Error_2" />
- </bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_0f7u5pu" name="No" sourceRef="ParentSIExists" targetRef="ScriptTask_1hzsbck" />
- <bpmn2:sequenceFlow id="SequenceFlow_16o7col" sourceRef="ScriptTask_1hzsbck" targetRef="EndEvent_0x4moh8" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1vg5rfa" sourceRef="GetAAIParentSI" targetRef="CreateAAIAR" />
<bpmn2:subProcess id="SubProcess_161pl4g" name="Sub-process for Application Errors" triggeredByEvent="true">
<bpmn2:startEvent id="StartEvent_1ibe7qx">
<bpmn2:outgoing>SequenceFlow_1h61pqs</bpmn2:outgoing>
@@ -314,9 +243,6 @@ dcar.validateSDNCResp(execution, response, "get" )]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
<bpmn2:linkEventDefinition name="SDNCTasks" />
</bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="found" name="Yes" sourceRef="ServiceInstanceExists" targetRef="GetAAIAR">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CSI_FoundIndicator" ) == true && execution.getVariable("CSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_0gbsa12" sourceRef="GetAAIAR" targetRef="ActiveARinAAI" />
<bpmn2:scriptTask id="generateOutputs" name="Generate Outputs" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1iy3cqb</bpmn2:incoming>
@@ -334,6 +260,22 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmn2:timerEventDefinition>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="SequenceFlow_0ec9eiq" sourceRef="IntermediateCatchEvent_1f4tse6" targetRef="PreProcessSDNCGet" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1a2mcyk" sourceRef="GetAAIServiceInstance" targetRef="GetAAIAR" />
+ <bpmn2:scriptTask id="GetAAIServiceInstance" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1a2mcyk</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.getServiceInstance(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="GetAAIParentSI" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1m8u8dl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1vg5rfa</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.getParentServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
</bpmn2:process>
<bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
<bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
@@ -357,57 +299,16 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_285">
<di:waypoint xsi:type="dc:Point" x="119" y="239" />
- <di:waypoint xsi:type="dc:Point" x="195" y="239" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="157" y="224" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_59" bpmnElement="GetAAIServiceInstance">
- <dc:Bounds x="195" y="199" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_229" bpmnElement="ServiceInstanceExists" isMarkerVisible="true">
- <dc:Bounds x="367" y="217" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="349" y="270" width="83" height="25" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_CallActivity_59" targetElement="_BPMNShape_ExclusiveGateway_229">
- <di:waypoint xsi:type="dc:Point" x="295" y="239" />
- <di:waypoint xsi:type="dc:Point" x="369" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="332" y="224.5" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="buildWorkflowException">
- <dc:Bounds x="342" y="85" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_ScriptTask_293">
- <di:waypoint xsi:type="dc:Point" x="392" y="217" />
- <di:waypoint xsi:type="dc:Point" x="392" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="241" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="371" y="192.6917250252067" width="14" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">
- <dc:Bounds x="374" y="-11" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="392" y="30" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_293" targetElement="_BPMNShape_EndEvent_225">
- <di:waypoint xsi:type="dc:Point" x="392" y="85" />
- <di:waypoint xsi:type="dc:Point" x="392" y="58" />
- <di:waypoint xsi:type="dc:Point" x="392" y="58" />
- <di:waypoint xsi:type="dc:Point" x="392" y="25" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="407" y="58" width="0" height="0" />
+ <dc:Bounds x="135" y="224.5" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="GetAAIAR">
<dc:Bounds x="506" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="CreateAAIAR">
- <dc:Bounds x="1206" y="200" width="100" height="80" />
+ <dc:Bounds x="1086" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
<dc:Bounds x="1527" y="776" width="36" height="36" />
@@ -416,11 +317,10 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_300">
- <di:waypoint xsi:type="dc:Point" x="1306" y="240" />
- <di:waypoint xsi:type="dc:Point" x="1338" y="240" />
- <di:waypoint xsi:type="dc:Point" x="1408" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1186" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1311" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1322" y="225" width="0" height="0" />
+ <dc:Bounds x="1203.5" y="225" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1q6udwm_di" bpmnElement="SequenceFlow_1q6udwm">
@@ -545,51 +445,12 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<dc:Bounds x="934" y="593.5" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_0e73um9_di" bpmnElement="GetAAIParentSI">
- <dc:Bounds x="843" y="199" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1vg5rfa_di" bpmnElement="SequenceFlow_1vg5rfa">
<di:waypoint xsi:type="dc:Point" x="943" y="239" />
- <di:waypoint xsi:type="dc:Point" x="1033" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="988" y="224.5" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_1q51t9m_di" bpmnElement="ParentSIExists" isMarkerVisible="true">
- <dc:Bounds x="1033" y="215" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1012" y="265" width="92" height="36" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_17p4ohs_di" bpmnElement="SequenceFlow_17p4ohs">
- <di:waypoint xsi:type="dc:Point" x="1083" y="240" />
- <di:waypoint xsi:type="dc:Point" x="1206" y="241" />
+ <di:waypoint xsi:type="dc:Point" x="1058" y="241" />
+ <di:waypoint xsi:type="dc:Point" x="1086" y="241" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1127" y="222" width="19" height="14" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1hzsbck_di" bpmnElement="ScriptTask_1hzsbck">
- <dc:Bounds x="1008" y="77" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_0x4moh8_di" bpmnElement="EndEvent_0x4moh8">
- <dc:Bounds x="1040" y="6" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1058" y="47" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0f7u5pu_di" bpmnElement="SequenceFlow_0f7u5pu">
- <di:waypoint xsi:type="dc:Point" x="1058" y="215" />
- <di:waypoint xsi:type="dc:Point" x="1058" y="186" />
- <di:waypoint xsi:type="dc:Point" x="1058" y="157" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1034" y="173.413457125764" width="14" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_16o7col_di" bpmnElement="SequenceFlow_16o7col">
- <di:waypoint xsi:type="dc:Point" x="1059" y="77" />
- <di:waypoint xsi:type="dc:Point" x="1059" y="42" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1074" y="59.5" width="0" height="0" />
+ <dc:Bounds x="955.5" y="225" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_161pl4g_di" bpmnElement="SubProcess_161pl4g" isExpanded="true">
@@ -672,7 +533,7 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<di:waypoint xsi:type="dc:Point" x="750" y="240" />
<di:waypoint xsi:type="dc:Point" x="843" y="239" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="777" y="224" width="14" height="14" />
+ <dc:Bounds x="777" y="223.99999999999994" width="14" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0z8luou_di" bpmnElement="SequenceFlow_0z8luou">
@@ -698,18 +559,11 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_0sb45m9_di" bpmnElement="IntermediateThrowEvent_1lqaeh8">
- <dc:Bounds x="1408" y="222" width="36" height="36" />
+ <dc:Bounds x="1311" y="222" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1456" y="234" width="76" height="12" />
+ <dc:Bounds x="1359" y="234" width="77" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="found" sourceElement="_BPMNShape_ExclusiveGateway_229">
- <di:waypoint xsi:type="dc:Point" x="416" y="241" />
- <di:waypoint xsi:type="dc:Point" x="506" y="242" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="432" y="220.27119611047112" width="17" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0gbsa12_di" bpmnElement="SequenceFlow_0gbsa12">
<di:waypoint xsi:type="dc:Point" x="606" y="240" />
<di:waypoint xsi:type="dc:Point" x="700" y="240" />
@@ -750,6 +604,19 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<dc:Bounds x="1061" y="524" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1a2mcyk_di" bpmnElement="SequenceFlow_1a2mcyk">
+ <di:waypoint xsi:type="dc:Point" x="341" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="506" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="423.5" y="219" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0m6hxaw_di" bpmnElement="GetAAIServiceInstance">
+ <dc:Bounds x="241" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0m8m8j1_di" bpmnElement="GetAAIParentSI">
+ <dc:Bounds x="843" y="199" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn
index f26bae0b39..3deaae4e0d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateAllottedResourceTXC.bpmn
@@ -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="_DkzPAHB4EeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.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="_DkzPAHB4EeaJwpcpVN5gXw" 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:process id="DoCreateAllottedResourceTXC" name="DoCreateAllottedResourceTXC" isExecutable="true">
<bpmn2:startEvent id="StartEvent_1">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -12,50 +12,17 @@
DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
dcar.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="GetAAIServiceInstance" />
- <bpmn2:scriptTask id="buildWorkflowException" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 404, "Input Service Instance Id Not Found in AAI")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="buildWorkflowException" targetRef="EndEvent_1" />
- <bpmn2:callActivity id="GetAAIServiceInstance" name="Get AAI Service Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:out source="GENGS_FoundIndicator" target="CSI_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="CSI_SuccessIndicator" />
- <camunda:out source="GENGS_serviceInstance" target="CSI_serviceInstance" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_resourceLink" target="CSI_resourceLink" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_service" target="CSI_service" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="GetAAIServiceInstance" targetRef="ServiceInstanceExists" />
- <bpmn2:exclusiveGateway id="ServiceInstanceExists" name="Service Instance Exists in AAI?" default="notFound">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- <bpmn2:outgoing>found</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="ServiceInstanceExists" targetRef="buildWorkflowException" />
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="ScriptTask_0n6wvp0" />
<bpmn2:scriptTask id="GetAAIAR" name="Get AAI AR" scriptFormat="groovy">
- <bpmn2:incoming>found</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_01zb7a0</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0gbsa12</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
dcar.getAaiAR(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
- </bpmn2:endEvent>
<bpmn2:scriptTask id="CreateAAIAR" name="Create AAI AR&#10;" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_17p4ohs</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0vrw9a9</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
DoCreateAllottedResourceTXC dcar = new DoCreateAllottedResourceTXC()
@@ -180,45 +147,6 @@ dcar.validateSDNCResp(execution, response, "activate" )]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_0q1hz2p</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:sequenceFlow id="SequenceFlow_1iy3cqb" sourceRef="postProcessSDNCGetResponse" targetRef="generateOutputs" />
- <bpmn2:callActivity id="GetAAIParentSI" name="Get AAI Parent ServiceInstance&#10;" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="parentServiceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_SuccessIndicator" target="PSI_SuccessIndicator" />
- <camunda:out source="GENGS_FoundIndicator" target="PSI_FoundIndicator" />
- <camunda:out source="GENGS_serviceInstance" target="PSI_serviceInstance" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_resourceLink" target="PSI_resourceLink" />
- <camunda:out source="GENGS_service" target="PSI_service" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1m8u8dl</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1vg5rfa</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_1vg5rfa" sourceRef="GetAAIParentSI" targetRef="ParentSIExists" />
- <bpmn2:exclusiveGateway id="ParentSIExists" name="Parent Service Instance Exists in AAI?" default="SequenceFlow_0f7u5pu">
- <bpmn2:incoming>SequenceFlow_1vg5rfa</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_17p4ohs</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_0f7u5pu</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_17p4ohs" name="Yes" sourceRef="ParentSIExists" targetRef="CreateAAIAR">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("PSI_FoundIndicator" ) == true && execution.getVariable("PSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="ScriptTask_1hzsbck" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_0f7u5pu</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_16o7col</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 404, "TunnelXConn alloted resource Parent ServiceInstance:" +
-execution.getVariable("parentServiceInstanceId") +
- " was not found in AAI")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:endEvent id="EndEvent_0x4moh8">
- <bpmn2:incoming>SequenceFlow_16o7col</bpmn2:incoming>
- <bpmn2:errorEventDefinition errorRef="Error_2" />
- </bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_0f7u5pu" name="No" sourceRef="ParentSIExists" targetRef="ScriptTask_1hzsbck" />
- <bpmn2:sequenceFlow id="SequenceFlow_16o7col" sourceRef="ScriptTask_1hzsbck" targetRef="EndEvent_0x4moh8" />
<bpmn2:subProcess id="SubProcess_161pl4g" name="Sub-process for Application Errors" triggeredByEvent="true">
<bpmn2:startEvent id="StartEvent_1ibe7qx">
<bpmn2:outgoing>SequenceFlow_1h61pqs</bpmn2:outgoing>
@@ -300,7 +228,7 @@ dcar.validateSDNCResp(execution, response, "get" )]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_1m8u8dl</bpmn2:outgoing>
<bpmn2:outgoing>SequenceFlow_0z8luou</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_1m8u8dl" name="No" sourceRef="ActiveARinAAI" targetRef="GetAAIParentSI" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1m8u8dl" name="No" sourceRef="ActiveARinAAI" targetRef="ScriptTask_10d76y6" />
<bpmn2:sequenceFlow id="SequenceFlow_0z8luou" name="yes" sourceRef="ActiveARinAAI" targetRef="PreProcessSDNCGet">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("foundActiveAR" ) == true}]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
@@ -313,9 +241,6 @@ dcar.validateSDNCResp(execution, response, "get" )]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
<bpmn2:linkEventDefinition name="SDNCTasks" />
</bpmn2:intermediateThrowEvent>
- <bpmn2:sequenceFlow id="found" name="Yes" sourceRef="ServiceInstanceExists" targetRef="GetAAIAR">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CSI_FoundIndicator" ) == true && execution.getVariable("CSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_0gbsa12" sourceRef="GetAAIAR" targetRef="ActiveARinAAI" />
<bpmn2:scriptTask id="generateOutputs" name="Generate Outputs" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1iy3cqb</bpmn2:incoming>
@@ -334,6 +259,23 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmn2:timerEventDefinition>
</bpmn2:intermediateCatchEvent>
<bpmn2:sequenceFlow id="SequenceFlow_08hhqb2" sourceRef="IntermediateThrowEvent_0ti2fv8" targetRef="PreProcessSDNCGet" />
+ <bpmn2:scriptTask id="ScriptTask_0n6wvp0" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_01zb7a0</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.getServiceInstance(execution)
+]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="ScriptTask_10d76y6" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_1m8u8dl</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vrw9a9</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.vcpe.scripts.*
+DoCreateAllottedResourceBRG dcar = new DoCreateAllottedResourceBRG()
+dcar.getParentServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_01zb7a0" sourceRef="ScriptTask_0n6wvp0" targetRef="GetAAIAR" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0vrw9a9" sourceRef="ScriptTask_10d76y6" targetRef="CreateAAIAR" />
</bpmn2:process>
<bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
<bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
@@ -357,57 +299,16 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_285">
<di:waypoint xsi:type="dc:Point" x="119" y="239" />
- <di:waypoint xsi:type="dc:Point" x="195" y="239" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="157" y="224" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_59" bpmnElement="GetAAIServiceInstance">
- <dc:Bounds x="195" y="199" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_229" bpmnElement="ServiceInstanceExists" isMarkerVisible="true">
- <dc:Bounds x="367" y="217" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="349" y="270" width="83" height="25" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_CallActivity_59" targetElement="_BPMNShape_ExclusiveGateway_229">
- <di:waypoint xsi:type="dc:Point" x="295" y="239" />
- <di:waypoint xsi:type="dc:Point" x="369" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="332" y="224.5" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="buildWorkflowException">
- <dc:Bounds x="342" y="85" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_ScriptTask_293">
- <di:waypoint xsi:type="dc:Point" x="392" y="217" />
- <di:waypoint xsi:type="dc:Point" x="392" y="165" />
+ <di:waypoint xsi:type="dc:Point" x="261" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="371" y="192.6917250252067" width="14" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">
- <dc:Bounds x="374" y="-11" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="392" y="30" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_293" targetElement="_BPMNShape_EndEvent_225">
- <di:waypoint xsi:type="dc:Point" x="392" y="85" />
- <di:waypoint xsi:type="dc:Point" x="392" y="58" />
- <di:waypoint xsi:type="dc:Point" x="392" y="58" />
- <di:waypoint xsi:type="dc:Point" x="392" y="25" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="407" y="58" width="0" height="0" />
+ <dc:Bounds x="145" y="224.5" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_299" bpmnElement="GetAAIAR">
- <dc:Bounds x="506" y="200" width="100" height="80" />
+ <dc:Bounds x="478" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_300" bpmnElement="CreateAAIAR">
- <dc:Bounds x="1206" y="200" width="100" height="80" />
+ <dc:Bounds x="1099" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_228" bpmnElement="EndEvent_3">
<dc:Bounds x="1527" y="776" width="36" height="36" />
@@ -416,11 +317,10 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_300">
- <di:waypoint xsi:type="dc:Point" x="1306" y="240" />
- <di:waypoint xsi:type="dc:Point" x="1338" y="240" />
- <di:waypoint xsi:type="dc:Point" x="1408" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1199" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1309" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1322" y="225" width="0" height="0" />
+ <dc:Bounds x="1209" y="225" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1q6udwm_di" bpmnElement="SequenceFlow_1q6udwm">
@@ -538,53 +438,6 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<dc:Bounds x="1277" y="779" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_0e73um9_di" bpmnElement="GetAAIParentSI">
- <dc:Bounds x="843" y="199" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1vg5rfa_di" bpmnElement="SequenceFlow_1vg5rfa">
- <di:waypoint xsi:type="dc:Point" x="943" y="239" />
- <di:waypoint xsi:type="dc:Point" x="1033" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="988" y="224.5" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_1q51t9m_di" bpmnElement="ParentSIExists" isMarkerVisible="true">
- <dc:Bounds x="1033" y="215" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1012" y="265" width="92" height="36" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_17p4ohs_di" bpmnElement="SequenceFlow_17p4ohs">
- <di:waypoint xsi:type="dc:Point" x="1083" y="240" />
- <di:waypoint xsi:type="dc:Point" x="1206" y="241" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1127" y="222" width="19" height="14" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1hzsbck_di" bpmnElement="ScriptTask_1hzsbck">
- <dc:Bounds x="1008" y="77" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="EndEvent_0x4moh8_di" bpmnElement="EndEvent_0x4moh8">
- <dc:Bounds x="1040" y="6" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1058" y="47" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0f7u5pu_di" bpmnElement="SequenceFlow_0f7u5pu">
- <di:waypoint xsi:type="dc:Point" x="1058" y="215" />
- <di:waypoint xsi:type="dc:Point" x="1058" y="186" />
- <di:waypoint xsi:type="dc:Point" x="1058" y="157" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1034" y="173.413457125764" width="14" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_16o7col_di" bpmnElement="SequenceFlow_16o7col">
- <di:waypoint xsi:type="dc:Point" x="1059" y="77" />
- <di:waypoint xsi:type="dc:Point" x="1059" y="42" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1074" y="59.5" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_161pl4g_di" bpmnElement="SubProcess_161pl4g" isExpanded="true">
<dc:Bounds x="53" y="910" width="783" height="195" />
</bpmndi:BPMNShape>
@@ -663,9 +516,9 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1m8u8dl_di" bpmnElement="SequenceFlow_1m8u8dl">
<di:waypoint xsi:type="dc:Point" x="750" y="240" />
- <di:waypoint xsi:type="dc:Point" x="843" y="239" />
+ <di:waypoint xsi:type="dc:Point" x="893" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="777" y="224" width="14" height="14" />
+ <dc:Bounds x="795.4388439306359" y="224.36614831617715" width="14" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0z8luou_di" bpmnElement="SequenceFlow_0z8luou">
@@ -691,23 +544,16 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_0sb45m9_di" bpmnElement="IntermediateThrowEvent_1lqaeh8">
- <dc:Bounds x="1408" y="222" width="36" height="36" />
+ <dc:Bounds x="1309" y="222" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1456" y="234" width="76" height="12" />
+ <dc:Bounds x="1357" y="234" width="77" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="found" sourceElement="_BPMNShape_ExclusiveGateway_229">
- <di:waypoint xsi:type="dc:Point" x="416" y="241" />
- <di:waypoint xsi:type="dc:Point" x="506" y="242" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="432" y="220.27119611047112" width="17" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0gbsa12_di" bpmnElement="SequenceFlow_0gbsa12">
- <di:waypoint xsi:type="dc:Point" x="606" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="578" y="240" />
<di:waypoint xsi:type="dc:Point" x="700" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="653" y="225" width="0" height="0" />
+ <dc:Bounds x="594" y="225" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0pjzuns_di" bpmnElement="generateOutputs">
@@ -750,6 +596,26 @@ dcar.generateOutputs(execution)]]></bpmn2:script>
<dc:Bounds x="1061" y="524" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0n6wvp0_di" bpmnElement="ScriptTask_0n6wvp0">
+ <dc:Bounds x="261" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_10d76y6_di" bpmnElement="ScriptTask_10d76y6">
+ <dc:Bounds x="893" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_01zb7a0_di" bpmnElement="SequenceFlow_01zb7a0">
+ <di:waypoint xsi:type="dc:Point" x="361" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="478" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="419.5" y="219" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vrw9a9_di" bpmnElement="SequenceFlow_0vrw9a9">
+ <di:waypoint xsi:type="dc:Point" x="993" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="1099" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1046" y="219" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2ENetworkInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2ENetworkInstance.bpmn
index 07de3fc0b1..3fea7467c5 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2ENetworkInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2ENetworkInstance.bpmn
@@ -33,32 +33,17 @@ dcsi.postProcessSDNCAssign(execution)]]></bpmn:script>
<bpmn:endEvent id="EndEvent_0tpifgl">
<bpmn:incoming>SequenceFlow_0o6bjmn</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:callActivity id="CallActivity_11yzhx1" name="Call CustomE2EGetService2" calledElement="CustomE2EGetService">
- <bpmn:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="subscriptionServiceType" target="GENGS_serviceType" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- </bpmn:extensionElements>
+ <bpmn:scriptTask id="ScriptTask_0yz4lym" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0k06cqp</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1oql7zl</bpmn:outgoing>
- </bpmn:callActivity>
- <bpmn:scriptTask id="ScriptTask_0yz4lym" name="Post Process AAI GET2" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1oql7zl</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0o6bjmn</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DoCreateE2EServiceInstance()
-dcsi.postProcessAAIGET2(execution)]]></bpmn:script>
+dcsi.getServiceInstance(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_0s7w7gp" name="" sourceRef="ScriptTask_16gvaru" targetRef="CallActivity_0ao684p" />
<bpmn:sequenceFlow id="SequenceFlow_1wtx8gj" name="" sourceRef="CallActivity_0ao684p" targetRef="ScriptTask_0dp0qqq" />
- <bpmn:sequenceFlow id="SequenceFlow_0k06cqp" name="" sourceRef="ScriptTask_0dp0qqq" targetRef="CallActivity_11yzhx1" />
+ <bpmn:sequenceFlow id="SequenceFlow_0k06cqp" name="" sourceRef="ScriptTask_0dp0qqq" targetRef="ScriptTask_0yz4lym" />
<bpmn:sequenceFlow id="SequenceFlow_0o6bjmn" sourceRef="ScriptTask_0yz4lym" targetRef="EndEvent_0tpifgl" />
- <bpmn:sequenceFlow id="SequenceFlow_1oql7zl" sourceRef="CallActivity_11yzhx1" targetRef="ScriptTask_0yz4lym" />
<bpmn:sequenceFlow id="SequenceFlow_1gomb9n" sourceRef="StartEvent_1" targetRef="ScriptTask_16gvaru" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
@@ -81,9 +66,6 @@ dcsi.postProcessAAIGET2(execution)]]></bpmn:script>
<dc:Bounds x="1405" y="143" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_11yzhx1_di" bpmnElement="CallActivity_11yzhx1">
- <dc:Bounds x="983" y="80" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0yz4lym_di" bpmnElement="ScriptTask_0yz4lym">
<dc:Bounds x="1219" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -102,26 +84,17 @@ dcsi.postProcessAAIGET2(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0k06cqp_di" bpmnElement="SequenceFlow_0k06cqp">
- <di:waypoint xsi:type="dc:Point" x="854" y="120" />
- <di:waypoint xsi:type="dc:Point" x="891" y="120" />
- <di:waypoint xsi:type="dc:Point" x="983" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="854" y="119" />
+ <di:waypoint xsi:type="dc:Point" x="1219" y="116" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="872.5" y="99" width="0" height="12" />
+ <dc:Bounds x="991.5" y="96.5" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0o6bjmn_di" bpmnElement="SequenceFlow_0o6bjmn">
<di:waypoint xsi:type="dc:Point" x="1319" y="120" />
<di:waypoint xsi:type="dc:Point" x="1432" y="120" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1375.5" y="99" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1oql7zl_di" bpmnElement="SequenceFlow_1oql7zl">
- <di:waypoint xsi:type="dc:Point" x="1083" y="115" />
- <di:waypoint xsi:type="dc:Point" x="1151" y="115" />
- <di:waypoint xsi:type="dc:Point" x="1219" y="115" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1117" y="94" width="0" height="12" />
+ <dc:Bounds x="1331" y="99" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1gomb9n_di" bpmnElement="SequenceFlow_1gomb9n">
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
index a5fadcf14b..eeaa5e451a 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
@@ -12,21 +12,6 @@ def dcsi = new DoCreateE2EServiceInstance()
dcsi.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="CustomE2EGetService" targetRef="ScriptTask_0i8cqdy" />
- <bpmn2:callActivity id="CustomE2EGetService" name="Call Custom E2E Get Service" calledElement="CustomE2EGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceName" target="GENGS_serviceInstanceName" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <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>
- </bpmn2:callActivity>
<bpmn2:callActivity id="CustomE2EPutService" name="Call Custom E2E Put Service" calledElement="CustomE2EPutService">
<bpmn2:extensionElements>
<camunda:in source="globalSubscriberId" target="GENPS_globalSubscriberId" />
@@ -38,7 +23,7 @@ dcsi.preProcessRequest(execution)
<camunda:in source="msoRequestId" target="GENPS_requesId" />
<camunda:out source="WorkflowException" target="WorkflowException" />
</bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1w01tqs</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1i7t9hq</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_129ih1g</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:sequenceFlow id="SequenceFlow_129ih1g" sourceRef="CustomE2EPutService" targetRef="ScriptTask_0q37vn9" />
@@ -82,14 +67,6 @@ dcsi.postProcessRollback(execution)
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_1xzgv5k" sourceRef="ScriptTask_1p0vyip" targetRef="EndEvent_117lkk3" />
</bpmn2:subProcess>
- <bpmn2:scriptTask id="ScriptTask_0i8cqdy" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1w01tqs</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoCreateE2EServiceInstance()
-dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1w01tqs" sourceRef="ScriptTask_0i8cqdy" targetRef="CustomE2EPutService" />
<bpmn2:scriptTask id="ScriptTask_0q37vn9" name="Post Process AAI PUT" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_129ih1g</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1tkgqu3</bpmn2:outgoing>
@@ -179,7 +156,7 @@ dcsi.prepareDecomposeService(execution)]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_1i7t9hq</bpmn2:outgoing>
<bpmn2:linkEventDefinition name="StartService" />
</bpmn2:intermediateCatchEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1i7t9hq" sourceRef="IntermediateCatchEvent_0jrb3xu" targetRef="CustomE2EGetService" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1i7t9hq" sourceRef="IntermediateCatchEvent_0jrb3xu" targetRef="CustomE2EPutService" />
<bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_05dus9b" name="StartPrepareResource">
<bpmn2:outgoing>SequenceFlow_1hbesp9</bpmn2:outgoing>
<bpmn2:linkEventDefinition name="StartPrepareResource" />
@@ -258,18 +235,6 @@ dcsi.doServicePreOperation(execution)]]></bpmn2:script>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
<dc:Bounds x="126" y="-229" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4">
- <di:waypoint xsi:type="dc:Point" x="296" y="94" />
- <di:waypoint xsi:type="dc:Point" x="387" y="94" />
- <di:waypoint xsi:type="dc:Point" x="387" y="94" />
- <di:waypoint xsi:type="dc:Point" x="478" y="94" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="357" y="94" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="CustomE2EGetService">
- <dc:Bounds x="196" y="57" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0khp0qc_di" bpmnElement="CustomE2EPutService">
<dc:Bounds x="713" y="54" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -314,18 +279,6 @@ dcsi.doServicePreOperation(execution)]]></bpmn2:script>
<dc:Bounds x="152" y="945" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0i8cqdy_di" bpmnElement="ScriptTask_0i8cqdy">
- <dc:Bounds x="478" y="54" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1w01tqs_di" bpmnElement="SequenceFlow_1w01tqs">
- <di:waypoint xsi:type="dc:Point" x="578" y="94" />
- <di:waypoint xsi:type="dc:Point" x="646" y="94" />
- <di:waypoint xsi:type="dc:Point" x="646" y="94" />
- <di:waypoint xsi:type="dc:Point" x="713" y="94" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="616" y="94" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0q37vn9_di" bpmnElement="ScriptTask_0q37vn9">
<dc:Bounds x="1068" y="54" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -451,9 +404,12 @@ dcsi.doServicePreOperation(execution)]]></bpmn2:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1i7t9hq_di" bpmnElement="SequenceFlow_1i7t9hq">
<di:waypoint xsi:type="dc:Point" x="54" y="97" />
- <di:waypoint xsi:type="dc:Point" x="196" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="528" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="646" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="646" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="713" y="94" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="125" y="76" width="0" height="12" />
+ <dc:Bounds x="542" y="73" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateCatchEvent_05dus9b_di" bpmnElement="IntermediateCatchEvent_05dus9b">
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn
index 4c107c7cb4..77c62e573d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateE2EServiceInstanceV2.bpmn
@@ -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.11.3" 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.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="DoCreateE2EServiceInstanceV2" name="DoCreateE2EServiceInstanceV2" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -13,21 +13,7 @@ def dcsi = new DoCreateE2EServiceInstanceV2()
dcsi.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="CustomE2EGetService" targetRef="ScriptTask_0i8cqdy_PostProcessAAIGET" />
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="CustomE2EGetService" />
- <bpmn2:callActivity id="CustomE2EGetService" name="Call Custom E2E Get Service" calledElement="CustomE2EGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceName" target="GENGS_serviceInstanceName" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="IntermediateThrowEvent_0aggdcl_GoToStartService" />
<bpmn2:callActivity id="CustomE2EPutService" name="Call Custom E2E Put Service" calledElement="CustomE2EPutService">
<bpmn2:extensionElements>
<camunda:in source="globalSubscriberId" target="GENPS_globalSubscriberId" />
@@ -83,13 +69,6 @@ dcsi.postProcessRollback(execution)
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_1xzgv5k" sourceRef="ScriptTask_1p0vyip" targetRef="EndEvent_117lkk3" />
</bpmn2:subProcess>
- <bpmn2:scriptTask id="ScriptTask_0i8cqdy_PostProcessAAIGET" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_10aubhh</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoCreateE2EServiceInstanceV2()
-dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
<bpmn2:scriptTask id="ScriptTask_0q37vn9_PostProcessAAIPUT" name="Post Process AAI PUT" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_129ih1g</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_03fabby</bpmn2:outgoing>
@@ -225,9 +204,8 @@ def csi = new DoCreateE2EServiceInstanceV2()
csi.postOtherControllerType(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_0gxsqsa" sourceRef="Task_0zhvu4r_llllll" targetRef="ExclusiveGateway_0r4jkig" />
- <bpmn2:sequenceFlow id="SequenceFlow_10aubhh" sourceRef="ScriptTask_0i8cqdy_PostProcessAAIGET" targetRef="IntermediateThrowEvent_0aggdcl_GoToStartService" />
<bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0aggdcl_GoToStartService" name="GoTo StartService">
- <bpmn2:incoming>SequenceFlow_10aubhh</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
<bpmn2:linkEventDefinition name="StartService" />
</bpmn2:intermediateThrowEvent>
<bpmn2:intermediateCatchEvent id="StartEvent_0l5bz4h_StartService" name="StartService">
@@ -486,23 +464,13 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
<dc:Bounds x="59.5" y="82" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4">
- <di:waypoint xsi:type="dc:Point" x="664" y="97" />
- <di:waypoint xsi:type="dc:Point" x="917" y="97" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="745.5" y="82" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61" targetElement="CallActivity_1md4kyb_di">
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61" targetElement="IntermediateThrowEvent_1m5zb3d_di">
<di:waypoint xsi:type="dc:Point" x="287" y="97" />
- <di:waypoint xsi:type="dc:Point" x="564" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1239" y="97" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="380.5" y="82" width="90" height="0" />
+ <dc:Bounds x="718" y="82" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="CustomE2EGetService">
- <dc:Bounds x="564" y="57" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0khp0qc_di" bpmnElement="CustomE2EPutService">
<dc:Bounds x="564" y="244" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -545,9 +513,6 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
<dc:Bounds x="126" y="1831" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0i8cqdy_di" bpmnElement="ScriptTask_0i8cqdy_PostProcessAAIGET">
- <dc:Bounds x="917" y="57" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0q37vn9_di" bpmnElement="ScriptTask_0q37vn9_PostProcessAAIPUT">
<dc:Bounds x="917" y="244" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -752,13 +717,6 @@ ddsi.preUpdateServiceOperationStatus(execution)]]></bpmn2:script>
<dc:Bounds x="312.5" y="1193" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_10aubhh_di" bpmnElement="SequenceFlow_10aubhh">
- <di:waypoint xsi:type="dc:Point" x="1017" y="97" />
- <di:waypoint xsi:type="dc:Point" x="1239" y="97" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1128" y="76" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1m5zb3d_di" bpmnElement="IntermediateThrowEvent_0aggdcl_GoToStartService">
<dc:Bounds x="1239" y="79" width="36" height="36" />
<bpmndi:BPMNLabel>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
index 12dbfe6dde..2f5fa39dbc 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
@@ -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.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="_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:process id="DoCreateNetworkInstance" name="DoCreateNetworkInstance" isExecutable="true">
<bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1n61wit</bpmn2:outgoing>
@@ -332,19 +332,6 @@ DoCreateNetworkInstance.processJavaException(execution)]]></bpmn2:script>
<bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
</bpmn2:endEvent>
</bpmn2:subProcess>
- <bpmn2:callActivity id="callGetServiceInstance" name="Get&#10;Service&#10;Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="CRENWKI_serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:out source="GENGS_serviceInstance" target="CRENWKI_serviceInstance" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator" />
- <camunda:out source="GENGS_siResourceLink" target="GENGSI_siResourceLink" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:in source="GENGS_type" target="GENGS_type" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_0ftylq3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- </bpmn2:callActivity>
<bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Call REST Query Network Name In AAI" scriptFormat="groovy">
<bpmn2:incoming>isNameSentYes_SequenceFlow</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
@@ -353,23 +340,7 @@ def DoCreateNetworkInstance = new DoCreateNetworkInstance()
DoCreateNetworkInstance.callRESTQueryAAINetworkName(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callAAIQuery_scriptTask" targetRef="isAAIQueryNameOk_ExclusiveGateway" />
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="siFoundCheck" />
- <bpmn2:exclusiveGateway id="siFoundCheck" name="Service Instance Found?" default="siFoundNo">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>siFoundYes</bpmn2:outgoing>
- <bpmn2:outgoing>siFoundNo</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="siFoundYes" name="Yes" sourceRef="siFoundCheck" targetRef="isNameSent_ExclusiveGateway">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGSI_FoundIndicator" ) == true && execution.getVariable("GENGSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="siFoundNo" name="No" sourceRef="siFoundCheck" targetRef="workflowExceptionSINotFound" />
- <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>siFoundNo</bpmn2:incoming>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Service Instance Not Found")
-]]></bpmn2:script>
- </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="isNameSent_ExclusiveGateway" />
<bpmn2:scriptTask id="callRESTQueryVpnBinding_ScriptTask" name="Call REST Query Vpn Binding in AAI" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
@@ -413,7 +384,7 @@ DoCreateNetworkInstance.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_0ftylq3" sourceRef="ScriptTask_preprocess" targetRef="callGetServiceInstance" />
<bpmn2:exclusiveGateway id="isNameSent_ExclusiveGateway" name="is Network Name &#10;Sent?&#10;" default="isNameSentNo_SequenceFlow">
- <bpmn2:incoming>siFoundYes</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
<bpmn2:outgoing>isNameSentYes_SequenceFlow</bpmn2:outgoing>
<bpmn2:outgoing>isNameSentNo_SequenceFlow</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
@@ -535,6 +506,13 @@ def DoCreateNetworkInstance = new DoCreateNetworkInstance()
DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_18ylufb" sourceRef="ScriptTask_0p3v749" targetRef="EndEvent_0ti2ctu" />
+ <bpmn2:scriptTask id="callGetServiceInstance" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0ftylq3</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoCreateNetworkInstance = new DoCreateNetworkInstance()
+DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
<bpmn2:textAnnotation id="TextAnnotation_1orb6o6"> <bpmn2:text><![CDATA[if '200', Prepare PO Network Rollback]]></bpmn2:text>
</bpmn2:textAnnotation>
<bpmn2:association id="Association_0c315jr" sourceRef="validateCreatePONetwork_ScriptTask" targetRef="TextAnnotation_1orb6o6" />
@@ -898,37 +876,12 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
<dc:Bounds x="301" y="476" width="6" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance">
- <dc:Bounds x="759" y="155" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true">
- <dc:Bounds x="784" y="291" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="696" y="304" width="80" height="25" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_72" targetElement="_BPMNShape_ExclusiveGateway_244">
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="ScriptTask_0z2n0hl_di" targetElement="ExclusiveGateway_0lw40k5_di">
<di:waypoint xsi:type="dc:Point" x="809" y="235" />
- <di:waypoint xsi:type="dc:Point" x="809" y="291" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="824" y="263" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="siFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_62">
- <di:waypoint xsi:type="dc:Point" x="834" y="316" />
+ <di:waypoint xsi:type="dc:Point" x="809" y="316" />
<di:waypoint xsi:type="dc:Point" x="951" y="316" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="851" y="319" width="18" height="13" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound">
- <dc:Bounds x="759" y="395" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="siFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_331">
- <di:waypoint xsi:type="dc:Point" x="809" y="341" />
- <di:waypoint xsi:type="dc:Point" x="809" y="395" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="823" y="340.55618916742606" width="14" height="13" />
+ <dc:Bounds x="779" y="275.5" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_333" bpmnElement="callRESTQueryNetworkTableRef_ScriptTask">
@@ -961,7 +914,7 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
<di:waypoint xsi:type="dc:Point" x="706" y="195" />
<di:waypoint xsi:type="dc:Point" x="759" y="195" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="721" y="195" width="0" height="0" />
+ <dc:Bounds x="676" y="195" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_0lw40k5_di" bpmnElement="isNameSent_ExclusiveGateway" isMarkerVisible="true">
@@ -1358,6 +1311,9 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
<dc:Bounds x="287" y="1159" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0z2n0hl_di" bpmnElement="callGetServiceInstance">
+ <dc:Bounds x="759" y="155" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
index 29116a67fc..2c6f5ee61d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateServiceInstance.bpmn
@@ -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.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="_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:process id="DoCreateServiceInstance" name="DoCreateServiceInstance" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -12,7 +12,7 @@
def dcsi = new DoCreateServiceInstance()
dcsi.getAAICustomerById(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getAAICustomerById_scriptTask" targetRef="ExclusiveGateway_09wkav2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getAAICustomerById_scriptTask" targetRef="callGenericPutService" />
<bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
@@ -21,7 +21,6 @@ def dcsi = new DoCreateServiceInstance()
dcsi.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="callGenericGetService" targetRef="ScriptTask_0i8cqdy" />
<bpmn2:scriptTask id="PreProcessSDNCAssignRequest" name="PreProcess SDNC Assign Request" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_156ih25</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
@@ -49,24 +48,12 @@ dcsi.postProcessSDNCAssign(execution)]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>SequenceFlow_01q6pl4</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="getAAICustomerById_scriptTask" />
<bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="PreProcessSDNCAssignRequest" targetRef="CallSDNCAdapterServiceTopologyAssign" />
<bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="CallSDNCAdapterServiceTopologyAssign" targetRef="PostProcessSDNCAssignRequest" />
- <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PostProcessSDNCAssignRequest" targetRef="CallActivity_1707jgc" />
- <bpmn2:callActivity id="callGenericGetService" name="Call GenericGetService" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceName" target="GENGS_serviceInstanceName" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_11fnnkb</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:callActivity>
+ <bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="PostProcessSDNCAssignRequest" targetRef="EndEvent_3" />
<bpmn2:callActivity id="callGenericPutService" name="Call Generic Put Service" calledElement="GenericPutService">
<bpmn2:extensionElements>
<camunda:in source="globalSubscriberId" target="GENPS_globalSubscriberId" />
@@ -78,19 +65,9 @@ dcsi.postProcessSDNCAssign(execution)]]></bpmn2:script>
<camunda:in source="msoRequestId" target="GENPS_requesId" />
<camunda:out source="WorkflowException" target="WorkflowException" />
</bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1uw2p9a</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_1w01tqs</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1jhzmzn</bpmn2:outgoing>
</bpmn2:callActivity>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_09wkav2" name="need to check SI name in AAI?" default="SequenceFlow_1uw2p9a">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_11fnnkb</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_1uw2p9a</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_11fnnkb" name="yes" sourceRef="ExclusiveGateway_09wkav2" targetRef="callGenericGetService">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("checkAAI" ) == true }]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_1uw2p9a" name="no" sourceRef="ExclusiveGateway_09wkav2" targetRef="callGenericPutService" />
<bpmn2:subProcess id="SubProcess_06d8lk8" name="Sub-process for Application Errors" triggeredByEvent="true">
<bpmn2:startEvent id="StartEvent_0yljq9y">
<bpmn2:outgoing>SequenceFlow_0tgrn11</bpmn2:outgoing>
@@ -143,37 +120,6 @@ dcsi.postProcessRollback(execution)
<bpmn2:sequenceFlow id="SequenceFlow_00v4npo" name="yes" sourceRef="ExclusiveGateway_1nk6aol" targetRef="EndEvent_10659gr">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{!execution.getVariable("sendToSDNC")}]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
- <bpmn2:scriptTask id="ScriptTask_0i8cqdy" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1w01tqs</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoCreateServiceInstance()
-dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1w01tqs" sourceRef="ScriptTask_0i8cqdy" targetRef="callGenericPutService" />
- <bpmn2:callActivity id="CallActivity_1707jgc" name="Call GenericGetService2" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="subscriptionServiceType" target="GENGS_serviceType" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0tx5frq</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_0tx5frq" sourceRef="CallActivity_1707jgc" targetRef="ScriptTask_1tp0fcx" />
- <bpmn2:sequenceFlow id="SequenceFlow_01q6pl4" sourceRef="ScriptTask_1tp0fcx" targetRef="EndEvent_3" />
- <bpmn2:scriptTask id="ScriptTask_1tp0fcx" name="Post Process AAI GET2" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_0tx5frq</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_01q6pl4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoCreateServiceInstance()
-dcsi.postProcessAAIGET2(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
<bpmn2:scriptTask id="ScriptTask_0q37vn9" name="Post Process AAI PUT" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1jhzmzn</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_16sdyz9</bpmn2:outgoing>
@@ -243,24 +189,18 @@ dcsi.processJavaException(execution)]]></bpmn2:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_62">
<di:waypoint xsi:type="dc:Point" x="493" y="97" />
- <di:waypoint xsi:type="dc:Point" x="565" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="206" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="529" y="82" width="0" height="0" />
+ <dc:Bounds x="712.5" y="82" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="EndEvent_3">
- <dc:Bounds x="1122" y="1297" width="36" height="36" />
+ <dc:Bounds x="1004" y="1216" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1095" y="1338" width="90" height="0" />
+ <dc:Bounds x="977" y="1257" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4">
- <di:waypoint xsi:type="dc:Point" x="839" y="94" />
- <di:waypoint xsi:type="dc:Point" x="971" y="94" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="905" y="79" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_334" bpmnElement="PreProcessSDNCAssignRequest">
<dc:Bounds x="972" y="810" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -292,39 +232,15 @@ dcsi.processJavaException(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ScriptTask_335">
- <di:waypoint xsi:type="dc:Point" x="1024" y="1134" />
- <di:waypoint xsi:type="dc:Point" x="1024" y="1162" />
+ <di:waypoint xsi:type="dc:Point" x="1023" y="1134" />
+ <di:waypoint xsi:type="dc:Point" x="1022" y="1216" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="994" y="1148" width="90" height="0" />
+ <dc:Bounds x="977.5" y="1160" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="callGenericGetService">
- <dc:Bounds x="739" y="57" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0khp0qc_di" bpmnElement="callGenericPutService">
<dc:Bounds x="972" y="206" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ExclusiveGateway_09wkav2_di" bpmnElement="ExclusiveGateway_09wkav2" isMarkerVisible="true">
- <dc:Bounds x="565" y="72" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="547" y="27" width="85" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_11fnnkb_di" bpmnElement="SequenceFlow_11fnnkb">
- <di:waypoint xsi:type="dc:Point" x="615" y="97" />
- <di:waypoint xsi:type="dc:Point" x="739" y="97" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="635" y="76" width="18" height="14" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1uw2p9a_di" bpmnElement="SequenceFlow_1uw2p9a">
- <di:waypoint xsi:type="dc:Point" x="590" y="122" />
- <di:waypoint xsi:type="dc:Point" x="590" y="246" />
- <di:waypoint xsi:type="dc:Point" x="972" y="246" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="594" y="132.89706349694825" width="12" height="14" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_06d8lk8_di" bpmnElement="SubProcess_06d8lk8" isExpanded="true">
<dc:Bounds x="99" y="531" width="783" height="195" />
</bpmndi:BPMNShape>
@@ -385,18 +301,6 @@ dcsi.processJavaException(execution)]]></bpmn2:script>
<dc:Bounds x="1050.5" y="718" width="18" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0i8cqdy_di" bpmnElement="ScriptTask_0i8cqdy">
- <dc:Bounds x="971" y="57" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1w01tqs_di" bpmnElement="SequenceFlow_1w01tqs">
- <di:waypoint xsi:type="dc:Point" x="1021" y="137" />
- <di:waypoint xsi:type="dc:Point" x="1021" y="172" />
- <di:waypoint xsi:type="dc:Point" x="1021" y="172" />
- <di:waypoint xsi:type="dc:Point" x="1021" y="206" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1036" y="172" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0ocetux_di" bpmnElement="ScriptTask_0ocetux">
<dc:Bounds x="330" y="586" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -419,28 +323,6 @@ dcsi.processJavaException(execution)]]></bpmn2:script>
<dc:Bounds x="808" y="626" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1707jgc_di" bpmnElement="CallActivity_1707jgc">
- <dc:Bounds x="972" y="1162" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0tx5frq_di" bpmnElement="SequenceFlow_0tx5frq">
- <di:waypoint xsi:type="dc:Point" x="1022" y="1242" />
- <di:waypoint xsi:type="dc:Point" x="1022" y="1275" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="992" y="1258.5" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_01q6pl4_di" bpmnElement="SequenceFlow_01q6pl4">
- <di:waypoint xsi:type="dc:Point" x="1072" y="1315" />
- <di:waypoint xsi:type="dc:Point" x="1094" y="1315" />
- <di:waypoint xsi:type="dc:Point" x="1094" y="1315" />
- <di:waypoint xsi:type="dc:Point" x="1122" y="1315" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1064" y="1315" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1tp0fcx_di" bpmnElement="ScriptTask_1tp0fcx">
- <dc:Bounds x="972" y="1275" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0q37vn9_di" bpmnElement="ScriptTask_0q37vn9">
<dc:Bounds x="972" y="336" width="100" height="80" />
</bpmndi:BPMNShape>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeV2.bpmn
index ac48776c95..26a4112d59 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeV2.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVfModuleVolumeV2.bpmn
@@ -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="_FhrCQG2BEeaNdqnn65BT4A" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.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="_FhrCQG2BEeaNdqnn65BT4A" 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:process id="DoCreateVfModuleVolumeV2" name="DoCreateVfModuleVolumeV2" isExecutable="true">
<bpmn2:scriptTask id="ScriptTask_preProcessRequest" name="Preprocess Request" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
@@ -128,26 +128,14 @@ doCreateVfModuleVolumeV2.executeMethod('validateVnfResponse', execution, isDebug
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_1qwurc5" sourceRef="CallActivity_callVnfAdapterCreate" targetRef="Task_07psich" />
<bpmn2:sequenceFlow id="SequenceFlow_1gbt2n5" sourceRef="Task_07psich" targetRef="ScriptTask_callRestAaiRequeryVolGrpNm" />
- <bpmn2:callActivity id="Task_1u766ge" name="Call Generic Get Service instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
- <camunda:in source="GENGS_type" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- </bpmn2:extensionElements>
+ <bpmn2:scriptTask id="Task_0qbm5cz" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1wi1cf9</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1vmbvy8</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:scriptTask id="Task_0qbm5cz" name="Validate Get Service Instance Call" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1vmbvy8</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1dpt7ul</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def doCreateVfModuleVolumeV2 = new DoCreateVfModuleVolumeV2()
-doCreateVfModuleVolumeV2.executeMethod('validateGetServiceInstanceCall', execution, isDebugLogEnabled)]]></bpmn2:script>
+doCreateVfModuleVolumeV2.executeMethod('getServiceInstance', execution, isDebugLogEnabled)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1wi1cf9" sourceRef="ScriptTask_preProcessRequest" targetRef="Task_1u766ge" />
- <bpmn2:sequenceFlow id="SequenceFlow_1vmbvy8" sourceRef="Task_1u766ge" targetRef="Task_0qbm5cz" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1wi1cf9" sourceRef="ScriptTask_preProcessRequest" targetRef="Task_0qbm5cz" />
<bpmn2:sequenceFlow id="SequenceFlow_1dpt7ul" sourceRef="Task_0qbm5cz" targetRef="ScriptTask_callRestAaiCloudRegion" />
</bpmn2:process>
<bpmn2:error id="Error_1" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
@@ -330,31 +318,21 @@ doCreateVfModuleVolumeV2.executeMethod('validateGetServiceInstanceCall', executi
<dc:Bounds x="837" y="322" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1u596hd_di" bpmnElement="Task_1u766ge">
- <dc:Bounds x="506" y="106" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1n9cmka_di" bpmnElement="Task_0qbm5cz">
- <dc:Bounds x="640" y="106" width="100" height="80" />
+ <dc:Bounds x="576" y="106" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1wi1cf9_di" bpmnElement="SequenceFlow_1wi1cf9">
<di:waypoint xsi:type="dc:Point" x="469" y="146" />
- <di:waypoint xsi:type="dc:Point" x="506" y="146" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="488" y="121" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1vmbvy8_di" bpmnElement="SequenceFlow_1vmbvy8">
- <di:waypoint xsi:type="dc:Point" x="606" y="146" />
- <di:waypoint xsi:type="dc:Point" x="640" y="146" />
+ <di:waypoint xsi:type="dc:Point" x="576" y="146" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="623" y="121" width="0" height="0" />
+ <dc:Bounds x="477.5" y="131" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1dpt7ul_di" bpmnElement="SequenceFlow_1dpt7ul">
- <di:waypoint xsi:type="dc:Point" x="740" y="146" />
+ <di:waypoint xsi:type="dc:Point" x="676" y="146" />
<di:waypoint xsi:type="dc:Point" x="768" y="146" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="754" y="121" width="0" height="0" />
+ <dc:Bounds x="677" y="131" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnf.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnf.bpmn
index dacce53963..a093beae91 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnf.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnf.bpmn
@@ -13,39 +13,6 @@ DoCreateVnf createVnf = new DoCreateVnf()
createVnf.preProcessRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="initialization" targetRef="callGetService" />
- <bpmn2:scriptTask id="buildWorkflowException" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="buildWorkflowException" targetRef="EndEvent_1" />
- <bpmn2:callActivity id="callGetService" name="Get&#10;&#10;Service&#10;&#10;Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="DoCVNF_serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="GENGS_serviceInstance" target="CRTVI_serviceInstance" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
- <camunda:in source="GENGS_type" target="GENGS_type" />
- <camunda:in source="DoCVNF_serviceInstanceName" target="GENGS_serviceInstanceName" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="callGetService" targetRef="serviceInstanceFound" />
- <bpmn2:exclusiveGateway id="serviceInstanceFound" name="Service Instance Found?" default="notFound">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- <bpmn2:outgoing>found</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceInstanceFound" targetRef="buildWorkflowException" />
- <bpmn2:sequenceFlow id="found" name="Yes" sourceRef="serviceInstanceFound" targetRef="ExclusiveGateway_0j73e7c">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true && execution.getVariable("GENGS_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
<bpmn2:exclusiveGateway id="vnfExist" name="Vnf Already Exist?" default="vnfExistYes">
<bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
<bpmn2:outgoing>vnfExistYes</bpmn2:outgoing>
@@ -77,10 +44,6 @@ ExceptionUtil exceptionUtil = new ExceptionUtil()
exceptionUtil.buildWorkflowException(execution, 5000, "Generic Vnf Already Exist.")]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_10" name="" sourceRef="vnfExistWorkflowException" targetRef="EndEvent_2" />
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" errorRef="Error_2" />
- </bpmn2:endEvent>
<bpmn2:endEvent id="EndEvent_2">
<bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
<bpmn2:errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_2" />
@@ -200,7 +163,7 @@ DoCreateVnf createVnf = new DoCreateVnf()
createVnf.postProcessCreateGenericVnf(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:exclusiveGateway id="ExclusiveGateway_0j73e7c" name="Vnf-name specified?" default="VnfNameSpecified1">
- <bpmn2:incoming>found</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1mvplyi</bpmn2:incoming>
<bpmn2:outgoing>VnfNameNotSpecified1</bpmn2:outgoing>
<bpmn2:outgoing>VnfNameSpecified1</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
@@ -271,6 +234,14 @@ createVnfInfra.validateSDNCResponse(execution, response, "get")]]></bpmn2:script
def doCreateVnf = new DoCreateVnf()
doCreateVnf.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
+ <bpmn2:scriptTask id="callGetService" name="AAI&#10;Query&#10;(svc instance)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1mvplyi</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+DoCreateVnf createVnf = new DoCreateVnf()
+createVnf.getServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:sequenceFlow id="SequenceFlow_1mvplyi" sourceRef="callGetService" targetRef="ExclusiveGateway_0j73e7c" />
</bpmn2:process>
<bpmn2:error id="Error_1" name="Java Lang Exception" errorCode="java.lang.Exception" />
<bpmn2:error id="Error_2" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
@@ -283,67 +254,20 @@ doCreateVnf.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_285" bpmnElement="initialization">
- <dc:Bounds x="216" y="200" width="100" height="80" />
+ <dc:Bounds x="238" y="200" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_68" targetElement="_BPMNShape_ScriptTask_285">
<di:waypoint xsi:type="dc:Point" x="132" y="240" />
- <di:waypoint xsi:type="dc:Point" x="216" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="238" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="165" y="240" width="6" height="6" />
+ <dc:Bounds x="140" y="222" width="90" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_285">
- <di:waypoint xsi:type="dc:Point" x="316" y="240" />
- <di:waypoint xsi:type="dc:Point" x="406" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="361" y="225" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_59" bpmnElement="callGetService">
- <dc:Bounds x="406" y="200" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_229" bpmnElement="serviceInstanceFound" isMarkerVisible="true">
- <dc:Bounds x="552" y="215" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="536" y="267" width="82" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_CallActivity_59" targetElement="_BPMNShape_ExclusiveGateway_229">
- <di:waypoint xsi:type="dc:Point" x="506" y="240" />
- <di:waypoint xsi:type="dc:Point" x="552" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="529" y="225" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_293" bpmnElement="buildWorkflowException">
- <dc:Bounds x="720" y="115" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_ScriptTask_293">
- <di:waypoint xsi:type="dc:Point" x="577" y="215" />
- <di:waypoint xsi:type="dc:Point" x="577" y="155" />
- <di:waypoint xsi:type="dc:Point" x="720" y="155" />
+ <di:waypoint xsi:type="dc:Point" x="338" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="425" y="240" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="580" y="174.4237288135593" width="14" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_225" bpmnElement="EndEvent_1">
- <dc:Bounds x="876" y="137" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="894" y="178" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_293" targetElement="_BPMNShape_EndEvent_225">
- <di:waypoint xsi:type="dc:Point" x="820" y="155" />
- <di:waypoint xsi:type="dc:Point" x="876" y="155" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="846" y="155" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="found" sourceElement="_BPMNShape_ExclusiveGateway_229" targetElement="_BPMNShape_CallActivity_60">
- <di:waypoint xsi:type="dc:Point" x="602" y="240" />
- <di:waypoint xsi:type="dc:Point" x="646" y="240" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="614" y="216.01288698145387" width="18" height="12" />
+ <dc:Bounds x="336.5" y="225" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="_BPMNShape_CallActivity_60" bpmnElement="callGetVnf">
@@ -630,6 +554,16 @@ doCreateVnf.prepUpdateAAIGenericVnf(execution)]]></bpmn2:script>
<bpmndi:BPMNShape id="ScriptTask_0aonzix_di" bpmnElement="Task_053tb0h">
<dc:Bounds x="1445" y="515" width="100" height="80" />
</bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_019g8vu_di" bpmnElement="callGetService">
+ <dc:Bounds x="425" y="200" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1mvplyi_di" bpmnElement="SequenceFlow_1mvplyi">
+ <di:waypoint xsi:type="dc:Point" x="525" y="240" />
+ <di:waypoint xsi:type="dc:Point" x="646" y="240" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="585.5" y="219" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
index 73c21090ea..2e12dd3b96 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn
@@ -15,13 +15,6 @@ ddsi.preProcessRequest(execution)
<bpmn:endEvent id="EndEvent_1uqzt26">
<bpmn:incoming>SequenceFlow_0e7inkl</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:scriptTask id="ScriptTask_1rtnsh8" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_188ejvu</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0vi0sv6</bpmn:outgoing>
- <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def ddsi = new DoCustomDeleteE2EServiceInstance()
-ddsi.postProcessAAIGET(execution)]]></bpmn:script>
- </bpmn:scriptTask>
<bpmn:scriptTask id="ScriptTask_01erufg" name="&#10;AAI&#10;Delete&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0oj2anh</bpmn:incoming>
<bpmn:incoming>SequenceFlow_1ev7z6q</bpmn:incoming>
@@ -49,9 +42,8 @@ ex.processJavaException(execution)]]></bpmn:script>
<bpmn:sequenceFlow id="SequenceFlow_18vlzfo" name="" sourceRef="ScriptTask_0nha3pr" targetRef="EndEvent_06utmg4" />
</bpmn:subProcess>
<bpmn:sequenceFlow id="SequenceFlow_0vz7cd9" sourceRef="StartEvent_0212h2r" targetRef="ScriptTask_06phzgv" />
- <bpmn:sequenceFlow id="SequenceFlow_11e6bfy" sourceRef="ScriptTask_06phzgv" targetRef="CallActivity_076pc2z" />
+ <bpmn:sequenceFlow id="SequenceFlow_11e6bfy" sourceRef="ScriptTask_06phzgv" targetRef="ScriptTask_146jt8v" />
<bpmn:sequenceFlow id="SequenceFlow_0e7inkl" sourceRef="ScriptTask_01erufg" targetRef="EndEvent_1uqzt26" />
- <bpmn:sequenceFlow id="SequenceFlow_0vi0sv6" sourceRef="ScriptTask_1rtnsh8" targetRef="ScriptTask_146jt8v" />
<bpmn:scriptTask id="ScriptTask_0z30dax" name="Prepare Resource Delele For WAN" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1ubor5z</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1dza4q4</bpmn:outgoing>
@@ -93,7 +85,7 @@ ddsi.preResourceDelete(execution, resourceName )]]></bpmn:script>
<bpmn:outgoing>SequenceFlow_1ev7z6q</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:scriptTask id="ScriptTask_146jt8v" name="Prepare Resource Oper Status" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0vi0sv6</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_11e6bfy</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1ym9otf</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def ddsi = new DoCustomDeleteE2EServiceInstance()
@@ -122,22 +114,6 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
<bpmn:outgoing>SequenceFlow_1j08ko3</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_1ym9otf" sourceRef="ScriptTask_146jt8v" targetRef="ServiceTask_00tg69u" />
- <bpmn:callActivity id="CallActivity_076pc2z" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_11e6bfy</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_188ejvu</bpmn:outgoing>
- </bpmn:callActivity>
- <bpmn:sequenceFlow id="SequenceFlow_188ejvu" sourceRef="CallActivity_076pc2z" targetRef="ScriptTask_1rtnsh8" />
<bpmn:scriptTask id="ScriptTask_0o5bglz" name="Sequense Resources" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1j08ko3</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_03c0zlq</bpmn:outgoing>
@@ -219,9 +195,6 @@ ddsi.parseNextResource(execution)]]></bpmn:script>
<dc:Bounds x="1316" y="831" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_1rtnsh8_di" bpmnElement="ScriptTask_1rtnsh8">
- <dc:Bounds x="-193" y="-57" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_01erufg_di" bpmnElement="ScriptTask_01erufg">
<dc:Bounds x="1356" y="513" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -237,9 +210,9 @@ ddsi.parseNextResource(execution)]]></bpmn:script>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_11e6bfy_di" bpmnElement="SequenceFlow_11e6bfy">
<di:waypoint xsi:type="dc:Point" x="-419" y="-17" />
- <di:waypoint xsi:type="dc:Point" x="-357" y="-17" />
+ <di:waypoint xsi:type="dc:Point" x="-26" y="-17" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-433" y="-38" width="90" height="12" />
+ <dc:Bounds x="-267.5" y="-38" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0e7inkl_di" bpmnElement="SequenceFlow_0e7inkl">
@@ -249,13 +222,6 @@ ddsi.parseNextResource(execution)]]></bpmn:script>
<dc:Bounds x="1376" y="685.5" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0vi0sv6_di" bpmnElement="SequenceFlow_0vi0sv6">
- <di:waypoint xsi:type="dc:Point" x="-93" y="-17" />
- <di:waypoint xsi:type="dc:Point" x="-26" y="-17" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="-104.5" y="-38" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="StartEvent_0sf5lpt_di" bpmnElement="StartEvent_0sf5lpt">
<dc:Bounds x="360" y="742" width="36" height="36" />
<bpmndi:BPMNLabel>
@@ -327,16 +293,6 @@ ddsi.parseNextResource(execution)]]></bpmn:script>
<dc:Bounds x="-6" y="39" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_076pc2z_di" bpmnElement="CallActivity_076pc2z">
- <dc:Bounds x="-357" y="-57" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_188ejvu_di" bpmnElement="SequenceFlow_188ejvu">
- <di:waypoint xsi:type="dc:Point" x="-257" y="-17" />
- <di:waypoint xsi:type="dc:Point" x="-193" y="-17" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="-225" y="-38" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0o5bglz_di" bpmnElement="ScriptTask_0o5bglz">
<dc:Bounds x="-26" y="233" width="100" height="80" />
</bpmndi:BPMNShape>
@@ -467,4 +423,4 @@ ddsi.parseNextResource(execution)]]></bpmn:script>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn:definitions> \ No newline at end of file
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn
index 3e76f61224..2df19abf68 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstanceV2.bpmn
@@ -15,12 +15,12 @@ ddsi.preProcessRequest(execution)
<bpmn:endEvent id="EndEvent_1uqzt26">
<bpmn:incoming>SequenceFlow_06tonva</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:scriptTask id="ScriptTask_1rtnsh8" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_188ejvu</bpmn:incoming>
+ <bpmn:scriptTask id="ScriptTask_1rtnsh8" name="AAI&#10;Query&#10;(svc instance)" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_11e6bfy</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_00a3ijv</bpmn:outgoing>
<bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def ddsi = new DoCustomDeleteE2EServiceInstanceV2()
-ddsi.postProcessAAIGET(execution)]]></bpmn:script>
+ddsi.getServiceInstance(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:scriptTask id="ScriptTask_01erufg" name="&#10;AAI&#10;Delete&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0t5f2dt</bpmn:incoming>
@@ -48,7 +48,7 @@ ex.processJavaException(execution)]]></bpmn:script>
<bpmn:sequenceFlow id="SequenceFlow_18vlzfo" name="" sourceRef="ScriptTask_0nha3pr" targetRef="EndEvent_06utmg4" />
</bpmn:subProcess>
<bpmn:sequenceFlow id="SequenceFlow_0vz7cd9" sourceRef="StartEvent_0212h2r" targetRef="ScriptTask_06phzgv" />
- <bpmn:sequenceFlow id="SequenceFlow_11e6bfy" sourceRef="ScriptTask_06phzgv" targetRef="CallActivity_076pc2z" />
+ <bpmn:sequenceFlow id="SequenceFlow_11e6bfy" sourceRef="ScriptTask_06phzgv" targetRef="ScriptTask_1rtnsh8" />
<bpmn:sequenceFlow id="SequenceFlow_0e7inkl" sourceRef="ScriptTask_01erufg" targetRef="ScriptTask_1vlvb1r" />
<bpmn:scriptTask id="ScriptTask_postProcessVFCDelete" name="Post Process VFC Delete" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1931m8u</bpmn:incoming>
@@ -122,22 +122,6 @@ ddsi.preSDNCResourceDelete(execution, resourceName )]]></bpmn:script>
<bpmn:incoming>SequenceFlow_0akcnw7</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0uc2beq</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:callActivity id="CallActivity_076pc2z" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_11e6bfy</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_188ejvu</bpmn:outgoing>
- </bpmn:callActivity>
- <bpmn:sequenceFlow id="SequenceFlow_188ejvu" sourceRef="CallActivity_076pc2z" targetRef="ScriptTask_1rtnsh8" />
<bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1d5z35x" name="GoTo Delete SDNC Resource">
<bpmn:incoming>SequenceFlow_1qzxy2i</bpmn:incoming>
<bpmn:linkEventDefinition name="DeleteSDNCResource" />
@@ -430,7 +414,7 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1rtnsh8_di" bpmnElement="ScriptTask_1rtnsh8">
- <dc:Bounds x="1055" y="88" width="100" height="80" />
+ <dc:Bounds x="795" y="88" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_01erufg_di" bpmnElement="ScriptTask_01erufg">
<dc:Bounds x="286" y="1216" width="100" height="80" />
@@ -447,10 +431,9 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_11e6bfy_di" bpmnElement="SequenceFlow_11e6bfy">
<di:waypoint xsi:type="dc:Point" x="411" y="128" />
- <di:waypoint xsi:type="dc:Point" x="461" y="128" />
- <di:waypoint xsi:type="dc:Point" x="667" y="128" />
+ <di:waypoint xsi:type="dc:Point" x="795" y="128" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="391" y="107" width="90" height="12" />
+ <dc:Bounds x="558" y="107" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0e7inkl_di" bpmnElement="SequenceFlow_0e7inkl">
@@ -553,16 +536,6 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
<bpmndi:BPMNShape id="ServiceTask_0p4b7e1_di" bpmnElement="Task_0edkv0m">
<dc:Bounds x="1055" y="577" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_076pc2z_di" bpmnElement="CallActivity_076pc2z">
- <dc:Bounds x="667" y="88" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_188ejvu_di" bpmnElement="SequenceFlow_188ejvu">
- <di:waypoint xsi:type="dc:Point" x="767" y="128" />
- <di:waypoint xsi:type="dc:Point" x="1055" y="128" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="866" y="107" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="IntermediateThrowEvent_1gbu8tc_di" bpmnElement="IntermediateThrowEvent_1d5z35x">
<dc:Bounds x="1294" y="376" width="36" height="36" />
<bpmndi:BPMNLabel>
@@ -781,10 +754,10 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_00a3ijv_di" bpmnElement="SequenceFlow_00a3ijv">
- <di:waypoint xsi:type="dc:Point" x="1155" y="128" />
+ <di:waypoint xsi:type="dc:Point" x="895" y="128" />
<di:waypoint xsi:type="dc:Point" x="1294" y="128" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1179.5" y="107" width="90" height="12" />
+ <dc:Bounds x="1049.5" y="107" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_1fqk4c6_di" bpmnElement="ScriptTask_PrepareServiceResources">
@@ -925,4 +898,4 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn:script>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn:definitions> \ No newline at end of file
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn
index fae66a7381..d9a93e66d8 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteServiceInstance.bpmn
@@ -67,28 +67,14 @@ ddsi.preProcessSDNCDelete(execution)]]></bpmn2:script>
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("sendToSDNC" ) == false }]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_1dwch0k" name="yes" sourceRef="ExclusiveGateway_1mrh7us" targetRef="ScriptTask_0xxwbdq" />
- <bpmn2:callActivity id="CallActivity_1s8pf0x" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- </bpmn2:extensionElements>
+ <bpmn2:sequenceFlow id="SequenceFlow_1jqc16k" sourceRef="preProcessRequest_ScriptTask" targetRef="ScriptTask_02da0lj" />
+ <bpmn2:scriptTask id="ScriptTask_02da0lj" name="AAI&#10;Query&#10;(svc instance)" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1jqc16k</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1grea1r</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_1jqc16k" sourceRef="preProcessRequest_ScriptTask" targetRef="CallActivity_1s8pf0x" />
- <bpmn2:scriptTask id="ScriptTask_02da0lj" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1grea1r</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1up0j5r</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def ddsi = new DoDeleteServiceInstance()
-ddsi.postProcessAAIGET(execution)]]></bpmn2:script>
+ddsi.getServiceInstance(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1grea1r" sourceRef="CallActivity_1s8pf0x" targetRef="ScriptTask_02da0lj" />
<bpmn2:sequenceFlow id="SequenceFlow_1up0j5r" sourceRef="ScriptTask_02da0lj" targetRef="ExclusiveGateway_0590oev" />
<bpmn2:scriptTask id="ScriptTask_1ybdq3e" name="&#10;AAI&#10;Delete&#10;(svc instance)&#10;" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_0riudmc</bpmn2:incoming>
@@ -250,26 +236,16 @@ ddsi.postProcessSDNCDelete(execution, response, "delete")]]></bpmn2:script>
<dc:Bounds x="306" y="101" width="18" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_1s8pf0x_di" bpmnElement="CallActivity_1s8pf0x">
- <dc:Bounds x="-121" y="57" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1jqc16k_di" bpmnElement="SequenceFlow_1jqc16k">
<di:waypoint xsi:type="dc:Point" x="-165" y="97" />
- <di:waypoint xsi:type="dc:Point" x="-121" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="20" y="97" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-143" y="82" width="0" height="0" />
+ <dc:Bounds x="-117.5" y="82" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_02da0lj_di" bpmnElement="ScriptTask_02da0lj">
<dc:Bounds x="20" y="57" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1grea1r_di" bpmnElement="SequenceFlow_1grea1r">
- <di:waypoint xsi:type="dc:Point" x="-21" y="97" />
- <di:waypoint xsi:type="dc:Point" x="20" y="97" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="0" y="82" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1up0j5r_di" bpmnElement="SequenceFlow_1up0j5r">
<di:waypoint xsi:type="dc:Point" x="120" y="97" />
<di:waypoint xsi:type="dc:Point" x="150" y="97" />
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
index a46d8d4de2..ef3340e887 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn
@@ -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.11.3" 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.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="DoUpdateE2EServiceInstance" name="DoUpdateE2EServiceInstance" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -113,7 +113,7 @@ ddsi.postProcessAAIPUT(execution)]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_1demy08</bpmn2:outgoing>
<bpmn2:linkEventDefinition name="UpdateAAI" />
</bpmn2:intermediateCatchEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1demy08" sourceRef="IntermediateCatchEvent_0a9bdjw" targetRef="ScriptTask_195nptq" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1demy08" sourceRef="IntermediateCatchEvent_0a9bdjw" targetRef="ScriptTask_0sis7k0" />
<bpmn2:sequenceFlow id="SequenceFlow_0f76thv" sourceRef="CallActivity_1nm9zq7" targetRef="ScriptTask_0xtabf8" />
<bpmn2:scriptTask id="ScriptTask_19v8l1w" name="Post Config Service Instance Update" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_0ku36oy</bpmn2:incoming>
@@ -173,40 +173,8 @@ dcsi.postProcessRollback(execution)
<bpmn2:sequenceFlow id="SequenceFlow_02znk15" sourceRef="ScriptTask_0vc9jgo" targetRef="EndEvent_014jyvb" />
<bpmn2:sequenceFlow id="SequenceFlow_19ly8h7" sourceRef="ScriptTask_1awrp72" targetRef="ScriptTask_0vc9jgo" />
</bpmn2:subProcess>
- <bpmn2:scriptTask id="ScriptTask_195nptq" name="Pre Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1demy08</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1cy5gq2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoUpdateE2EServiceInstance()
-dcsi.preProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1cy5gq2" sourceRef="ScriptTask_195nptq" targetRef="CallActivity_069o6fn" />
- <bpmn2:callActivity id="CallActivity_069o6fn" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1cy5gq2</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1vy856f</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:scriptTask id="ScriptTask_0lp9y03" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1vy856f</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14ggluy</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoUpdateE2EServiceInstance()
-dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1vy856f" sourceRef="CallActivity_069o6fn" targetRef="ScriptTask_0lp9y03" />
- <bpmn2:sequenceFlow id="SequenceFlow_14ggluy" sourceRef="ScriptTask_0lp9y03" targetRef="ScriptTask_0sis7k0" />
<bpmn2:scriptTask id="ScriptTask_0sis7k0" name="Pre Process AAI PUT" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_14ggluy</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1demy08</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1kx5ke9</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DoUpdateE2EServiceInstance()
@@ -387,11 +355,9 @@ dcsi.preProcessAAIPUT(execution)]]></bpmn2:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1demy08_di" bpmnElement="SequenceFlow_1demy08">
<di:waypoint xsi:type="dc:Point" x="110" y="1373" />
- <di:waypoint xsi:type="dc:Point" x="197" y="1373" />
- <di:waypoint xsi:type="dc:Point" x="197" y="1373" />
- <di:waypoint xsi:type="dc:Point" x="293" y="1373" />
+ <di:waypoint xsi:type="dc:Point" x="978" y="1373" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="212" y="1367" width="0" height="12" />
+ <dc:Bounds x="499" y="1352" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0f76thv_di" bpmnElement="SequenceFlow_0f76thv">
@@ -504,36 +470,6 @@ dcsi.preProcessAAIPUT(execution)]]></bpmn2:script>
<dc:Bounds x="907.5" y="1892" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_195nptq_di" bpmnElement="ScriptTask_195nptq">
- <dc:Bounds x="293" y="1333" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1cy5gq2_di" bpmnElement="SequenceFlow_1cy5gq2">
- <di:waypoint xsi:type="dc:Point" x="393" y="1373" />
- <di:waypoint xsi:type="dc:Point" x="495" y="1373" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="399" y="1352" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="CallActivity_069o6fn_di" bpmnElement="CallActivity_069o6fn">
- <dc:Bounds x="495" y="1333" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0lp9y03_di" bpmnElement="ScriptTask_0lp9y03">
- <dc:Bounds x="724" y="1333" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1vy856f_di" bpmnElement="SequenceFlow_1vy856f">
- <di:waypoint xsi:type="dc:Point" x="595" y="1373" />
- <di:waypoint xsi:type="dc:Point" x="724" y="1373" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="614.5" y="1352" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_14ggluy_di" bpmnElement="SequenceFlow_14ggluy">
- <di:waypoint xsi:type="dc:Point" x="824" y="1373" />
- <di:waypoint xsi:type="dc:Point" x="978" y="1373" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="856" y="1352" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0sis7k0_di" bpmnElement="ScriptTask_0sis7k0">
<dc:Bounds x="978" y="1333" width="100" height="80" />
</bpmndi:BPMNShape>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn
index 1589633e59..b53e87d34a 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn
@@ -184,7 +184,7 @@ csi.postProcessForAddResource(execution)]]></bpmn2:script>
<bpmn2:linkEventDefinition name="UpdateAAI" />
</bpmn2:intermediateCatchEvent>
<bpmn2:scriptTask id="ScriptTask_0gj4dj5" name="Pre Process AAI PUT" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1ixphei</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1a65s3k</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1lppnhy</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def dcsi = new DoUpdateE2EServiceInstanceRollback()
@@ -212,7 +212,7 @@ dcsi.preProcessAAIPUT(execution)]]></bpmn2:script>
def dcsi = new DoUpdateE2EServiceInstanceRollback()
dcsi.postProcessAAIPUT(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1a65s3k" sourceRef="IntermediateCatchEvent_0546q5i" targetRef="ScriptTask_13h2onn" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1a65s3k" sourceRef="IntermediateCatchEvent_0546q5i" targetRef="ScriptTask_0gj4dj5" />
<bpmn2:sequenceFlow id="SequenceFlow_1lppnhy" sourceRef="ScriptTask_0gj4dj5" targetRef="CallActivity_0zs5y0x" />
<bpmn2:sequenceFlow id="SequenceFlow_0kbisn8" sourceRef="CallActivity_0zs5y0x" targetRef="ScriptTask_1p96syr" />
<bpmn2:exclusiveGateway id="ExclusiveGateway_1k16vgh" name="RollBackAAI?" default="SequenceFlow_161uzhj">
@@ -287,38 +287,6 @@ rbk.postProcessRequest(execution)]]></bpmn2:script>
<bpmn2:sequenceFlow id="SequenceFlow_1n6foyw" sourceRef="ScriptTask_17k4l6y" targetRef="EndEvent_193e9tt" />
<bpmn2:sequenceFlow id="SequenceFlow_1azhgda" sourceRef="ScriptTask_1p96syr" targetRef="ScriptTask_17k4l6y" />
<bpmn2:sequenceFlow id="SequenceFlow_055b52t" name="no" sourceRef="ExclusiveGateway_0ii31dq" targetRef="ExclusiveGateway_0ybxh3b" />
- <bpmn2:scriptTask id="ScriptTask_13h2onn" name="Pre Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1a65s3k</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0870pzc</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoUpdateE2EServiceInstanceRollback()
-dcsi.preProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:callActivity id="CallActivity_1527zgc" name="Call AAI Generic GetService" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:in sourceExpression="service-instance" target="GENGS_type" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGS_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:out source="GENGS_siResourceLink" target="GENGS_siResourceLink" />
- <camunda:out source="GENGS_service" target="GENGS_service" />
- <camunda:in source="globalSubscriberId" target="GENGS_globalCustomerId" />
- <camunda:in source="serviceType" target="GENGS_serviceType" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_0870pzc</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1f31l5s</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_0870pzc" sourceRef="ScriptTask_13h2onn" targetRef="CallActivity_1527zgc" />
- <bpmn2:scriptTask id="ScriptTask_0td1f55" name="Post Process AAI GET" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1f31l5s</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1ixphei</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
-def dcsi = new DoUpdateE2EServiceInstanceRollback()
-dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1f31l5s" sourceRef="CallActivity_1527zgc" targetRef="ScriptTask_0td1f55" />
- <bpmn2:sequenceFlow id="SequenceFlow_1ixphei" sourceRef="ScriptTask_0td1f55" targetRef="ScriptTask_0gj4dj5" />
</bpmn2:process>
<bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
@@ -602,9 +570,9 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1a65s3k_di" bpmnElement="SequenceFlow_1a65s3k">
<di:waypoint xsi:type="dc:Point" x="192" y="783" />
- <di:waypoint xsi:type="dc:Point" x="234" y="783" />
+ <di:waypoint xsi:type="dc:Point" x="687" y="783" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="168" y="762" width="90" height="12" />
+ <dc:Bounds x="394.5" y="762" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1lppnhy_di" bpmnElement="SequenceFlow_1lppnhy">
@@ -764,36 +732,6 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
<dc:Bounds x="769" y="106" width="15" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_13h2onn_di" bpmnElement="ScriptTask_13h2onn">
- <dc:Bounds x="234" y="743" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_1527zgc_di" bpmnElement="CallActivity_1527zgc">
- <dc:Bounds x="391" y="743" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0870pzc_di" bpmnElement="SequenceFlow_0870pzc">
- <di:waypoint xsi:type="dc:Point" x="334" y="783" />
- <di:waypoint xsi:type="dc:Point" x="391" y="783" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="362.5" y="762" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0td1f55_di" bpmnElement="ScriptTask_0td1f55">
- <dc:Bounds x="543" y="743" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1f31l5s_di" bpmnElement="SequenceFlow_1f31l5s">
- <di:waypoint xsi:type="dc:Point" x="491" y="783" />
- <di:waypoint xsi:type="dc:Point" x="543" y="783" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="517" y="762" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1ixphei_di" bpmnElement="SequenceFlow_1ixphei">
- <di:waypoint xsi:type="dc:Point" x="643" y="783" />
- <di:waypoint xsi:type="dc:Point" x="687" y="783" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="665" y="762" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn
index 306b05cea1..b82b1da951 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoUpdateNetworkInstance.bpmn
@@ -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.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="_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:process id="DoUpdateNetworkInstance" name="DoUpdateNetworkInstance" isExecutable="true">
<bpmn2:startEvent id="updateNetwork_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
@@ -231,42 +231,14 @@ DoUpdateNetworkInstance.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="prepareSDNCTopoRequest_ScriptTask" />
<bpmn2:scriptTask id="callRESTQueryNetworkId_ScriptTask" name="Call REST Query Network Id In AAI" scriptFormat="groovy">
- <bpmn2:incoming>siFoundYes</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
DoUpdateNetworkInstance.callRESTQueryAAINetworkId(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_24" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryCloudRegion_ScriptTask" />
- <bpmn2:scriptTask id="workflowExceptionSINotFound" name="Create Workflow Exception" scriptFormat="groovy">
- <bpmn2:incoming>siFoundNo</bpmn2:incoming>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildAndThrowWorkflowException(execution, 404, "Service Instance Not Found")]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:exclusiveGateway id="siFoundCheck" name="is SI Found?" default="siFoundNo">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>siFoundYes</bpmn2:outgoing>
- <bpmn2:outgoing>siFoundNo</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="siFoundYes" name="Yes" sourceRef="siFoundCheck" targetRef="callRESTQueryNetworkId_ScriptTask">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGSI_FoundIndicator" ) == true && execution.getVariable("GENGSI_SuccessIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="siFoundNo" name="No" sourceRef="siFoundCheck" targetRef="workflowExceptionSINotFound" />
- <bpmn2:callActivity id="callGetServiceInstance" name="Get&#10;Service&#10;Instance" calledElement="GenericGetService">
- <bpmn2:extensionElements>
- <camunda:in source="UPDNETI_serviceInstanceId" target="GENGS_serviceInstanceId" />
- <camunda:out source="GENGS_serviceInstance" target="UPDNETI_serviceInstanceId" />
- <camunda:out source="GENGS_FoundIndicator" target="GENGSI_FoundIndicator" />
- <camunda:out source="GENGS_SuccessIndicator" target="GENGSI_SuccessIndicator" />
- <camunda:out source="GENGS_siResourceLink" target="GENGSI_siResourceLink" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- <camunda:in source="GENGS_type" target="GENGS_type" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- </bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="siFoundCheck" />
+ <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="callRESTQueryNetworkId_ScriptTask" />
<bpmn2:scriptTask id="validateUpdatePONetwork_ScriptTask" name="Validate Update PO Network" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_59</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
@@ -340,6 +312,13 @@ def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_ScriptTask" />
+ <bpmn2:scriptTask id="callGetServiceInstance" name="AAI&#10;Query&#10;(svc instance)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def DoUpdateNetworkInstance = new DoUpdateNetworkInstance()
+DoUpdateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
</bpmn2:process>
<bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
@@ -430,7 +409,7 @@ DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:scrip
<di:waypoint xsi:type="dc:Point" x="572" y="203" />
<di:waypoint xsi:type="dc:Point" x="686" y="203" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="629" y="188" width="0" height="0" />
+ <dc:Bounds x="584" y="188" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50" targetElement="_BPMNShape_ExclusiveGateway_90">
@@ -682,42 +661,16 @@ DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:scrip
<dc:Bounds x="221" y="470" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_CallActivity_72" bpmnElement="callGetServiceInstance">
- <dc:Bounds x="686" y="163" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_244" bpmnElement="siFoundCheck" isMarkerVisible="true">
- <dc:Bounds x="836" y="177" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="891" y="195" width="79" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_CallActivity_72" targetElement="_BPMNShape_ExclusiveGateway_244">
+ <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="ScriptTask_0e58tta_di" targetElement="_BPMNShape_ScriptTask_133">
<di:waypoint xsi:type="dc:Point" x="786" y="203" />
<di:waypoint xsi:type="dc:Point" x="805" y="203" />
<di:waypoint xsi:type="dc:Point" x="805" y="202" />
- <di:waypoint xsi:type="dc:Point" x="836" y="202" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="799" y="203" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="siFoundYes" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_133">
- <di:waypoint xsi:type="dc:Point" x="861" y="177" />
+ <di:waypoint xsi:type="dc:Point" x="861" y="202" />
<di:waypoint xsi:type="dc:Point" x="861" y="140" />
<di:waypoint xsi:type="dc:Point" x="910" y="140" />
<di:waypoint xsi:type="dc:Point" x="984" y="140" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="868" y="157" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_331" bpmnElement="workflowExceptionSINotFound">
- <dc:Bounds x="984" y="256" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="siFoundNo" sourceElement="_BPMNShape_ExclusiveGateway_244" targetElement="_BPMNShape_ScriptTask_331">
- <di:waypoint xsi:type="dc:Point" x="861" y="227" />
- <di:waypoint xsi:type="dc:Point" x="861" y="296" />
- <di:waypoint xsi:type="dc:Point" x="984" y="296" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="871" y="233" width="22" height="22" />
+ <dc:Bounds x="788" y="184" width="90" height="6" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_245">
@@ -824,6 +777,9 @@ DoUpdateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:scrip
<di:waypoint xsi:type="dc:Point" x="797" y="946" />
<di:waypoint xsi:type="dc:Point" x="816" y="847" />
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0e58tta_di" bpmnElement="callGetServiceInstance">
+ <dc:Bounds x="686" y="163" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>