diff options
Diffstat (limited to 'bpmn')
244 files changed, 5304 insertions, 2384 deletions
diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml index dfb6af793c..83714ed022 100644 --- a/bpmn/MSOCommonBPMN/pom.xml +++ b/bpmn/MSOCommonBPMN/pom.xml @@ -15,7 +15,6 @@ <properties> <camunda.version>7.8.0</camunda.version> <httpclient.version>4.5.5</httpclient.version> - <jackson.version>1.1.1</jackson.version> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.source>1.8</maven.compiler.source> </properties> @@ -134,6 +133,17 @@ </configuration> </execution> <execution> + <id>non-spring-tests</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/NonSpringSuite.java</include> + </includes> + </configuration> + </execution> + <execution> <id>groovy-tests</id> <goals> <goal>test</goal> @@ -217,15 +227,12 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> - - <dependency> <!-- Needed for InMemoryH2Test --> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <scope>test</scope> </dependency> - <dependency> <groupId>com.fasterxml.uuid</groupId> <artifactId>java-uuid-generator</artifactId> @@ -246,7 +253,7 @@ </dependency> <dependency> <groupId>org.onap.so</groupId> - <artifactId>mso-requests-db</artifactId> + <artifactId>mso-requests-db</artifactId> <version>${project.version}</version> </dependency> <dependency> @@ -304,10 +311,6 @@ </dependency> <dependency> - <groupId>com.fasterxml.jackson.jaxrs</groupId> - <artifactId>jackson-jaxrs-base</artifactId> - </dependency> - <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> </dependency> diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy index c7fcc5c5d3..35e68bb79f 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofHoming.groovy @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP - SO * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018 Intel Corp. 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. diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy index 7c5ffca4ab..8ce633845b 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy @@ -2,14 +2,14 @@ * ============LICENSE_START======================================================= * ONAP - SO * ================================================================================ - * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018 Intel Corp. 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. @@ -82,20 +82,20 @@ class OofUtils { //ServiceInstance Info ServiceInstance serviceInstance = decomposition.getServiceInstance() def serviceInstanceId = "" - def serviceInstanceName = "" + def serviceName = "" serviceInstanceId = execution.getVariable("serviceInstanceId") - serviceInstanceName = execution.getVariable("serviceInstanceName") + serviceName = execution.getVariable("subscriptionServiceType") if (serviceInstanceId == null || serviceInstanceId == "null") { utils.log("DEBUG", "Unable to obtain Service Instance Id", isDebugEnabled) exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - Unable to " + - "obtain Service Instance Id, execution.getVariable(\"serviceInstanceName\") is null") + "obtain Service Instance Id, execution.getVariable(\"serviceInstanceId\") is null") } - if (serviceInstanceName == null || serviceInstanceName == "null") { - utils.log("DEBUG", "Unable to obtain Service Instance Name", isDebugEnabled) + if (serviceName == null || serviceName == "null") { + utils.log("DEBUG", "Unable to obtain Service Name", isDebugEnabled) exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - Unable to " + - "obtain Service Instance Name, execution.getVariable(\"serviceInstanceName\") is null") + "obtain Service Name, execution.getVariable(\"subscriptionServiceType\") is null") } //Model Info ModelInfo model = decomposition.getModelInfo() @@ -144,24 +144,12 @@ class OofUtils { utils.log("DEBUG", "Allotted Resource: " + resource.toString(), isDebugEnabled) def serviceResourceId = resource.getResourceId() - def resourceModuleName = resource.getNfFunction() - utils.log("DEBUG", "resourceModuleName: " + resourceModuleName, - isDebugEnabled) - def resourceModelInvariantId = "no-resourceModelInvariantId" - def resourceModelVersionId = "no-resourceModelVersionId" - - List modelIdLst = execution.getVariable("homingModelIds") - utils.log("DEBUG", "Incoming modelIdLst is: " + modelIdLst.toString(), isDebugEnabled) - for (Map modelId : modelIdLst ) - if (resourceModuleName == modelId.resourceModuleName) { - resourceModelInvariantId = modelId.resourceModelInvariantId - resourceModelVersionId = modelId.resourceModelVersionId - } - - def resourceModelName = "" //Optional - def resourceModelVersion = "" //Optional - def resourceModelType = "" //Optional - def tenantId = "" //Optional + def resourceModelInvariantId = resource.getModelInfo().getModelInvariantUuid() + def resourceModelVersionId = resource.getModelInfo().getModelUuid() + def resourceModelName = resource.getModelInfo().getModelName() + def resourceModelVersion = resource.getModelInfo().getModelVersion() + def resourceModelType = resource.getModelInfo().getModelType() + def tenantId = execution.getVariable("tenantId") def requiredCandidatesJson = "" requiredCandidatesJson = createCandidateJson( @@ -171,7 +159,7 @@ class OofUtils { String demand = " {\n" + - " \"resourceModuleName\": \"${resourceModuleName}\",\n" + + " \"resourceModuleName\": \"${resourceModelName}\",\n" + " \"serviceResourceId\": \"${serviceResourceId}\",\n" + " \"tenantId\": \"${tenantId}\",\n" + " \"resourceModelInfo\": {\n" + @@ -191,21 +179,18 @@ class OofUtils { isDebugEnabled) ModelInfo vnfResourceModelInfo = vnfResource.getModelInfo() def serviceResourceId = vnfResource.getResourceId() - def resourceModuleName = vnfResource.getNfFunction() - utils.log("DEBUG", "resourceModuleName: " + resourceModuleName, - isDebugEnabled) def resourceModelInvariantId = vnfResourceModelInfo.getModelInvariantUuid() def resourceModelName = vnfResourceModelInfo.getModelName() def resourceModelVersion = vnfResourceModelInfo.getModelVersion() def resourceModelVersionId = vnfResourceModelInfo.getModelUuid() def resourceModelType = vnfResourceModelInfo.getModelType() - def tenantId = "" //Optional + def tenantId = execution.getVariable("tenantId") def requiredCandidatesJson = "" String placementDemand = " {\n" + - " \"resourceModuleName\": \"${resourceModuleName}\",\n" + + " \"resourceModuleName\": \"${resourceModelName}\",\n" + " \"serviceResourceId\": \"${serviceResourceId}\",\n" + " \"tenantId\": \"${tenantId}\",\n" + " \"resourceModelInfo\": {\n" + @@ -297,7 +282,7 @@ class OofUtils { " },\n" + " \"serviceInfo\": {\n" + " \"serviceInstanceId\": \"${serviceInstanceId}\",\n" + - " \"serviceName\": \"${serviceInstanceName}\",\n" + + " \"serviceName\": \"${serviceName}\",\n" + " \"modelInfo\": {\n" + " \"modelType\": \"${modelType}\",\n" + " \"modelInvariantId\": \"${modelInvariantId}\",\n" + diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy index ba450c1b12..58c8f27de9 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.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. @@ -281,14 +281,14 @@ class SDNCAdapterUtils { } boolean isAic3 = execution.getVariable("isAic3") - + if(isAic3) { nnsl2HomingInformation = updateHomingInfo(nnsl2HomingInformation, "AIC3.0") } else { nnsl2HomingInformation = updateHomingInfo(nnsl2HomingInformation, "AIC2.X") } - + String content = """ <sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:sdncadapterworkflow="http://openecomp.com/mso/workflow/schema/v1" xmlns:sdncadapter="http://domain2.openecomp.com/workflow/sdnc/adapter/schema/v1"> @@ -319,7 +319,7 @@ class SDNCAdapterUtils { /** * Builds an SDNC "reserve" request and stores it in the specified execution - * variable. + * variable. * @param execution the execution * @param action the type of action: reserve, turnup, etc * @param resultVar the execution variable in which the result will be stored @@ -424,7 +424,7 @@ class SDNCAdapterUtils { if (additionalData == null) { additionalData = "" } - + if(isAic3) { nnsl2HomingInformation = updateHomingInfo(nnsl2HomingInformation, "AIC3.0") } @@ -470,7 +470,7 @@ class SDNCAdapterUtils { exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error") } } - + public String updateHomingInfo(String homingInfo, String aicVersion) { String newHomingInfo if(homingInfo == null || homingInfo.trim().length() == 0) { @@ -480,7 +480,7 @@ class SDNCAdapterUtils { newHomingInfo = homingInfo.substring(0, homingInfo.indexOf("</l2-homing-information>")) + "<aic-version>" + aicVersion + "</aic-version></l2-homing-information>" } } - + /** * Builds a topology SDNC request and return String request. * As V2 will use 1607-style request, region instead of aic clli code @@ -506,7 +506,7 @@ class SDNCAdapterUtils { } else { hdrRequestId = testHdrRequestId } - + String requestId = "" try { requestId = execution.getVariable("mso-request-id") @@ -561,6 +561,9 @@ class SDNCAdapterUtils { int subscriberNameEnd = siRelatedLink.indexOf("/service-subscriptions/") subscriberName = siRelatedLink.substring(subscriberNameStart + 19, subscriberNameEnd) subscriberName = UriUtils.decode(subscriberName,"UTF-8") + }else{ + serviceType = execution.getVariable("serviceType") + subscriberName = execution.getVariable("subscriberName") } String content = @@ -635,11 +638,11 @@ class SDNCAdapterUtils { requestId = execution.getVariable("mso-request-id") if (requestId == null) { requestId = execution.getVariable("msoRequestId") - } + } } else { requestId = testRequestId - } - + } + String aicCloudRegion = cloudRegionId String tenantId = "" if (utils.nodeExists(requestXML, "tenant-id")) { @@ -717,7 +720,7 @@ class SDNCAdapterUtils { String content = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1" - xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" + xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"> <sdncadapter:RequestHeader> <sdncadapter:RequestId>${MsoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId> @@ -993,7 +996,7 @@ class SDNCAdapterUtils { exceptionUtil.buildAndThrowWorkflowException(execution, 400, msg) } } - + public String modelInfoToEcompModelInformation(String jsonModelInfo) { String modelInvariantUuid = jsonUtil.getJsonValue(jsonModelInfo, "modelInvariantUuid") String modelUuid = jsonUtil.getJsonValue(jsonModelInfo, "modelUuid") @@ -1004,11 +1007,11 @@ class SDNCAdapterUtils { String modelCustomizationString = "" if (modelCustomizationUuid != null) { modelCustomizationString = "<model-customization-uuid>${MsoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>" - } + } String modelVersion = jsonUtil.getJsonValue(jsonModelInfo, "modelVersion") if (modelVersion == null) { modelVersion = "" - } + } String modelName = jsonUtil.getJsonValue(jsonModelInfo, "modelName") String ecompModelInformation = """<onap-model-information> @@ -1019,6 +1022,6 @@ class SDNCAdapterUtils { <model-name>${MsoUtils.xmlEscape(modelName)}</model-name> </onap-model-information>""" - return ecompModelInformation - } + return ecompModelInformation + } }
\ No newline at end of file diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SniroUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SniroUtils.groovy index fd4ab32215..5ff49fbae8 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SniroUtils.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SniroUtils.groovy @@ -110,9 +110,12 @@ class SniroUtils{ String requestType = "initial" List<Resource> resources = decomposition.getServiceResources() for(Resource r:resources){ - HomingSolution currentSolution = (HomingSolution) r.getCurrentHomingSolution() + HomingSolution currentSolution = r.getCurrentHomingSolution() if(currentSolution != null){ - requestType = "speed changed" + String indicator = currentSolution.getServiceInstanceId() + if(indicator != null){ + requestType = "speed changed" + } } } @@ -319,7 +322,6 @@ class SniroUtils{ } if((isBlank(placements) || placements.equalsIgnoreCase("[]")) && (isBlank(licenses) || licenses.equalsIgnoreCase("[]"))){ msoLogger.debug("Sniro Async Response does not contain: licenses or placements") - exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Sniro Async Callback Response does not contain: licenses or placements") }else{ return } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java index ca1acc5963..47e36424dd 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java @@ -85,12 +85,9 @@ public class PayloadClient { public static Optional<String> healthCheckFormat(String vnfName, String vnfHostIpAddress) throws JsonProcessingException{ HealthCheckAction payloadResult = new HealthCheckAction(); RequestParametersHealthCheck requestParams = new RequestParametersHealthCheck(); - ConfigurationParametersHealthCheck configParams = new ConfigurationParametersHealthCheck(); - requestParams.setVnfName(vnfName); - configParams.setVnfName(vnfName); - payloadResult.setConfigurationParameters(configParams); + requestParams.setVnfHostIpAddress(vnfHostIpAddress); payloadResult.setRequestParameters(requestParams); - return Optional.of(mapper.writeValueAsString(payloadResult)); + return Optional.of((mapper.writeValueAsString(payloadResult)).replaceAll("\"", "\\\\\"")); } public static Optional<String> snapshotFormat(String vmId, String identityUrl)throws JsonProcessingException{ diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigScaleOutPayload.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigScaleOutPayload.java new file mode 100644 index 0000000000..9035f4d506 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigScaleOutPayload.java @@ -0,0 +1,58 @@ +/* ============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.appc.payload.beans; + +import java.util.HashMap; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ConfigScaleOutPayload { + + @JsonProperty("request-parameters") + private RequestParametersConfigScaleOut requestParameters; + @JsonProperty("configuration-parameters") + private Map<String, String> configurationParameters = new HashMap<>(); + + public RequestParametersConfigScaleOut getRequestParameters() { + return requestParameters; + } + + public void setRequestParameters(RequestParametersConfigScaleOut requestParameters) { + this.requestParameters = requestParameters; + } + + public Map<String, String> getConfigurationParameters() { + return configurationParameters; + } + + public void setConfigurationParameters(Map<String, String> configurationParameters) { + this.configurationParameters = configurationParameters; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("ConfigScaleOutPayload{"); + sb.append("requestParameters=").append(requestParameters); + sb.append(", configurationParameters='").append(configurationParameters); + sb.append('}'); + return sb.toString(); + } +} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersConfigScaleOut.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersConfigScaleOut.java new file mode 100644 index 0000000000..0333fd7a78 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersConfigScaleOut.java @@ -0,0 +1,55 @@ +/* ============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.appc.payload.beans; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class RequestParametersConfigScaleOut { + + @JsonProperty("vnf-host-ip-address") + private String vnfHostIpAddress; + @JsonProperty("vf-module-id") + private String vfModuleId; + + public String getVnfHostIpAddress() { + return vnfHostIpAddress; + } + + public void setVnfHostIpAddress(String vnfHostIpAddress) { + this.vnfHostIpAddress = vnfHostIpAddress; + } + + public String getVfModuleId() { + return vfModuleId; + } + + public void setVfModuleId(String vfModuleId) { + this.vfModuleId = vfModuleId; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("RequestParametersConfigScaleOut{"); + sb.append("vnf-host-ip-address=").append(vnfHostIpAddress); + sb.append(", vf-module-id='").append(vfModuleId); + sb.append('}'); + return sb.toString(); + } +} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java index ca87ad6d15..053ac5e741 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/RequestParametersHealthCheck.java @@ -32,16 +32,27 @@ public class RequestParametersHealthCheck { @JsonProperty("vnf-name") private String vnfName; - +@JsonProperty("vnf-host-ip-address") +private String vnfHostIpAddress; @JsonProperty("vnf-name") public String getVnfName() { -return vnfName; + return vnfName; } @JsonProperty("vnf-name") public void setVnfName(String vnfName) { -this.vnfName = vnfName; + this.vnfName = vnfName; +} + +@JsonProperty("vnf-host-ip-address") +public void setVnfHostIpAddress(String vnfHostIpAddress) { + this.vnfHostIpAddress = vnfHostIpAddress; +} + +@JsonProperty("vnf-host-ip-address") +public String getVnfHostIpAddress() { + return vnfHostIpAddress; } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/InjectionHelper.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/InjectionHelper.java index f1c2c8dda6..deae46ce98 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/InjectionHelper.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/InjectionHelper.java @@ -21,8 +21,10 @@ package org.onap.so.bpmn.common; import org.onap.so.client.aai.AAICommonObjectMapperProvider; +import org.onap.so.client.aai.AAIQueryClient; import org.onap.so.client.aai.AAIResourcesClient; import org.onap.so.client.aai.entities.AAIResultWrapper; +import org.onap.so.client.policy.PolicyClientImpl; import org.onap.so.client.sdno.SDNOValidator; import org.onap.so.client.sdno.SDNOValidatorImpl; import org.springframework.stereotype.Component; @@ -46,6 +48,10 @@ public class InjectionHelper { return new AAIResourcesClient(); } + public AAIQueryClient getAaiQueryClient() { + return new AAIQueryClient(); + } + public SDNOValidator getSdnoValidator() { return new SDNOValidatorImpl(); } @@ -57,4 +63,8 @@ public class InjectionHelper { public AAIResultWrapper getAaiResultWrapper(String json) { return new AAIResultWrapper(json); } + + public PolicyClientImpl getPolicyClient() { + return new PolicyClientImpl(); + } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/BaseClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java index 50137cf985..c3511e69a4 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/BaseClient.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/baseclient/BaseClient.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.so.client.sdnc; +package org.onap.so.bpmn.common.baseclient; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpEntity; diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java index e4bd2f1de0..35bd25fabf 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java @@ -55,9 +55,9 @@ import com.google.gson.reflect.TypeToken; public class ResourceRequestBuilder { - public static String CUSTOMIZATION_UUID = "customizationUUID"; + private static String CUSTOMIZATION_UUID = "customizationUUID"; - public static String SERVICE_URL_TOSCA_CSAR = "/v3/serviceToscaCsar?serviceModelUuid="; + private static String SERVICE_URL_TOSCA_CSAR = "/v3/serviceToscaCsar"; private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, ResourceRequestBuilder.class); @@ -184,7 +184,7 @@ public class ResourceRequestBuilder { private static String getCsarFromUuid(String uuid) throws Exception { String catalogEndPoint = UrnPropertiesReader.getVariable("mso.catalog.db.endpoint"); - HttpClient client = new HttpClient(UriBuilder.fromUri(catalogEndPoint + SERVICE_URL_TOSCA_CSAR + uuid).build().toURL(), "application/json", TargetEntity.CATALOG_DB); + HttpClient client = new HttpClient(UriBuilder.fromUri(catalogEndPoint).path(SERVICE_URL_TOSCA_CSAR).queryParam("serviceModelUuid", uuid).build().toURL(), "application/json", TargetEntity.CATALOG_DB); Response response = client.get(); String value = response.readEntity(String.class); diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/CtagAssignment.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/CtagAssignment.java index 937c79be1d..978f1e9324 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/CtagAssignment.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/CtagAssignment.java @@ -37,13 +37,13 @@ public class CtagAssignment implements Serializable, ShallowCopy<CtagAssignment> @Id @JsonProperty("vlan-id-inner") - private long vlanIdInner; + private Long vlanIdInner; - public long getVlanIdInner() { + public Long getVlanIdInner() { return vlanIdInner; } - public void setVlanIdInner(long vlanIdInner) { + public void setVlanIdInner(Long vlanIdInner) { this.vlanIdInner = vlanIdInner; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java index 218763a006..ba3ab7f315 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/GenericVnf.java @@ -62,7 +62,7 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> { @JsonProperty("platform") private Platform platform; @JsonProperty("cascaded") - private boolean cascaded; + private Boolean cascaded; @JsonProperty("cloud-params") private Map<String, String> cloudParams = new HashMap<>(); @JsonProperty("cloud-context") @@ -104,9 +104,9 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> { @JsonProperty("vdisk-units") private String vdiskUnits; @JsonProperty("in-maint") - private boolean inMaint; + private Boolean inMaint; @JsonProperty("is-closed-loop-disabled") - private boolean isClosedLoopDisabled; + private Boolean isClosedLoopDisabled; @JsonProperty("summary-status") private String summaryStatus; @JsonProperty("encrypted-access-flag") @@ -138,9 +138,29 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> { @JsonProperty("instance-groups") private List<InstanceGroup> instanceGroups = new ArrayList<InstanceGroup>(); @JsonProperty("call-homing") - private boolean callHoming; + private Boolean callHoming; + @JsonProperty("nf-function") + private String nfFunction; + @JsonProperty("nf-role") + private String nfRole; + public String getNfFunction() { + return nfFunction; + } + + public void setNfFunction(String nfFunction) { + this.nfFunction = nfFunction; + } + + public String getNfRole() { + return nfRole; + } + + public void setNfRole(String nfRole) { + this.nfRole = nfRole; + } + public List<InstanceGroup> getInstanceGroups() { return instanceGroups; } @@ -309,19 +329,19 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> { this.vdiskUnits = vdiskUnits; } - public boolean isInMaint() { + public Boolean isInMaint() { return inMaint; } - public void setInMaint(boolean inMaint) { + public void setInMaint(Boolean inMaint) { this.inMaint = inMaint; } - public boolean isClosedLoopDisabled() { + public Boolean isIsClosedLoopDisabled() { return isClosedLoopDisabled; } - public void setClosedLoopDisabled(boolean isClosedLoopDisabled) { + public void setClosedLoopDisabled(Boolean isClosedLoopDisabled) { this.isClosedLoopDisabled = isClosedLoopDisabled; } @@ -453,11 +473,11 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> { this.platform = platform; } - public boolean isCascaded() { + public Boolean isCascaded() { return cascaded; } - public void setCascaded(boolean cascaded) { + public void setCascaded(Boolean cascaded) { this.cascaded = cascaded; } @@ -485,11 +505,11 @@ public class GenericVnf implements Serializable, ShallowCopy<GenericVnf> { this.cloudRegion = cloudRegion; } - public boolean isCallHoming() { + public Boolean isCallHoming() { return callHoming; } - public void setCallHoming(boolean callHoming) { + public void setCallHoming(Boolean callHoming) { this.callHoming = callHoming; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java index 51cd998073..5f43ba076a 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/L3Network.java @@ -46,7 +46,7 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> { @JsonProperty("network-id") private String networkId; @JsonProperty("cascaded") - private boolean cascaded; + private Boolean cascaded; @JsonProperty("cloud-params") private Map<String, String> cloudParams = new HashMap<>(); @JsonProperty("network-name") @@ -60,7 +60,7 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> { @JsonProperty("network-role") private String networkRole; @JsonProperty("is-bound-to-vpn") - private boolean isBoundToVpn; + private Boolean isBoundToVpn; @JsonProperty("service-id") private String serviceId; @JsonProperty("network-role-instance") @@ -82,11 +82,11 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> { @JsonProperty("physical-network-name") private String physicalNetworkName; @JsonProperty("is-provider-network") - private boolean isProviderNetwork; + private Boolean isProviderNetwork; @JsonProperty("is-shared-network") - private boolean isSharedNetwork; + private Boolean isSharedNetwork; @JsonProperty("is-external-network") - private boolean isExternalNetwork; + private Boolean isExternalNetwork; @JsonProperty("self-link") private String selflink; @JsonProperty("operational-status") @@ -142,10 +142,10 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> { public void setNetworkRole(String networkRole) { this.networkRole = networkRole; } - public boolean isBoundToVpn() { + public Boolean isIsBoundToVpn() { return isBoundToVpn; } - public void setIsBoundToVpn(boolean isBoundToVpn) { + public void setIsBoundToVpn(Boolean isBoundToVpn) { this.isBoundToVpn = isBoundToVpn; } public String getServiceId() { @@ -202,22 +202,22 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> { public void setPhysicalNetworkName(String physicalNetworkName) { this.physicalNetworkName = physicalNetworkName; } - public boolean isProviderNetwork() { + public Boolean isIsProviderNetwork() { return isProviderNetwork; } - public void setIsProviderNetwork(boolean isProviderNetwork) { + public void setIsProviderNetwork(Boolean isProviderNetwork) { this.isProviderNetwork = isProviderNetwork; } - public boolean isSharedNetwork() { + public Boolean isIsSharedNetwork() { return isSharedNetwork; } - public void setIsSharedNetwork(boolean isSharedNetwork) { + public void setIsSharedNetwork(Boolean isSharedNetwork) { this.isSharedNetwork = isSharedNetwork; } - public boolean isExternalNetwork() { + public Boolean isIsExternalNetwork() { return isExternalNetwork; } - public void setIsExternalNetwork(boolean isExternalNetwork) { + public void setIsExternalNetwork(Boolean isExternalNetwork) { this.isExternalNetwork = isExternalNetwork; } public String getSelflink() { @@ -242,10 +242,10 @@ public class L3Network implements Serializable, ShallowCopy<L3Network> { public List<SegmentationAssignment> getSegmentationAssignments() { return segmentationAssignments; } - public boolean isCascaded() { + public Boolean isCascaded() { return cascaded; } - public void setIsCascaded(boolean cascaded) { + public void setIsCascaded(Boolean cascaded) { this.cascaded = cascaded; } public Map<String, String> getCloudParams() { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LInterface.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LInterface.java index 4bba39ee62..f102c15062 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LInterface.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LInterface.java @@ -57,13 +57,13 @@ public class LInterface implements Serializable, ShallowCopy<LInterface>{ @JsonProperty("interface-description") private String interfaceDescription; @JsonProperty("is-port-mirrored") - private boolean isPortMirrored; + private Boolean isPortMirrored; @JsonProperty("in-maint") - private boolean inMaint; + private Boolean inMaint; @JsonProperty("prov-status") private String provStatus; @JsonProperty("is-ip-unnumbered") - private boolean isIpUnnumbered; + private Boolean isIpUnnumbered; @JsonProperty("allowed-address-pairs") private String allowedAddressPairs; @JsonProperty("vlans") @@ -131,13 +131,13 @@ public class LInterface implements Serializable, ShallowCopy<LInterface>{ public void setInterfaceDescription(String interfaceDescription) { this.interfaceDescription = interfaceDescription; } - public boolean isPortMirrored() { + public Boolean isIsPortMirrored() { return isPortMirrored; } - public void setPortMirrored(boolean isPortMirrored) { + public void setPortMirrored(Boolean isPortMirrored) { this.isPortMirrored = isPortMirrored; } - public boolean isInMaint() { + public Boolean isInMaint() { return inMaint; } public void setInMaint(boolean inMaint) { @@ -149,10 +149,10 @@ public class LInterface implements Serializable, ShallowCopy<LInterface>{ public void setProvStatus(String provStatus) { this.provStatus = provStatus; } - public boolean isIpUnnumbered() { + public Boolean isIsIpUnnumbered() { return isIpUnnumbered; } - public void setIpUnnumbered(boolean isIpUnnumbered) { + public void setIpUnnumbered(Boolean isIpUnnumbered) { this.isIpUnnumbered = isIpUnnumbered; } public String getAllowedAddressPairs() { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LagInterface.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LagInterface.java index 8a3248e92c..f69f4628fa 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LagInterface.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LagInterface.java @@ -53,7 +53,7 @@ public class LagInterface implements Serializable, ShallowCopy<LagInterface>{ @JsonProperty("prov-status") private String provStatus; @JsonProperty("in-maint") - private boolean inMaint; + private Boolean inMaint; @JsonProperty("l-interfaces") private List<LInterface> lInterfaces = new ArrayList<>(); @@ -99,7 +99,7 @@ public class LagInterface implements Serializable, ShallowCopy<LagInterface>{ public void setProvStatus(String provStatus) { this.provStatus = provStatus; } - public boolean isInMaint() { + public Boolean isInMaint() { return inMaint; } public void setInMaint(boolean inMaint) { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/PhysicalLink.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/PhysicalLink.java index 4f54139386..742a541352 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/PhysicalLink.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/PhysicalLink.java @@ -48,9 +48,9 @@ public class PhysicalLink implements Serializable, ShallowCopy<PhysicalLink> { @JsonProperty("management-option") private String managementOption; @JsonProperty("bandwidth-up") - private int bandwidthUp; + private Integer bandwidthUp; @JsonProperty("bandwidth-down") - private int bandwidthDown; + private Integer bandwidthDown; @JsonProperty("bandwidth-units") private String bandwidthUnits; @JsonProperty("wan-port") @@ -99,19 +99,19 @@ public class PhysicalLink implements Serializable, ShallowCopy<PhysicalLink> { this.managementOption = managementOption; } - public int getBandwidthUp(){ + public Integer getBandwidthUp(){ return bandwidthUp; } - public void setBandwidthUp(int bandwidthUp){ + public void setBandwidthUp(Integer bandwidthUp){ this.bandwidthUp = bandwidthUp; } - public int getBandwidthDown(){ + public Integer getBandwidthDown(){ return bandwidthDown; } - public void setBandwidthDown(int bandwidthDown){ + public void setBandwidthDown(Integer bandwidthDown){ this.bandwidthDown = bandwidthDown; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Subnet.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Subnet.java index cb23f3a3b9..7277438102 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Subnet.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Subnet.java @@ -57,7 +57,7 @@ public class Subnet implements Serializable, ShallowCopy<Subnet>{ @JsonProperty("orchestration-status") private OrchestrationStatus orchestrationStatus; @JsonProperty("dhcp-enabled") - private boolean dhcpEnabled; + private Boolean dhcpEnabled; @JsonProperty("dhcp-start") private String dhcpStart; @JsonProperty("dhcp-end") @@ -119,10 +119,10 @@ public class Subnet implements Serializable, ShallowCopy<Subnet>{ public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) { this.orchestrationStatus = orchestrationStatus; } - public boolean isDhcpEnabled() { + public Boolean isDhcpEnabled() { return dhcpEnabled; } - public void setDhcpEnabled(boolean dhcpEnabled) { + public void setDhcpEnabled(Boolean dhcpEnabled) { this.dhcpEnabled = dhcpEnabled; } public String getDhcpStart() { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VfModule.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VfModule.java index fba78d7a87..469bc991b4 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VfModule.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VfModule.java @@ -50,7 +50,7 @@ public class VfModule implements Serializable, ShallowCopy<VfModule> { @JsonProperty("cloud-params") private Map<String, String> cloudParams = new HashMap<>(); @JsonProperty("cascaded") - private boolean cascaded; + private Boolean cascaded; @JsonProperty("heat-stack-id") private String heatStackId; @JsonProperty("contrail-service-instance-fqdn") @@ -116,7 +116,7 @@ public class VfModule implements Serializable, ShallowCopy<VfModule> { public void setCloudParams(Map<String, String> cloudParams) { this.cloudParams = cloudParams; } - public boolean isCascaded() { + public Boolean isCascaded() { return cascaded; } public void setCascaded(boolean cascaded) { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Vlan.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Vlan.java index 65eeedc44c..a0788d4b0d 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Vlan.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Vlan.java @@ -59,11 +59,11 @@ public class Vlan implements Serializable, ShallowCopy<Vlan>{ @JsonProperty("orchestration-status") private OrchestrationStatus orchestrationStatus; @JsonProperty("in-maint") - private boolean inMaint; + private Boolean inMaint; @JsonProperty("prov-status") private String provStatus; @JsonProperty("is-ip-unnumbered") - private boolean isIpUnnumbered; + private Boolean isIpUnnumbered; @JsonProperty("l3-interface-ipv4-address-list") private List<L3InterfaceIpv4AddressList> l3InterfaceIpv4AddressList = new ArrayList<L3InterfaceIpv4AddressList>(); @JsonProperty("l3-interface-ipv6-address-list") @@ -123,7 +123,7 @@ public class Vlan implements Serializable, ShallowCopy<Vlan>{ public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) { this.orchestrationStatus = orchestrationStatus; } - public boolean isInMaint() { + public Boolean isInMaint() { return inMaint; } public void setInMaint(boolean inMaint) { @@ -135,10 +135,10 @@ public class Vlan implements Serializable, ShallowCopy<Vlan>{ public void setProvStatus(String provStatus) { this.provStatus = provStatus; } - public boolean isIpUnnumbered() { + public Boolean isIsIpUnnumbered() { return isIpUnnumbered; } - public void setIpUnnumbered(boolean isIpUnnumbered) { + public void setIpUnnumbered(Boolean isIpUnnumbered) { this.isIpUnnumbered = isIpUnnumbered; } public List<L3InterfaceIpv4AddressList> getL3InterfaceIpv4AddressList() { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VolumeGroup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VolumeGroup.java index 565a151077..99a643a129 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VolumeGroup.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/VolumeGroup.java @@ -52,7 +52,7 @@ public class VolumeGroup implements Serializable, ShallowCopy<VolumeGroup> { @JsonProperty("cloud-params") private Map<String, String> cloudParams = new HashMap<>(); @JsonProperty("cascaded") - private boolean cascaded; + private Boolean cascaded; @JsonProperty("heat-stack-id") private String heatStackId; @JsonProperty("model-info-vf-module") @@ -100,7 +100,7 @@ public class VolumeGroup implements Serializable, ShallowCopy<VolumeGroup> { public void setCloudParams(Map<String, String> cloudParams) { this.cloudParams = cloudParams; } - public boolean isCascaded() { + public Boolean isCascaded() { return cascaded; } public void setCascaded(boolean cascaded) { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java index 38f974168e..7b11e9f68e 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java @@ -37,7 +37,7 @@ public class BuildingBlock implements Serializable{ @JsonProperty("key") private String key; @JsonProperty("is-virtual-link") - private boolean isVirtualLink; + private Boolean isVirtualLink; @JsonProperty("virtual-link-key") private String virtualLinkKey; @@ -59,10 +59,10 @@ public class BuildingBlock implements Serializable{ public void setKey(String key) { this.key = key; } - public boolean getIsVirtualLink() { + public Boolean getIsVirtualLink() { return isVirtualLink; } - public void setIsVirtualLink(boolean isVirtualLink) { + public void setIsVirtualLink(Boolean isVirtualLink) { this.isVirtualLink = isVirtualLink; } public String getVirtualLinkKey() { diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ConfigurationResourceKeys.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ConfigurationResourceKeys.java new file mode 100644 index 0000000000..8f0ced955c --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ConfigurationResourceKeys.java @@ -0,0 +1,55 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.bpmn.servicedecomposition.entities; + +import java.io.Serializable; + +public class ConfigurationResourceKeys implements Serializable{ + + /** + * + */ + private static final long serialVersionUID = 1L; + private String vfModuleCustomizationUUID; + private String vnfResourceCustomizationUUID; + private String cvnfcCustomizationUUID; + + public String getVfModuleCustomizationUUID() { + return vfModuleCustomizationUUID; + } + public void setVfModuleCustomizationUUID(String vfModuleCustomizationUUID) { + this.vfModuleCustomizationUUID = vfModuleCustomizationUUID; + } + public String getVnfResourceCustomizationUUID() { + return vnfResourceCustomizationUUID; + } + public void setVnfResourceCustomizationUUID(String vnfResourceCustomizationUUID) { + this.vnfResourceCustomizationUUID = vnfResourceCustomizationUUID; + } + public String getCvnfcCustomizationUUID() { + return cvnfcCustomizationUUID; + } + public void setCvnfcCustomizationUUID(String cvnfcCustomizationUUID) { + this.cvnfcCustomizationUUID = cvnfcCustomizationUUID; + } + + +} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java index 36a24bd1e1..be73b37f85 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java @@ -35,10 +35,11 @@ public class ExecuteBuildingBlock implements Serializable{ private String resourceId; private String requestAction; private String vnfType; - private boolean aLaCarte; - private boolean homing; + private Boolean aLaCarte; + private Boolean homing; private WorkflowResourceIds workflowResourceIds; private RequestDetails requestDetails; + private ConfigurationResourceKeys configurationResourceKeys; public BuildingBlock getBuildingBlock() { return buildingBlock; @@ -70,10 +71,10 @@ public class ExecuteBuildingBlock implements Serializable{ public void setRequestAction(String requestAction) { this.requestAction = requestAction; } - public boolean isaLaCarte() { + public Boolean isaLaCarte() { return aLaCarte; } - public void setaLaCarte(boolean aLaCarte) { + public void setaLaCarte(Boolean aLaCarte) { this.aLaCarte = aLaCarte; } public String getVnfType() { @@ -82,10 +83,10 @@ public class ExecuteBuildingBlock implements Serializable{ public void setVnfType(String vnfType) { this.vnfType = vnfType; } - public boolean isHoming() { + public Boolean isHoming() { return homing; } - public void setHoming(boolean homing) { + public void setHoming(Boolean homing) { this.homing = homing; } public WorkflowResourceIds getWorkflowResourceIds() { @@ -100,4 +101,10 @@ public class ExecuteBuildingBlock implements Serializable{ public void setRequestDetails(RequestDetails requestDetails) { this.requestDetails = requestDetails; } + public ConfigurationResourceKeys getConfigurationResourceKeys() { + return configurationResourceKeys; + } + public void setConfigurationResourceKeys(ConfigurationResourceKeys configurationResourceKeys) { + this.configurationResourceKeys = configurationResourceKeys; + } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/OrchestrationContext.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/OrchestrationContext.java index d594c73638..8f1262f70e 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/OrchestrationContext.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/OrchestrationContext.java @@ -32,13 +32,13 @@ public class OrchestrationContext implements Serializable { private static final long serialVersionUID = 6843015923244810369L; @JsonProperty("is-rollback-enabled") - private boolean isRollbackEnabled; + private Boolean isRollbackEnabled; - public boolean getIsRollbackEnabled() { + public Boolean getIsRollbackEnabled() { return this.isRollbackEnabled; } - public void setIsRollbackEnabled(boolean isRollbackEnabled) { + public void setIsRollbackEnabled(Boolean isRollbackEnabled) { this.isRollbackEnabled = isRollbackEnabled; } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java index 7715651b68..d37c8d13f3 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/generalobjects/RequestContext.java @@ -21,7 +21,10 @@ package org.onap.so.bpmn.servicedecomposition.generalobjects; import java.io.Serializable; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; @@ -51,6 +54,8 @@ public class RequestContext implements Serializable{ private String msoRequestId; @JsonProperty("requestParameters") private RequestParameters requestParameters; + @JsonProperty("configurationParameters") + private List<Map<String, String>> configurationParameters = new ArrayList<>(); public String getServiceURI() { return serviceURI; @@ -112,4 +117,10 @@ public class RequestContext implements Serializable{ public void setRequestParameters(RequestParameters requestParameters) { this.requestParameters = requestParameters; } + public List<Map<String, String>> getConfigurationParameters() { + return configurationParameters; + } + public void setConfigurationParameters(List<Map<String, String>> configurationParameters) { + this.configurationParameters = configurationParameters; + } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/SolutionInfo.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/SolutionInfo.java index 17e42b4396..3c8f0e933f 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/SolutionInfo.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/SolutionInfo.java @@ -33,28 +33,28 @@ public class SolutionInfo implements Serializable { private static final long serialVersionUID = 6903399488466840832L; @JsonProperty("solution-id") //identifies which solution - private int solutionId; + private Integer solutionId; @JsonProperty("homed") - private boolean homed; + private Boolean homed; @JsonProperty("is-rehome") - private boolean isRehome; + private Boolean isRehome; @JsonProperty("targeted-cloud") private CloudRegion targetedCloudRegion; - public boolean isHomed() { + public Boolean isHomed() { return homed; } - public void setHomed(boolean homed) { + public void setHomed(Boolean homed) { this.homed = homed; } - public boolean isRehome() { + public Boolean isRehome() { return isRehome; } - public void setRehome(boolean isRehome) { + public void setRehome(Boolean isRehome) { this.isRehome = isRehome; } @@ -63,7 +63,7 @@ public class SolutionInfo implements Serializable { * given resource or resource pair. * i.e. 1, 2, 3.... */ - public int getSolutionId() { + public Integer getSolutionId() { return solutionId; } @@ -72,7 +72,7 @@ public class SolutionInfo implements Serializable { * given resource or resource pair. * i.e. 1, 2, 3.... */ - public void setSolutionId(int solutionId) { + public void setSolutionId(Integer solutionId) { this.solutionId = solutionId; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java index 349010781d..cb6fabde30 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java @@ -43,7 +43,7 @@ public class ModelInfoCollection implements Serializable { @JsonProperty("description") private String description; @JsonProperty("quantity") - private int quantity; + private Integer quantity; public String getModelCustomizationUUID() { return modelCustomizationUUID; @@ -87,10 +87,10 @@ public class ModelInfoCollection implements Serializable { public void setDescription(String description) { this.description = description; } - public int getQuantity() { + public Integer getQuantity() { return quantity; } - public void setQuantity(int quantity) { + public void setQuantity(Integer quantity) { this.quantity = quantity; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java index 9d3aa5934b..87168107e1 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java @@ -34,6 +34,8 @@ public class ModelInfoConfiguration implements Serializable{ private String modelVersionId; @JsonProperty("model-customization-id") private String modelCustomizationId; + @JsonProperty("policy-name") + private String policyName; public String getModelInvariantId() { return modelInvariantId; @@ -53,4 +55,10 @@ public class ModelInfoConfiguration implements Serializable{ public void setModelCustomizationId(String modelCustomizationId) { this.modelCustomizationId = modelCustomizationId; } + public String getPolicyName() { + return policyName; + } + public void setPolicyName(String policyName) { + this.policyName = policyName; + } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java index b5203c676a..6d5fb2f825 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java @@ -49,6 +49,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription; import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; +import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; @@ -71,6 +72,7 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus; import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.VfModuleCustomization; import org.onap.so.db.catalog.beans.VnfResourceCustomization; +import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization; import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization; import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.logger.MsoLogger; @@ -141,8 +143,8 @@ public class BBInputSetup implements JavaDelegate { String resourceId = executeBB.getResourceId(); String requestAction = executeBB.getRequestAction(); String vnfType = executeBB.getVnfType(); - boolean aLaCarte = executeBB.isaLaCarte(); - boolean homing = executeBB.isHoming(); + boolean aLaCarte = Boolean.TRUE.equals(executeBB.isaLaCarte()); + boolean homing = Boolean.TRUE.equals(executeBB.isHoming()); Map<ResourceKey, String> lookupKeyMap = new HashMap<>(); outputBB = this.getGBB(executeBB, lookupKeyMap, requestAction, aLaCarte, resourceId, vnfType); ObjectMapper mapper = new ObjectMapper(); @@ -267,32 +269,24 @@ public class BBInputSetup implements JavaDelegate { } protected void populateConfiguration(ModelInfo modelInfo, Service service, String bbName, - ServiceInstance serviceInstance, Map<ResourceKey, String> lookupKeyMap, String resourceId, String instanceName) { - boolean foundByName = false; - boolean foundById = false; - for (Configuration configuration : serviceInstance.getConfigurations()) { + ServiceInstance serviceInstance, Map<ResourceKey, String> lookupKeyMap, String resourceId, String instanceName, ConfigurationResourceKeys configurationResourceKeys) { + Configuration configuration = null; + for (Configuration configurationTemp : serviceInstance.getConfigurations()) { if (lookupKeyMap.get(ResourceKey.CONFIGURATION_ID) != null - && configuration.getConfigurationId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.CONFIGURATION_ID))) { - foundById = true; + && configurationTemp.getConfigurationId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.CONFIGURATION_ID))) { + configuration = configurationTemp; org.onap.aai.domain.yang.Configuration aaiConfiguration = bbInputSetupUtils.getAAIConfiguration(configuration.getConfigurationId()); if(aaiConfiguration!=null){ modelInfo.setModelCustomizationUuid(aaiConfiguration.getModelCustomizationId()); } - this.mapCatalogConfiguration(configuration, modelInfo, service); - } else if (instanceName != null && configuration.getConfigurationName().equalsIgnoreCase(instanceName)) { - foundByName = true; - lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, configuration.getConfigurationId()); - org.onap.aai.domain.yang.Configuration aaiConfiguration = bbInputSetupUtils.getAAIConfiguration(configuration.getConfigurationId()); - if(aaiConfiguration!=null){ - modelInfo.setModelCustomizationUuid(aaiConfiguration.getModelCustomizationId()); - } - this.mapCatalogConfiguration(configuration, modelInfo, service); } } - if (!foundByName && !foundById && bbName.equalsIgnoreCase(AssignFlows.FABRIC_CONFIGURATION.toString())) { - Configuration configuration = this.createConfiguration(lookupKeyMap, instanceName, resourceId); + if (configuration == null && bbName.equalsIgnoreCase(AssignFlows.FABRIC_CONFIGURATION.toString())) { + configuration = this.createConfiguration(lookupKeyMap, instanceName, resourceId); serviceInstance.getConfigurations().add(configuration); - this.mapCatalogConfiguration(configuration, modelInfo, service); + } + if(configuration != null) { + this.mapCatalogConfiguration(configuration, modelInfo, service, configurationResourceKeys); } } @@ -306,11 +300,28 @@ public class BBInputSetup implements JavaDelegate { return configuration; } - protected void mapCatalogConfiguration(Configuration configuration, ModelInfo modelInfo, Service service) { + protected void mapCatalogConfiguration(Configuration configuration, ModelInfo modelInfo, Service service, ConfigurationResourceKeys configurationResourceKeys) { ConfigurationResourceCustomization configurationResourceCustomization = findConfigurationResourceCustomization(modelInfo, service); - if (configurationResourceCustomization != null) { - configuration.setModelInfoConfiguration(this.mapperLayer.mapCatalogConfigurationToConfiguration(configurationResourceCustomization)); + VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = + findVnfVfmoduleCvnfcConfigurationCustomization(configurationResourceKeys.getVfModuleCustomizationUUID(), + configurationResourceKeys.getVnfResourceCustomizationUUID(), configurationResourceKeys.getCvnfcCustomizationUUID(), configurationResourceCustomization); + if (configurationResourceCustomization != null && vnfVfmoduleCvnfcConfigurationCustomization != null) { + configuration.setModelInfoConfiguration(this.mapperLayer.mapCatalogConfigurationToConfiguration(configurationResourceCustomization + , vnfVfmoduleCvnfcConfigurationCustomization)); + } + } + + protected VnfVfmoduleCvnfcConfigurationCustomization findVnfVfmoduleCvnfcConfigurationCustomization(String vfModuleCustomizationUUID, + String vnfResourceCustomizationUUID, String cvnfcCustomizationUUID, ConfigurationResourceCustomization configurationResourceCustomization) { + for(VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization : + configurationResourceCustomization.getConfigurationResource().getVnfVfmoduleCvnfcConfigurationCustomization()) { + if(vnfVfmoduleCvnfcConfigurationCustomization.getVfModuleCustomization().getModelCustomizationUUID().equalsIgnoreCase(vfModuleCustomizationUUID) + && vnfVfmoduleCvnfcConfigurationCustomization.getVnfResourceCustomization().getModelCustomizationUUID().equalsIgnoreCase(vnfResourceCustomizationUUID) + && vnfVfmoduleCvnfcConfigurationCustomization.getCvnfcCustomization().getModelCustomizationUUID().equalsIgnoreCase(cvnfcCustomizationUUID)) { + return vnfVfmoduleCvnfcConfigurationCustomization; + } } + return null; } protected ConfigurationResourceCustomization findConfigurationResourceCustomization(ModelInfo modelInfo, Service service) { @@ -346,13 +357,15 @@ public class BBInputSetup implements JavaDelegate { ModelInfo vnfModelInfo = new ModelInfo(); vnfModelInfo.setModelCustomizationUuid(vnfModelCustomizationUUID); this.mapCatalogVnf(tempVnf, vnfModelInfo, service); - for(VolumeGroup volumeGroup : tempVnf.getVolumeGroups()) { - String volumeGroupCustId = - this.bbInputSetupUtils.getAAIVolumeGroup(CLOUD_OWNER, - cloudConfiguration.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId()).getModelCustomizationId(); - if(modelInfo.getModelCustomizationId().equalsIgnoreCase(volumeGroupCustId)) { - lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, volumeGroup.getVolumeGroupId()); - break; + if (lookupKeyMap.get(ResourceKey.VOLUME_GROUP_ID) == null) { + for(VolumeGroup volumeGroup : tempVnf.getVolumeGroups()) { + String volumeGroupCustId = + this.bbInputSetupUtils.getAAIVolumeGroup(CLOUD_OWNER, + cloudConfiguration.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId()).getModelCustomizationId(); + if(modelInfo.getModelCustomizationId().equalsIgnoreCase(volumeGroupCustId)) { + lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, volumeGroup.getVolumeGroupId()); + break; + } } } break; @@ -705,7 +718,7 @@ public class BBInputSetup implements JavaDelegate { } } ServiceInstance serviceInstance = this.getALaCarteServiceInstance(service, requestDetails, customer, - project, owningEntity, lookupKeyMap, resourceId, executeBB.isaLaCarte(), + project, owningEntity, lookupKeyMap, resourceId, Boolean.TRUE.equals(executeBB.isaLaCarte()), executeBB.getBuildingBlock().getBpmnFlowName()); return this.populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction, customer); } else { @@ -877,7 +890,7 @@ public class BBInputSetup implements JavaDelegate { if (bbName.contains(NETWORK) && !bbName.contains(NETWORK_COLLECTION)) { String networkId = lookupKeyMap.get(ResourceKey.NETWORK_ID); ModelInfo networkModelInfo = new ModelInfo(); - if(!executeBB.getBuildingBlock().getIsVirtualLink()) { + if((!Boolean.TRUE.equals(executeBB.getBuildingBlock().getIsVirtualLink()))) { NetworkResourceCustomization networkCust = getNetworkCustomizationByKey(key, service); if (networkCust != null) { networkModelInfo.setModelCustomizationUuid(networkCust.getModelCustomizationUUID()); @@ -888,18 +901,19 @@ public class BBInputSetup implements JavaDelegate { } } else { msoLogger.debug("Orchestrating on Collection Network Resource Customization"); - serviceInstance.getNetworks().add(getVirtualLinkL3Network(lookupKeyMap, bbName, key, networkId)); + CollectionNetworkResourceCustomization collectionNetworkResourceCust = bbInputSetupUtils.getCatalogCollectionNetworkResourceCustByID(key); + L3Network l3Network = getVirtualLinkL3Network(lookupKeyMap, bbName, key, networkId, collectionNetworkResourceCust, serviceInstance); + NetworkResourceCustomization networkResourceCustomization = + mapperLayer.mapCollectionNetworkResourceCustToNetworkResourceCust(collectionNetworkResourceCust); + if(l3Network != null) { + l3Network.setModelInfoNetwork(mapperLayer.mapCatalogNetworkToNetwork(networkResourceCustomization)); + } } } else if(bbName.contains("Configuration")) { String configurationId = lookupKeyMap.get(ResourceKey.CONFIGURATION_ID); ModelInfo configurationModelInfo = new ModelInfo(); configurationModelInfo.setModelCustomizationUuid(key); - ConfigurationResourceCustomization configurationCust = findConfigurationResourceCustomization(configurationModelInfo, service); - if(configurationCust != null) { - this.populateConfiguration(configurationModelInfo, service, bbName, serviceInstance, lookupKeyMap, configurationId, null); - } else { - msoLogger.debug("Could not find a configuration customization with key: " + key); - } + this.populateConfiguration(configurationModelInfo, service, bbName, serviceInstance, lookupKeyMap, configurationId, null, executeBB.getConfigurationResourceKeys()); } if (executeBB.getWorkflowResourceIds() != null) { this.populateNetworkCollectionAndInstanceGroupAssign(service, bbName, serviceInstance, @@ -909,15 +923,20 @@ public class BBInputSetup implements JavaDelegate { } protected L3Network getVirtualLinkL3Network(Map<ResourceKey, String> lookupKeyMap, String bbName, String key, - String networkId) { - CollectionNetworkResourceCustomization collectionNetworkResourceCust = bbInputSetupUtils.getCatalogCollectionNetworkResourceCustByID(key); - if(collectionNetworkResourceCust != null && (bbName.equalsIgnoreCase(AssignFlows.NETWORK_A_LA_CARTE.toString()) + String networkId, CollectionNetworkResourceCustomization collectionNetworkResourceCust, ServiceInstance serviceInstance) { + if(collectionNetworkResourceCust != null) { + if((bbName.equalsIgnoreCase(AssignFlows.NETWORK_A_LA_CARTE.toString()) || bbName.equalsIgnoreCase(AssignFlows.NETWORK_MACRO.toString()))) { - NetworkResourceCustomization networkResourceCustomization = - mapperLayer.mapCollectionNetworkResourceCustToNetworkResourceCust(collectionNetworkResourceCust); - L3Network l3Network = createNetwork(lookupKeyMap, null, networkId, null); - l3Network.setModelInfoNetwork(mapperLayer.mapCatalogNetworkToNetwork(networkResourceCustomization)); - return l3Network; + L3Network network = createNetwork(lookupKeyMap, null, networkId, null); + serviceInstance.getNetworks().add(network); + return network; + } else { + for (L3Network network : serviceInstance.getNetworks()) { + if (network.getNetworkId().equalsIgnoreCase(networkId)) { + return network; + } + } + } } return null; } @@ -1017,7 +1036,7 @@ public class BBInputSetup implements JavaDelegate { .getModelCustomizationId(); ModelInfo modelInfo = new ModelInfo(); modelInfo.setModelCustomizationUuid(configurationCustUUID); - this.mapCatalogConfiguration(configuration, modelInfo, service); + this.mapCatalogConfiguration(configuration, modelInfo, service, executeBB.getConfigurationResourceKeys()); break; } } @@ -1085,7 +1104,7 @@ public class BBInputSetup implements JavaDelegate { configurationModelInfo.setModelCustomizationUuid(key); ConfigurationResourceCustomization configurationCust = findConfigurationResourceCustomization(configurationModelInfo, service); if(configurationCust != null) { - this.populateConfiguration(configurationModelInfo, service, bbName, serviceInstance, lookupKeyMap, configurationId, null); + this.populateConfiguration(configurationModelInfo, service, bbName, serviceInstance, lookupKeyMap, configurationId, null, executeBB.getConfigurationResourceKeys()); } else { msoLogger.debug("Could not find a configuration customization with key: " + key); } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java index c2161a4fee..877d5bb88f 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java @@ -76,6 +76,7 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus; import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.VfModuleCustomization; import org.onap.so.db.catalog.beans.VnfResourceCustomization; +import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization; import org.onap.so.logger.MsoLogger; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.so.serviceinstancebeans.RequestDetails; @@ -454,11 +455,13 @@ public class BBInputSetupMapperLayer { } protected ModelInfoConfiguration mapCatalogConfigurationToConfiguration( - ConfigurationResourceCustomization configurationResourceCustomization) { + ConfigurationResourceCustomization configurationResourceCustomization, + VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization) { ModelInfoConfiguration modelInfoConfiguration = new ModelInfoConfiguration(); modelInfoConfiguration.setModelVersionId(configurationResourceCustomization.getConfigurationResource().getModelUUID()); modelInfoConfiguration.setModelCustomizationId(configurationResourceCustomization.getModelCustomizationUUID()); modelInfoConfiguration.setModelInvariantId(configurationResourceCustomization.getConfigurationResource().getModelInvariantUUID()); + modelInfoConfiguration.setPolicyName(vnfVfmoduleCvnfcConfigurationCustomization.getPolicyName()); return modelInfoConfiguration; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java index 4b85538428..84ecfc7576 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java @@ -45,7 +45,7 @@ import org.onap.so.client.aai.AAIObjectType; 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.client.db.request.RequestsDbClient; + import org.onap.so.client.graphinventory.entities.uri.Depth; import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization; import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; @@ -54,6 +54,7 @@ import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization; import org.onap.so.db.catalog.client.CatalogDbClient; import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.logger.MsoLogger; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.so.serviceinstancebeans.RequestDetails; diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java index 9feee14640..8fae2816b2 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java @@ -31,12 +31,13 @@ import org.onap.so.bpmn.core.json.JsonUtils; import org.onap.so.client.appc.ApplicationControllerSupport.StatusCategory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; - +@Component public class ApplicationControllerAction { protected ApplicationControllerOrchestrator client = new ApplicationControllerOrchestrator(); private String errorCode = "1002"; diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/db/request/RequestsDbClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/db/request/RequestsDbClient.java deleted file mode 100644 index 61869ca322..0000000000 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/db/request/RequestsDbClient.java +++ /dev/null @@ -1,86 +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.client.db.request; - -import java.io.IOException; -import java.net.URI; - -import org.onap.so.db.request.beans.InfraActiveRequests; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpRequest; -import org.springframework.http.client.ClientHttpRequestExecution; -import org.springframework.http.client.ClientHttpRequestInterceptor; -import org.springframework.http.client.ClientHttpResponse; -import org.springframework.stereotype.Component; -import org.springframework.web.client.RestTemplate; - -import uk.co.blackpepper.bowman.Client; -import uk.co.blackpepper.bowman.ClientFactory; -import uk.co.blackpepper.bowman.Configuration; -import uk.co.blackpepper.bowman.RestTemplateConfigurer; - -@Component("RequestDbClient") -public class RequestsDbClient { - - private Client<InfraActiveRequests> infraActiveRequestClient; - - @Value("${mso.adapters.db.spring.endpoint}") - private String endpoint; - - @Value("${mso.db.auth}") - private String msoAdaptersAuth; - - public RequestsDbClient() { - ClientFactory clientFactory = Configuration.builder().setRestTemplateConfigurer(new RestTemplateConfigurer() { - - public void configure(RestTemplate restTemplate) { - - restTemplate.getInterceptors().add(new ClientHttpRequestInterceptor() { - - public ClientHttpResponse intercept(HttpRequest request, byte[] body, - ClientHttpRequestExecution execution) throws IOException { - - request.getHeaders().add("Authorization", msoAdaptersAuth); - return execution.execute(request, body); - } - }); - } - }).build().buildClientFactory(); - infraActiveRequestClient = clientFactory.create(InfraActiveRequests.class); - - } - - public InfraActiveRequests getInfraActiveRequestbyRequestId(String requestId) { - return this.getSingleInfraActiveRequests(this.getUri(endpoint + "/infraActiveRequests/" + requestId)); - } - - protected InfraActiveRequests getSingleInfraActiveRequests(URI uri) { - return infraActiveRequestClient.get(uri); - } - - public void updateInfraActiveRequests(InfraActiveRequests request) { - infraActiveRequestClient.put(request); - } - - protected URI getUri(String uri) { - return URI.create(uri); - } -} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java index c74e81506c..42da72528f 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java @@ -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,9 +37,9 @@ public class ExceptionBuilder { String msg = "Exception in %s.%s "; try{ msoLogger.error(exception); - + String errorVariable = "Error%s%s"; - + StackTraceElement[] trace = Thread.currentThread().getStackTrace(); for (StackTraceElement traceElement : trace) { if (!traceElement.getClassName().equals(this.getClass().getName()) && !traceElement.getClassName().equals(Thread.class.getName())) { @@ -49,7 +49,7 @@ public class ExceptionBuilder { break; } } - + msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, msg.toString()); execution.setVariable(errorVariable, exception.getMessage()); } catch (Exception ex){ diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowProcessorException.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowProcessorException.java new file mode 100644 index 0000000000..64283d78ca --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowProcessorException.java @@ -0,0 +1,39 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.mso.bpmn.common.workflow.service; + +import org.onap.so.bpmn.common.workflow.context.WorkflowResponse; + +/** + * Exception thrown when an error occurs while processing the workflow. + * This encapsulates the workflow response so that the same can be sent back to api handler. + */ +public class WorkflowProcessorException extends RuntimeException { + WorkflowResponse workflowResponse; + + public WorkflowProcessorException(WorkflowResponse workflowResponse) { + this.workflowResponse = workflowResponse; + } + + public WorkflowResponse getWorkflowResponse() { + return workflowResponse; + } +} diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn index 31a981729b..67bd961844 100644 --- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn +++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.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="_EsMs0HcuEeW2U_kkOHX1ZQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" 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="_EsMs0HcuEeW2U_kkOHX1ZQ" 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="CompleteMsoProcess" name="CompleteMsoProcess" isExecutable="true"> <bpmn2:scriptTask id="preProcessRequest" name="Pre-Process Request" scriptFormat="groovy"> <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming> @@ -101,6 +101,7 @@ buildDataErrorMessage.buildDataError(execution, "Complete MSO -- Update DB stat <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" /> <camunda:in variables="all" /> <camunda:out variables="all" /> + <camunda:in businessKey="#{execution.processBusinessKey}" /> </bpmn2:extensionElements> <bpmn2:incoming>SequenceFlow_81</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_13qdn1s</bpmn2:outgoing> diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/DecomposeServiceTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/DecomposeServiceTest.groovy new file mode 100644 index 0000000000..5deec5b434 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/DecomposeServiceTest.groovy @@ -0,0 +1,76 @@ +/*- + * ============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.junit.Before +import org.mockito.MockitoAnnotations +import org.onap.so.bpmn.core.domain.ModelInfo +import org.onap.so.bpmn.core.domain.NetworkResource +import org.onap.so.bpmn.core.domain.ServiceDecomposition +import org.onap.so.bpmn.core.json.DecomposeJsonUtil +import org.onap.so.bpmn.core.domain.ServiceInstance + +import org.onap.so.bpmn.mock.FileUtil +import static org.mockito.Mockito.* +import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity +import static org.junit.Assert.*; +import org.junit.Test; +import static com.shazam.shazamcrest.MatcherAssert.assertThat; +import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; + +class DecomposeServiceTest { + + @Test + public void testDecomposeService() { + + String catalogDbResponse = FileUtil.readResourceFile("__files/decomposition/catalogDbResponse.json"); + + ServiceDecomposition serviceDecomposition = new ServiceDecomposition(); + ServiceInstance serviceInstance = new ServiceInstance(); + serviceInstance.setInstanceId("serviceInstanceID"); + serviceDecomposition.setServiceType(""); + serviceDecomposition.setServiceRole(""); + + ArrayList networkResources = new ArrayList(); + NetworkResource networkResource = new NetworkResource(); + networkResource.setNetworkType("testNetworkType"); + networkResource.setNetworkRole("testNetworkRole"); + networkResource.setNetworkScope("testNetworkScope"); + networkResource.setToscaNodeType("testToscaModelType") + networkResource.setNetworkTechnology("testNetworkTechnology"); + ModelInfo modelInfo = new ModelInfo(); + modelInfo.setModelName("testModleName"); + modelInfo.setModelUuid("testModelUuid") + modelInfo.setModelInvariantUuid("testModelInvariantId") + modelInfo.setModelVersion("testModelVersion"); + modelInfo.setModelCustomizationUuid("testModelCustomizationUuid"); + modelInfo.setModelInstanceName("testModelInstanceName"); + networkResource.setModelInfo(modelInfo); + + networkResources.add(networkResource); + serviceDecomposition.setNetworkResources(networkResources) + serviceDecomposition.setServiceInstance(serviceInstance); + + ServiceDecomposition serviceDecompositionExtracted = DecomposeJsonUtil.jsonToServiceDecomposition(catalogDbResponse, "serviceInstanceID") + + assertThat(serviceDecompositionExtracted, sameBeanAs(serviceDecomposition).ignoring("modelInfo").ignoring("vnfResources").ignoring("allottedResources").ignoring("networkResources.resourceId")); + } +} diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BaseTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BaseTest.java index d2f1186ad0..119d3b1e2d 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BaseTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BaseTest.java @@ -32,6 +32,7 @@ import org.camunda.bpm.engine.RuntimeService; import org.camunda.bpm.model.bpmn.Bpmn; import org.camunda.bpm.model.bpmn.BpmnModelInstance; import org.junit.Before; +import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.onap.so.bpmn.common.InjectionHelper; import org.onap.so.bpmn.common.MockLoggerDelegate; @@ -40,6 +41,7 @@ import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupMapperLayer; import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils; import org.onap.so.client.exception.ExceptionBuilder; import org.onap.so.db.catalog.client.CatalogDbClient; +import org.onap.so.test.categories.SpringAware; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.embedded.LocalServerPort; @@ -62,6 +64,7 @@ import com.github.tomakehurst.wiremock.client.WireMock; @ActiveProfiles("test") @ContextConfiguration @AutoConfigureWireMock(port = 0) +@Category(SpringAware.class) public abstract class BaseTest extends BuildingBlockTestDataSetup { diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java index a983193ca3..5be879560f 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/BuildingBlockTestDataSetup.java @@ -665,4 +665,27 @@ public class BuildingBlockTestDataSetup{ return ar; } + + public Configuration setConfiguration () { + Configuration config = new Configuration(); + config.setConfigurationId("testConfigurationId"); + ModelInfoConfiguration modelInfoConfig = new ModelInfoConfiguration(); + modelInfoConfig.setModelCustomizationId("modelCustomizationId"); + modelInfoConfig.setModelVersionId("modelVersionId"); + modelInfoConfig.setModelInvariantId("modelInvariantId"); + modelInfoConfig.setPolicyName("policyName"); + config.setModelInfoConfiguration(modelInfoConfig); + + List<Configuration> configurations = new ArrayList<>(); + configurations.add(config); + ServiceInstance serviceInstance = new ServiceInstance(); + try { + serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + } catch(BBObjectNotFoundException e) { + serviceInstance = setServiceInstance(); + } + lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "testConfigurationId"); + serviceInstance.setConfigurations(configurations); + return config; + } }
\ No newline at end of file diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/NonSpringSuite.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/NonSpringSuite.java new file mode 100644 index 0000000000..ee2848cf3a --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/NonSpringSuite.java @@ -0,0 +1,35 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so; + +import org.junit.runner.RunWith; +import org.onap.so.test.categories.SpringAware; + +import com.googlecode.junittoolbox.ExcludeCategories; +import com.googlecode.junittoolbox.SuiteClasses; +import com.googlecode.junittoolbox.WildcardPatternSuite; + +@RunWith(WildcardPatternSuite.class) +@ExcludeCategories({SpringAware.class}) +@SuiteClasses({"**/*Test.class", "!**/bpmn/common/scripts/**/*Test.class"}) +public class NonSpringSuite { + +} diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java index ba8caee058..d1559c2ed1 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java @@ -22,8 +22,6 @@ package org.onap.so; import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; -import org.onap.so.requestsdb.RequestsDBHelper; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; @@ -35,9 +33,7 @@ import org.springframework.context.annotation.Profile; @Profile("test") @EnableProcessApplication("MSO CommonBPMN Test Application") @ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { - @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)}) public class TestApplication { public static void main(String... args) { SpringApplication.run(TestApplication.class, args); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java index 80b978e4fd..a08d8ca25d 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java @@ -66,7 +66,7 @@ public class PayloadClientTest { @Test public void healthCheckFormatTest() throws Exception { - String payloadResult = "{\"request-parameters\":{\"vnf-name\":\"vnfName1\"},\"configuration-parameters\":{\"vnf_name\":\"vnfName1\"}}"; + String payloadResult = "{\\\"request-parameters\\\":{\\\"vnf-host-ip-address\\\":\\\"vnfHostIpAddress1\\\"}}"; Optional<String> payloadClient = PayloadClient.healthCheckFormat("vnfName1", "vnfHostIpAddress1"); assertEquals(payloadResult, payloadClient.get()); } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java index 514d93bdf8..45bbe9e5d8 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java @@ -29,9 +29,7 @@ import org.camunda.bpm.application.ProcessApplicationInfo; import org.camunda.bpm.engine.ProcessEngine; import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; import org.onap.so.logger.MsoLogger; -import org.onap.so.requestsdb.RequestsDBHelper; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -51,9 +49,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; @EnableProcessApplication("MSO Common Application") @EnableAsync @ComponentScan(basePackages = { "org.onap" }, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { - @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)}) public class MSOCommonApplication { private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/BaseClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/baseclient/BaseClientTest.java index a564d8a21d..f84a76468f 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/BaseClientTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/baseclient/BaseClientTest.java @@ -1,9 +1,28 @@ -package org.onap.so.client.sdnc; +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.bpmn.common.baseclient; import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; -import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertThat; @@ -11,25 +30,23 @@ import java.util.Map; import javax.ws.rs.core.UriBuilder; -import org.junit.Rule; import org.junit.Test; +import org.onap.so.BaseTest; import org.springframework.core.ParameterizedTypeReference; -import com.github.tomakehurst.wiremock.junit.WireMockRule; +import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; import wiremock.org.apache.http.entity.ContentType; -public class BaseClientTest { - - @Rule - public WireMockRule wm = new WireMockRule(options().dynamicPort()); - + +public class BaseClientTest extends BaseTest { + @Test public void verifyString() { BaseClient<String, String> client = new BaseClient<>(); String response = "{\"hello\" : \"world\"}"; - client.setTargetUrl(UriBuilder.fromUri("http://localhost/test").port(wm.port()).build().toString()); - wm.stubFor(get(urlEqualTo("/test")) + client.setTargetUrl(UriBuilder.fromUri("http://localhost/test").port(Integer.parseInt(wireMockPort)).build().toString()); + stubFor(get(urlEqualTo("/test")) .willReturn(aResponse().withStatus(200).withBody(response).withHeader("Content-Type", ContentType.APPLICATION_JSON.toString()))); String result = client.get("", new ParameterizedTypeReference<String>() {}); @@ -40,8 +57,8 @@ public class BaseClientTest { public void verifyMap() { BaseClient<String, Map<String, Object>> client = new BaseClient<>(); String response = "{\"hello\" : \"world\"}"; - client.setTargetUrl(UriBuilder.fromUri("http://localhost/test").port(wm.port()).build().toString()); - wm.stubFor(get(urlEqualTo("/test")) + client.setTargetUrl(UriBuilder.fromUri("http://localhost/test").port(Integer.parseInt(wireMockPort)).build().toString()); + stubFor(get(urlEqualTo("/test")) .willReturn(aResponse().withStatus(200).withBody(response).withHeader("Content-Type", ContentType.APPLICATION_JSON.toString()))); Map<String, Object> result = client.get("", new ParameterizedTypeReference<Map<String, Object>>() {}); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/recipe/ResourceInputTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/recipe/ResourceInputTest.java index 70191311b2..5da47c973e 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/recipe/ResourceInputTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/recipe/ResourceInputTest.java @@ -22,8 +22,8 @@ package org.onap.so.bpmn.common.recipe; import static org.junit.Assert.assertEquals; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.bpmn.core.domain.ModelInfo; +import org.onap.so.BaseTest; public class ResourceInputTest extends BaseTest{ diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java index c7d1a7c81f..3b41ff8337 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java @@ -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. @@ -44,16 +44,6 @@ public class StubResponseAAI { /** - * Tunnel-XConnect Mock Stub Response - */ - public static void MockPutTunnelXConnect(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId, String tunnelId){ - stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId + "/allotted-resources/allotted-resource/" + allottedResourceId + "/tunnel-xconnects/tunnel-xconnect/" + tunnelId)) - .willReturn(aResponse() - .withStatus(200))); - } - - - /** * Allotted Resource Mock StubResponses below */ public static void MockGetAllottedResource(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId, String responseFile) { @@ -63,7 +53,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockPutAllottedResource(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId) { stubFor(put(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId + "/allotted-resources/allotted-resource/" + allottedResourceId)) .willReturn(aResponse() @@ -75,13 +65,13 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(500))); } - + public static void MockDeleteAllottedResource(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId, String resourceVersion) { stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId + "/allotted-resources/allotted-resource/" + allottedResourceId + "[?]resource-version=" + resourceVersion)) .willReturn(aResponse() .withStatus(204))); } - + public static void MockPatchAllottedResource(String globalCustId, String subscriptionType, String serviceInstanceId, String allottedResourceId) { stubFor(patch(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType + "/service-instances/service-instance/" + serviceInstanceId + "/allotted-resources/allotted-resource/" + allottedResourceId)) .willReturn(aResponse() @@ -183,26 +173,26 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(204))); } - + public static void MockGetServiceInstance(String customer, String serviceSubscription, String serviceInstanceId, String resourceVersion, int statusCode){ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "/service-instances/service-instance/" + serviceInstanceId + "[?]resource-version=" + resourceVersion)) .willReturn(aResponse() .withStatus(statusCode))); } - + public static void MockGetServiceInstance(String customer, String serviceSubscription, int statusCode){ stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription)) .willReturn(aResponse() .withStatus(200) .withHeader("Content-Type", "text/xml"))); } - + public static void MockDeleteServiceInstance(String customer, String serviceSubscription, String serviceInstanceId, String resourceVersion, int statusCode){ stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "/service-instances/service-instance/" + serviceInstanceId + "[?]resource-version=" + resourceVersion)) .willReturn(aResponse() .withStatus(statusCode))); } - + public static void MockDeleteServiceInstance(String customer, String serviceSubscription, String resourceVersion, int statusCode){ stubFor(delete(urlMatching("/aai/v[0-9]+/business/customers/customer/" + customer + "/service-subscriptions/service-subscription/" + serviceSubscription + "[?]resource-version=" +1234)) .willReturn(aResponse() @@ -263,7 +253,7 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(200))); } - + public static void MockGetServiceSubscription(String globalCustId, String subscriptionType, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + globalCustId + "/service-subscriptions/service-subscription/" + subscriptionType)) .willReturn(aResponse() @@ -303,7 +293,7 @@ public class StubResponseAAI { /** * Generic-Vnf Mock StubResponses below */ - + public static void MockGetGenericVnfById(String vnfId, String responseFile){ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "[?]depth=1")) .willReturn(aResponse() @@ -311,7 +301,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetGenericVnfById(String vnfId, String responseFile, int statusCode){ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf" + vnfId)) .willReturn(aResponse() @@ -319,23 +309,23 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetGenericVnfByIdWithPriority(String vnfId, int statusCode, String responseFile) { stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf" + vnfId)) .atPriority(1) .willReturn(aResponse() .withStatus(statusCode) .withHeader("Content-Type", "text/xml") - .withBodyFile(responseFile))); + .withBodyFile(responseFile))); } - + public static void MockGetGenericVnfByIdWithPriority(String vnfId, String vfModuleId, int statusCode, String responseFile, int priority) { stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId)) .atPriority(priority) .willReturn(aResponse() .withStatus(statusCode) .withHeader("Content-Type", "text/xml") - .withBodyFile(responseFile))); + .withBodyFile(responseFile))); } public static void MockGetGenericVnfByIdWithDepth(String vnfId, int depth, String responseFile){ @@ -345,7 +335,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetGenericVnfById_404(String vnfId){ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId)) .willReturn(aResponse() @@ -366,7 +356,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetGenericVnfByNameWithDepth(String vnfName, int depth, String responseFile){ stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf[?]vnf-name=" + vnfName + "[&]depth=" + depth)) .willReturn(aResponse() @@ -404,7 +394,7 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(200))); } - + public static void MockPutGenericVnf(String vnfId, String requestBodyContaining, int statusCode) { stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf" + vnfId)) .withRequestBody(containing(requestBodyContaining)) @@ -417,7 +407,7 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(statusCode))); } - + public static void MockPutGenericVnf_Bad(String vnfId, int statusCode){ stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId)) .willReturn(aResponse() @@ -459,7 +449,7 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(200))); } - + public static void MockGetGenericVceByNameWithDepth(String vnfName, int depth, String responseFile){ stubFor(get(urlMatching("/aai/v[0-9]+/network/vces/vce[?]vnf-name=" + vnfName + "[&]depth=" + depth)) .willReturn(aResponse() @@ -505,7 +495,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkByIdWithDepth(String networkId, String responseFile, String depth) { stubFor(get(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network/" + networkId + "[?]depth=" + depth)) .willReturn(aResponse() @@ -513,7 +503,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkCloudRegion(String responseFile, String cloudRegion) { stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/"+cloudRegion)) .willReturn(aResponse() @@ -521,7 +511,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkByName(String networkName, String responseFile) { stubFor(get(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network[?]network-name="+networkName)) .willReturn(aResponse() @@ -537,7 +527,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkCloudRegion_404(String cloudRegion) { stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/"+cloudRegion)) .willReturn(aResponse() @@ -551,7 +541,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockPutNetwork(String networkPolicyId, String responseFile, int statusCode) { stubFor(put(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/" + networkPolicyId)) .willReturn(aResponse() @@ -559,7 +549,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkName(String networkPolicyName, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network[?]network-name=" + networkPolicyName)) .willReturn(aResponse() @@ -574,8 +564,8 @@ public class StubResponseAAI { .withStatus(200) .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); - } - + } + public static void MockGetNetworkPolicy(String responseFile, String policy) { stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/"+policy + "[?]depth=all")) .willReturn(aResponse() @@ -583,7 +573,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkVpnBinding(String networkBindingId, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/vpn-bindings/vpn-binding/" + networkBindingId)) .willReturn(aResponse() @@ -591,7 +581,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkPolicy(String networkPolicy, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/" + networkPolicy)) .willReturn(aResponse() @@ -599,7 +589,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkTableReference(String responseFile, String tableReference) { stubFor(get(urlMatching("/aai/v[0-9]+/network/route-table-references/route-table-reference/"+tableReference + "[?]depth=all")) .willReturn(aResponse() @@ -607,7 +597,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockPutNetworkIdWithDepth(String responseFile, String networkId, String depth) { stubFor(put(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network/"+networkId+"[?]depth="+depth )) .willReturn(aResponse() @@ -615,7 +605,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkPolicyfqdn(String networkPolicy, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy[?]network-policy-fqdn=" + networkPolicy)) .willReturn(aResponse() @@ -623,7 +613,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetNetworkRouteTable(String networkRouteId, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/route-table-references/route-table-reference/" + networkRouteId)) .willReturn(aResponse() @@ -631,15 +621,15 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockPatchVfModuleId(String vnfId, String vfModuleId) { stubFor(patch(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId)) .willReturn(aResponse() .withStatus(200))); } - + ///////////// - + public static void MockVNFAdapterRestVfModule() { stubFor(put(urlEqualTo("/vnfs/v1/vnfs/skask/vf-modules/supercool")) .willReturn(aResponse() @@ -658,7 +648,7 @@ public class StubResponseAAI { .withStatus(202) .withHeader("Content-Type", "application/xml"))); } - + public static void MockDBUpdateVfModule(){ stubFor(post(urlEqualTo("/dbadapters/RequestsDbAdapter")) .willReturn(aResponse() @@ -666,7 +656,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile("VfModularity/DBUpdateResponse.xml"))); } - + // start of mocks used locally and by other VF Module unit tests public static void MockSDNCAdapterVfModule() { // simplified the implementation to return "success" for all requests @@ -678,7 +668,7 @@ public class StubResponseAAI { .withBodyFile("VfModularity/StandardSDNCSynchResponse.xml"))); } - + // start of mocks used locally and by other VF Module unit tests public static void MockAAIVfModule() { stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool")) @@ -686,7 +676,7 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(200) .withHeader("Content-Type", "text/xml") - .withBodyFile("VfModularity/VfModule-supercool.xml"))); + .withBodyFile("VfModularity/VfModule-supercool.xml"))); stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/lukewarm")) .atPriority(2) .willReturn(aResponse() @@ -758,14 +748,14 @@ public class StubResponseAAI { .withStatus(200))); } - - + + ////////////// /** * Cloud infrastructure below */ - + public static void MockGetCloudRegion(String cloudRegionId, int statusCode, String responseFile) { stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId)) .willReturn(aResponse() @@ -773,14 +763,14 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + /** * Volume Group StubResponse below */ public static void MockGetVolumeGroupById(String cloudRegionId, String volumeGroupId, String responseFile) { MockGetVolumeGroupById(cloudRegionId, volumeGroupId, responseFile, 200); } - + public static void MockGetVolumeGroupById(String cloudRegionId, String volumeGroupId, String responseFile, int responseCode) { stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups/volume-group/" + volumeGroupId)) .willReturn(aResponse() @@ -788,7 +778,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockPutVolumeGroupById(String cloudRegionId, String volumeGroupId, String responseFile, int statusCode) { stubFor(put(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups/volume-group/" + volumeGroupId)) .willReturn(aResponse() @@ -796,7 +786,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetVolumeGroupByName(String cloudRegionId, String volumeGroupName, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups[?]volume-group-name=" + volumeGroupName)) .willReturn(aResponse() @@ -804,7 +794,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockDeleteVolumeGroupById(String cloudRegionId, String volumeGroupId, String resourceVersion, int statusCode) { stubFor(delete(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups/volume-group/" + volumeGroupId + "[?]resource-version=" + resourceVersion)) .willReturn(aResponse() @@ -816,13 +806,13 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(404))); } - + public static void MockDeleteVolumeGroup(String cloudRegionId, String volumeGroupId, String resourceVersion) { stubFor(delete(urlMatching("/aai/v[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/" + cloudRegionId + "/volume-groups/volume-group/" + volumeGroupId + "[?]resource-version=" + resourceVersion)) .willReturn(aResponse() .withStatus(200))); } - + /** * VF-Module StubResponse below * @param statusCode TODO @@ -834,7 +824,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetVfModuleByNameWithDepth(String vnfId, String vfModuleName, int depth, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module[?]vf-module-name=" + vfModuleName + "[?]depth=" + depth)) .willReturn(aResponse() @@ -842,7 +832,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetVfModuleByName(String vnfId, String vfModuleName, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module[?]vf-module-name=" + vfModuleName)) .willReturn(aResponse() @@ -850,7 +840,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "text/xml") .withBodyFile(responseFile))); } - + public static void MockGetVfModuleIdNoResponse(String vnfId, String requestContaining, String vfModuleId) { stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId)) .withRequestBody(containing(requestContaining)) @@ -865,19 +855,19 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(200))); } - + public static void MockPutVfModuleId(String vnfId, String vfModuleId) { stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId)) .willReturn(aResponse() .withStatus(200))); } - + public static void MockPutVfModuleId(String vnfId, String vfModuleId, int returnCode) { stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId)) .willReturn(aResponse() .withStatus(returnCode))); } - + public static void MockDeleteVfModuleId(String vnfId, String vfModuleId, String resourceVersion, int returnCode) { stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/" + vnfId + "/vf-modules/vf-module/" + vfModuleId + "/[?]resource-version=" + resourceVersion)) .willReturn(aResponse() @@ -889,7 +879,7 @@ public class StubResponseAAI { .willReturn(aResponse() .withStatus(statusCode))); } - + /* AAI Pserver Queries */ public static void MockGetPserverByVnfId(String vnfId, String responseFile, int statusCode) { stubFor(put(urlMatching("/aai/v1[0-9]/query.*")) @@ -898,7 +888,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "application/json") .withBodyFile(responseFile))); } - + public static void MockGetGenericVnfsByVnfId(String vnfId, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v1[0-9]/network/generic-vnfs/.*")) .willReturn(aResponse() @@ -906,14 +896,14 @@ public class StubResponseAAI { .withHeader("Content-Type", "application/json; charset=utf-8") .withBodyFile(responseFile))); } - + public static void MockSetInMaintFlagByVnfId(String vnfId, int statusCode) { stubFor(patch(urlMatching("/aai/v1[0-9]/network/generic-vnfs/.*")) .willReturn(aResponse() - .withStatus(statusCode) + .withStatus(statusCode) )); } - + public static void MockSetInMaintFlagByVnfId(String vnfId, String responseFile, int statusCode) { stubFor(post(urlMatching("/aai/v1[0-9]/network/generic-vnfs/.*")) .willReturn(aResponse() @@ -921,7 +911,7 @@ public class StubResponseAAI { .withBodyFile(responseFile) )); } - + public static void MockGetDefaultCloudRegionByCloudRegionId(String cloudRegionId, String responseFile, int statusCode) { stubFor(get(urlMatching("/aai/v1[0-9]+/cloud-infrastructure/cloud-regions/cloud-region/att-aic/"+cloudRegionId + ".*")) .willReturn(aResponse() @@ -929,7 +919,7 @@ public class StubResponseAAI { .withHeader("Content-Type", "application/json; charset=utf-8") .withBodyFile(responseFile))); } - + //// Deprecated Stubs below - to be deleted once unit test that reference them are refactored to use common ones above //// @Deprecated public static void MockGetVceById(){ diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/BBPojoTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/BBPojoTest.java index 801314b2ae..eac6c0a8b7 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/BBPojoTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/BBPojoTest.java @@ -21,7 +21,6 @@ package org.onap.so.bpmn.servicedecomposition; import org.junit.Test; -import org.onap.so.BaseTest; import com.openpojo.reflection.PojoClass; import com.openpojo.reflection.PojoClassFilter; @@ -30,12 +29,13 @@ import com.openpojo.reflection.filters.FilterPackageInfo; import com.openpojo.validation.Validator; import com.openpojo.validation.ValidatorBuilder; import com.openpojo.validation.rule.impl.GetterMustExistRule; +import com.openpojo.validation.rule.impl.NoPrimitivesRule; import com.openpojo.validation.rule.impl.SerializableMustHaveSerialVersionUIDRule; import com.openpojo.validation.test.impl.GetterTester; import com.openpojo.validation.test.impl.SetterTester; -public class BBPojoTest extends BaseTest{ +public class BBPojoTest { private PojoClassFilter filterTestClasses = new FilterTestClasses(); @Test @@ -52,6 +52,7 @@ public class BBPojoTest extends BaseTest{ .with(new GetterMustExistRule()) .with(new SetterTester()) .with(new GetterTester()) + .with(new NoPrimitivesRule()) .with(new SerializableMustHaveSerialVersionUIDRule()) .build(); validator.validate(pojoPackage, new FilterPackageInfo(), filterTestClasses, new FilterNonConcrete()); @@ -62,4 +63,4 @@ public class BBPojoTest extends BaseTest{ return !pojoClass.getSourcePath().contains("/test-classes/"); } } -}
\ No newline at end of file +} diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java index 5f90f1e827..634e0a6c9b 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/ExtractPojosForBBTest.java @@ -30,7 +30,6 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.onap.so.BaseTest; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.common.DelegateExecutionImpl; import org.onap.so.bpmn.servicedecomposition.bbobjects.*; @@ -38,6 +37,7 @@ import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; import org.onap.so.client.exception.BBObjectNotFoundException; +import org.onap.so.BaseTest; public class ExtractPojosForBBTest extends BaseTest{ ExtractPojosForBB extractPojos = new ExtractPojosForBB(); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java index 0abbb2dbe2..33e1390b9c 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java @@ -65,12 +65,15 @@ import org.onap.so.db.catalog.beans.CollectionResourceCustomization; import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; import org.onap.so.db.catalog.beans.ConfigurationResource; import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization; +import org.onap.so.db.catalog.beans.CvnfcCustomization; import org.onap.so.db.catalog.beans.InstanceGroup; import org.onap.so.db.catalog.beans.NetworkResourceCustomization; import org.onap.so.db.catalog.beans.OrchestrationStatus; import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.VfModuleCustomization; import org.onap.so.db.catalog.beans.VnfResourceCustomization; +import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization; +import org.onap.so.db.catalog.beans.VnfcCustomization; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.so.serviceinstancebeans.RequestDetails; @@ -79,7 +82,7 @@ import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; public class BBInputSetupMapperLayerTest { - @InjectMocks + BBInputSetupMapperLayer bbInputSetupMapperLayer = new BBInputSetupMapperLayer(); ObjectMapper mapper = new ObjectMapper(); @@ -613,17 +616,23 @@ public class BBInputSetupMapperLayerTest { String modelCustUUID = "modelCustomizationUUID"; String modelInvariantUUID = "modelInvariantUUID"; String modelVersionUUID = "modelUUID"; + String policyName = "policyName"; ModelInfoConfiguration expected = new ModelInfoConfiguration(); expected.setModelCustomizationId(modelCustUUID); expected.setModelInvariantId(modelInvariantUUID); expected.setModelVersionId(modelVersionUUID); + expected.setPolicyName(policyName); ConfigurationResourceCustomization configurationResourceCustomization = new ConfigurationResourceCustomization(); configurationResourceCustomization.setModelCustomizationUUID(modelCustUUID); configurationResourceCustomization.setConfigurationResource(new ConfigurationResource()); configurationResourceCustomization.getConfigurationResource().setModelInvariantUUID(modelInvariantUUID); configurationResourceCustomization.getConfigurationResource().setModelUUID(modelVersionUUID); + VnfVfmoduleCvnfcConfigurationCustomization policyNameTable = new VnfVfmoduleCvnfcConfigurationCustomization(); + policyNameTable.setCvnfcCustomization(new CvnfcCustomization()); + policyNameTable.getCvnfcCustomization().setVnfcCustomization(new VnfcCustomization()); + policyNameTable.setPolicyName(policyName); - ModelInfoConfiguration actual = bbInputSetupMapperLayer.mapCatalogConfigurationToConfiguration(configurationResourceCustomization ); + ModelInfoConfiguration actual = bbInputSetupMapperLayer.mapCatalogConfigurationToConfiguration(configurationResourceCustomization, policyNameTable); assertThat(actual, sameBeanAs(expected)); } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java index a821d69754..9897c04ad8 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java @@ -66,6 +66,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription; import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock; +import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; @@ -425,7 +426,7 @@ public class BBInputSetupTest { doReturn(customer).when(SPY_bbInputSetup).getCustomerAndServiceSubscription(requestDetails, resourceId); doReturn(serviceInstance).when(SPY_bbInputSetup).getALaCarteServiceInstance(service, requestDetails, customer, - project, owningEntity, lookupKeyMap, resourceId, executeBB.isaLaCarte(), + project, owningEntity, lookupKeyMap, resourceId, Boolean.TRUE.equals(executeBB.isaLaCarte()), executeBB.getBuildingBlock().getBpmnFlowName()); doReturn(expected).when(SPY_bbInputSetup).populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction, customer); @@ -475,7 +476,7 @@ public class BBInputSetupTest { doReturn(customer).when(SPY_bbInputSetup).getCustomerAndServiceSubscription(requestDetails, resourceId); doReturn(serviceSubscription).when(SPY_bbInputSetup).getServiceSubscription(requestDetails, customer); doReturn(serviceInstance).when(SPY_bbInputSetup).getALaCarteServiceInstance(service, requestDetails, customer, - project, owningEntity, lookupKeyMap, resourceId, executeBB.isaLaCarte(), + project, owningEntity, lookupKeyMap, resourceId, Boolean.TRUE.equals(executeBB.isaLaCarte()), executeBB.getBuildingBlock().getBpmnFlowName()); doReturn(expected).when(SPY_bbInputSetup).populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction,customer); @@ -518,7 +519,7 @@ public class BBInputSetupTest { doReturn(customer).when(SPY_bbInputSetup).getCustomerAndServiceSubscription(requestDetails, resourceId); doReturn(serviceSubscription).when(SPY_bbInputSetup).getServiceSubscription(requestDetails, customer); doReturn(serviceInstance).when(SPY_bbInputSetup).getALaCarteServiceInstance(service, requestDetails, customer, - null, null, lookupKeyMap, resourceId, executeBB.isaLaCarte(), + null, null, lookupKeyMap, resourceId, Boolean.TRUE.equals(executeBB.isaLaCarte()), executeBB.getBuildingBlock().getBpmnFlowName()); doReturn(expected).when(SPY_bbInputSetup).populateGBBWithSIAndAdditionalInfo(requestDetails, serviceInstance, executeBB, requestAction,customer); @@ -1074,28 +1075,32 @@ public class BBInputSetupTest { Map<ResourceKey, String> lookupKeyMap = new HashMap<>(); lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "configurationId"); String bbName = AssignFlows.FABRIC_CONFIGURATION.toString(); + ConfigurationResourceKeys configResourceKeys = new ConfigurationResourceKeys(); + configResourceKeys.setCvnfcCustomizationUUID("cvnfcCustomizationUUID"); + configResourceKeys.setVfModuleCustomizationUUID("vfModuleCustomizationUUID"); + configResourceKeys.setVnfResourceCustomizationUUID("vnfResourceCustomizationUUID"); - doNothing().when(SPY_bbInputSetup).mapCatalogConfiguration(configuration, modelInfo, service); + doNothing().when(SPY_bbInputSetup).mapCatalogConfiguration(configuration, modelInfo, service, configResourceKeys); SPY_bbInputSetup.populateConfiguration(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId, - instanceName); - verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(configuration, modelInfo, service); + instanceName, configResourceKeys); + verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(configuration, modelInfo, service, configResourceKeys); lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, null); SPY_bbInputSetup.populateConfiguration(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId, - instanceName); - verify(SPY_bbInputSetup, times(2)).mapCatalogConfiguration(configuration, modelInfo, service); + instanceName, configResourceKeys); + verify(SPY_bbInputSetup, times(2)).mapCatalogConfiguration(configuration, modelInfo, service, configResourceKeys); instanceName = "configurationName2"; resourceId = "resourceId2"; lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "configurationId2"); Configuration configuration2 = SPY_bbInputSetup.createConfiguration(lookupKeyMap, instanceName, resourceId); doReturn(configuration2).when(SPY_bbInputSetup).createConfiguration(lookupKeyMap, instanceName, resourceId); - doNothing().when(SPY_bbInputSetup).mapCatalogConfiguration(configuration2, modelInfo, service); + doNothing().when(SPY_bbInputSetup).mapCatalogConfiguration(configuration2, modelInfo, service, configResourceKeys); SPY_bbInputSetup.populateConfiguration(modelInfo, service, bbName, serviceInstance, lookupKeyMap, resourceId, - instanceName); - verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(configuration2, modelInfo, service); + instanceName, configResourceKeys); + verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(configuration2, modelInfo, service, configResourceKeys); } @Test @@ -1666,6 +1671,12 @@ public class BBInputSetupTest { String vnfType = "vnfType"; Service service = Mockito.mock(Service.class); String requestAction = "createInstance"; + + ConfigurationResourceKeys configResourceKeys = new ConfigurationResourceKeys(); + configResourceKeys.setCvnfcCustomizationUUID("cvnfcCustomizationUUID"); + configResourceKeys.setVfModuleCustomizationUUID("vfModuleCustomizationUUID"); + configResourceKeys.setVnfResourceCustomizationUUID("vnfResourceCustomizationUUID"); + executeBB.setConfigurationResourceKeys(configResourceKeys); doReturn(gBB).when(SPY_bbInputSetup).getGBBALaCarteService(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId); doReturn(request).when(SPY_bbInputSetupUtils).getInfraActiveRequest(executeBB.getRequestId()); @@ -1714,13 +1725,13 @@ public class BBInputSetupTest { doReturn(configurationCustList).when(service).getConfigurationCustomizations(); configurationCustList.add(configurationCust); doNothing().when(SPY_bbInputSetup).populateConfiguration(isA(ModelInfo.class), isA(Service.class), - any(String.class), isA(ServiceInstance.class), any(), any(String.class), any(String.class)); + any(String.class), isA(ServiceInstance.class), any(), any(String.class), any(String.class), isA(ConfigurationResourceKeys.class)); executeBB.getBuildingBlock().setBpmnFlowName("AssignFabricConfigurationBB"); executeBB.getBuildingBlock().setKey("72d9d1cd-f46d-447a-abdb-451d6fb05fa9"); SPY_bbInputSetup.getGBBMacro(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId, vnfType); verify(SPY_bbInputSetup, times(1)).populateConfiguration(isA(ModelInfo.class), isA(Service.class), - any(String.class), isA(ServiceInstance.class), any(), any(String.class), any(String.class)); + any(String.class), isA(ServiceInstance.class), any(), any(String.class), any(String.class), isA(ConfigurationResourceKeys.class)); } @Test @@ -1793,6 +1804,7 @@ public class BBInputSetupTest { doReturn(aaiVnf).when(SPY_bbInputSetupUtils).getAAIGenericVnf(any(String.class)); executeBB.getBuildingBlock().setBpmnFlowName(AssignFlows.NETWORK_MACRO.toString()); executeBB.getBuildingBlock().setKey("ab153b6e-c364-44c0-bef6-1f2982117f04"); + executeBB.getBuildingBlock().setIsVirtualLink(Boolean.FALSE); SPY_bbInputSetup.getGBBMacro(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId, vnfType); verify(SPY_bbInputSetup, times(1)).getGBBMacroNoUserParamsCreate(any(ExecuteBuildingBlock.class), any(), any(String.class), any(String.class), any(GeneralBuildingBlock.class), any(Service.class)); @@ -1998,6 +2010,13 @@ public class BBInputSetupTest { lookupKeyMap.put(ResourceKey.VOLUME_GROUP_ID, "volumeGroupId"); lookupKeyMap.put(ResourceKey.SERVICE_INSTANCE_ID, "serviceInstanceId"); lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "configurationId"); + + ConfigurationResourceKeys configResourceKeys = new ConfigurationResourceKeys(); + configResourceKeys.setCvnfcCustomizationUUID("cvnfcCustomizationUUID"); + configResourceKeys.setVfModuleCustomizationUUID("vfModuleCustomizationUUID"); + configResourceKeys.setVnfResourceCustomizationUUID("vnfResourceCustomizationUUID"); + executeBB.setConfigurationResourceKeys(configResourceKeys); + String resourceId = "123"; String vnfType = "vnfType"; Service service = Mockito.mock(Service.class); @@ -2029,17 +2048,20 @@ public class BBInputSetupTest { doReturn(networkResourceCustomization).when(bbInputSetupMapperLayer).mapCollectionNetworkResourceCustToNetworkResourceCust(collectionNetworkResourceCust); ModelInfoNetwork modelInfoNetwork = Mockito.mock(ModelInfoNetwork.class); doReturn(modelInfoNetwork ).when(bbInputSetupMapperLayer).mapCatalogNetworkToNetwork(networkResourceCustomization); + executeBB.getBuildingBlock().setBpmnFlowName(AssignFlows.NETWORK_MACRO.toString()); executeBB.getBuildingBlock().setKey("ab153b6e-c364-44c0-bef6-1f2982117f04"); executeBB.getBuildingBlock().setIsVirtualLink(true); SPY_bbInputSetup.getGBBMacro(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId, vnfType); verify(SPY_bbInputSetup, times(2)).getGBBMacroNoUserParamsCreate(executeBB, lookupKeyMap, executeBB.getBuildingBlock().getBpmnFlowName(), "ab153b6e-c364-44c0-bef6-1f2982117f04", gBB, service); - executeBB.getBuildingBlock().setBpmnFlowName(AssignFlows.FABRIC_CONFIGURATION.toString()); - executeBB.getBuildingBlock().setKey("modelCustId"); + + executeBB.getBuildingBlock().setBpmnFlowName("CreateNetworkBB"); + executeBB.getBuildingBlock().setKey("ab153b6e-c364-44c0-bef6-1f2982117f04"); + executeBB.getBuildingBlock().setIsVirtualLink(true); SPY_bbInputSetup.getGBBMacro(executeBB, requestDetails, lookupKeyMap, requestAction, resourceId, vnfType); verify(SPY_bbInputSetup, times(1)).getGBBMacroNoUserParamsCreate(executeBB, lookupKeyMap, - executeBB.getBuildingBlock().getBpmnFlowName(), "modelCustId", gBB, service); + executeBB.getBuildingBlock().getBpmnFlowName(), "ab153b6e-c364-44c0-bef6-1f2982117f04", gBB, service); } @Test @@ -2167,6 +2189,12 @@ public class BBInputSetupTest { cloudConfiguration.setLcpCloudRegionId("cloudRegionId"); String requestAction = "unassignInstance"; + ConfigurationResourceKeys configResourceKeys = new ConfigurationResourceKeys(); + configResourceKeys.setCvnfcCustomizationUUID("cvnfcCustomizationUUID"); + configResourceKeys.setVfModuleCustomizationUUID("vfModuleCustomizationUUID"); + configResourceKeys.setVnfResourceCustomizationUUID("vnfResourceCustomizationUUID"); + executeBB.setConfigurationResourceKeys(configResourceKeys); + L3Network network = new L3Network(); network.setNetworkId("networkId"); gBB.getServiceInstance().getNetworks().add(network); @@ -2241,13 +2269,14 @@ public class BBInputSetupTest { org.onap.aai.domain.yang.Configuration aaiConfiguration = new org.onap.aai.domain.yang.Configuration(); aaiConfiguration.setModelCustomizationId("modelCustId"); doReturn(aaiConfiguration).when(SPY_bbInputSetupUtils).getAAIConfiguration(configuration.getConfigurationId()); + doNothing().when(SPY_bbInputSetup).mapCatalogConfiguration(isA(Configuration.class), isA(ModelInfo.class), isA(Service.class), isA(ConfigurationResourceKeys.class)); executeBB.getBuildingBlock().setBpmnFlowName("ActivateFabricConfigurationBB"); executeBB.getBuildingBlock().setKey("72d9d1cd-f46d-447a-abdb-451d6fb05fa9"); SPY_bbInputSetup.getGBBMacroExistingService(executeBB, lookupKeyMap, executeBB.getBuildingBlock().getBpmnFlowName(), gBB, service, requestAction, cloudConfiguration); verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(any(Configuration.class), any(ModelInfo.class), - any(Service.class)); + any(Service.class), isA(ConfigurationResourceKeys.class)); } @Test diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java index aa883b67a2..eb74ab804e 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java @@ -64,12 +64,13 @@ import org.onap.so.client.aai.AAIResourcesClient; import org.onap.so.client.aai.entities.uri.AAIResourceUri; import org.onap.so.client.aai.entities.uri.AAIUriFactory; import org.onap.so.client.graphinventory.entities.uri.Depth; -import org.onap.so.client.db.request.RequestsDbClient; + import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization; import org.onap.so.db.catalog.client.CatalogDbClient; import org.onap.so.db.request.beans.InfraActiveRequests; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.so.serviceinstancebeans.ModelInfo; import org.onap.so.serviceinstancebeans.RequestDetails; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildlingBlockRainyDayTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildlingBlockRainyDayTest.java index 5e2275015b..2144f1c69a 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildlingBlockRainyDayTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildlingBlockRainyDayTest.java @@ -20,21 +20,27 @@ package org.onap.so.bpmn.servicedecomposition.tasks; +import static org.hamcrest.CoreMatchers.any; import static org.junit.Assert.assertEquals; +import static org.mockito.Matchers.any; +import static org.mockito.Matchers.eq; import static org.mockito.Matchers.isA; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; import org.camunda.bpm.engine.delegate.BpmnError; +import org.camunda.bpm.engine.delegate.DelegateExecution; import org.junit.Before; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.bpmn.core.WorkflowException; import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; +import org.onap.so.BaseTest; import org.onap.so.db.catalog.beans.macro.RainyDayHandlerStatus; import org.springframework.beans.factory.annotation.Autowired; @@ -76,8 +82,9 @@ public class ExecuteBuildlingBlockRainyDayTest extends BaseTest { @Test public void setRetryTimerExceptionTest() { expectedException.expect(BpmnError.class); - - executeBuildingBlockRainyDay.setRetryTimer(null); + DelegateExecution execution = mock(DelegateExecution.class); + when(execution.getVariable(eq("retryCount"))).thenThrow(Exception.class); + executeBuildingBlockRainyDay.setRetryTimer(execution); } @Test diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/ResponseExceptionMapperImplTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/ResponseExceptionMapperImplTest.java index 3a4d6a0cc9..c8e1266b90 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/ResponseExceptionMapperImplTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/ResponseExceptionMapperImplTest.java @@ -44,7 +44,6 @@ import javax.ws.rs.core.Response.Status; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.so.BaseTest; - import junitparams.JUnitParamsRunner; import junitparams.Parameters; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerActionTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerActionTest.java index 8d33a08c7a..6fad47d8bb 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerActionTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerActionTest.java @@ -38,9 +38,8 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.onap.appc.client.lcm.model.Action; import org.onap.appc.client.lcm.model.Status; -import org.onap.so.BaseTest; import org.onap.so.bpmn.appc.payload.PayloadClient; - +import org.onap.so.BaseTest; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerClientV2Test.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerClientV2Test.java index 7fabb2ac0e..0aeb3a2a04 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerClientV2Test.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerClientV2Test.java @@ -33,7 +33,6 @@ import org.onap.appc.client.lcm.model.ActionIdentifiers; import org.onap.appc.client.lcm.model.CheckLockInput; import org.onap.appc.client.lcm.model.Status; import org.onap.so.BaseTest; - import java.util.Properties; import java.util.UUID; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerSupportTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerSupportTest.java index 5ef26b34ee..b388d8ba0a 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerSupportTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/appc/ApplicationControllerSupportTest.java @@ -25,9 +25,8 @@ import static org.assertj.core.api.Assertions.assertThat; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.appc.client.lcm.model.Status; -import org.onap.so.BaseTest; import org.onap.so.client.appc.ApplicationControllerSupport.StatusCategory; - +import org.onap.so.BaseTest; import junitparams.JUnitParamsRunner; import junitparams.Parameters; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java index 35586cc29e..dbf2eb75fd 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/DmaapPropertiesClientTest.java @@ -32,9 +32,9 @@ import java.io.IOException; import org.apache.http.HttpStatus; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.client.avpn.dmaap.beans.AVPNDmaapBean; import org.onap.so.client.exception.MapperException; +import org.onap.so.BaseTest; import org.springframework.beans.factory.annotation.Autowired; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java index 0992b59267..47e05831ad 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/dmaapproperties/GlobalDmaapPublisherTest.java @@ -34,7 +34,7 @@ public class GlobalDmaapPublisherTest extends BaseTest{ @Test public void testGetters() { assertEquals("dmaapUsername", globalDmaapPublisher.getUserName()); - assertEquals("dmaapPassword", globalDmaapPublisher.getPassword()); + assertEquals("ZG1hYXBQYXNzd29yZA==", globalDmaapPublisher.getPassword()); assertEquals("com.att.mso.asyncStatusUpdate", globalDmaapPublisher.getTopic()); assertEquals("http://localhost:" + wireMockPort, globalDmaapPublisher.getHost().get()); } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java index 9ada85fa38..d1013e7541 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java @@ -24,8 +24,8 @@ import static org.junit.Assert.assertEquals; import org.camunda.bpm.engine.delegate.BpmnError; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.bpmn.mock.FileUtil; +import org.onap.so.BaseTest; public class ExceptionBuilderTest extends BaseTest { diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/ThreadedReadTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/ThreadedReadTest.java index 8231c2f529..08c92d33f0 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/ThreadedReadTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/restproperties/ThreadedReadTest.java @@ -36,9 +36,9 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.client.RestPropertiesLoader; import org.onap.so.client.aai.AAIProperties; +import org.onap.so.BaseTest; public class ThreadedReadTest { @Test diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/test/categories/SpringAware.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/test/categories/SpringAware.java new file mode 100644 index 0000000000..21035fcd4d --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/test/categories/SpringAware.java @@ -0,0 +1,25 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.test.categories; + +public interface SpringAware { + /* category marker */ +} diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json index e4c8a8f59b..cd9cf06029 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GenericVnfExpected.json @@ -8,7 +8,6 @@ "vf-module-id":"vfModuleId", "vf-module-name":"vfModuleName", "orchestration-status":"PRECREATED", - "cascaded":false, "heat-stack-id":"heatStackId", "contrail-service-instance-fqdn":"contrailServiceInstanceFqdn", "module-index":1,"selflink":"selflink", @@ -19,7 +18,6 @@ "volume-groups":[], "line-of-business":null, "platform":null, - "cascaded":false, "cloud-params":{}, "cloud-context":null, "solution":null, diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json index a7e2ade10b..c6c5c790a8 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ModelInfoCollection.json @@ -5,6 +5,5 @@ "collection-function":"function", "collection-role":"role", "collection-type":"type", - "description":"description", - "quantity":0 + "description":"description" }
\ No newline at end of file diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ServiceInstanceAAIInput.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ServiceInstanceAAIInput.json index 8cf6f6c3ab..6035c26cb7 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ServiceInstanceAAIInput.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/ServiceInstanceAAIInput.json @@ -9,12 +9,7 @@ "modelVersionId": null, "personaModelVersion": null, "widgetModelId": null, - "widgetModelVersion": null, - "bandwidthTotal": "bandwidthTotal", - "bandwidthUpWan1": "bandwidthUpWan1", - "bandwidthDownWan1": "bandwidthDownWan1", - "bandwidthUpWan2": "bandwidthUpWan2", - "bandwidthDownWan2": "bandwidthDownWan2", + "widgetModelVersion": null, "vhnPortalUrl": "vhnPortalUrl", "serviceInstanceLocationId": "serviceInstanceLocId", "resourceVersion": null, diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VolumeGroup.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VolumeGroup.json index f807276773..bcc565dc75 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VolumeGroup.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/VolumeGroup.json @@ -4,6 +4,5 @@ "vnf-type":"vnfType", "orchestration-status":"PRECREATED", "cloud-params":{}, - "cascaded":false, "heat-stack-id":"heatStackId" } diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/decomposition/catalogDbResponse.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/decomposition/catalogDbResponse.json new file mode 100644 index 0000000000..087233d08b --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/decomposition/catalogDbResponse.json @@ -0,0 +1,33 @@ +{ + "serviceResources": { + "serviceType": "", + "workloadContext": "testWorkloadContext", + "serviceAllottedResources": [], + "modelInfo": { + "modelInvariantUuid": "testModelInvariantId", + "modelName": "testModleName", + "modelVersion": "testModelVersion", + "modelUuid": "testModelUuid" + }, + "environmentContext": "testEnvironmentContent", + "serviceRole": "", + "serviceVnfs": [], + "serviceNetworks": [ + { + "toscaNodeType": "testToscaModelType", + "networkTechnology": "testNetworkTechnology", + "networkScope": "testNetworkScope", + "modelInfo": { + "modelInvariantUuid": "testModelInvariantId", + "modelName": "testModleName", + "modelVersion": "testModelVersion", + "modelCustomizationUuid": "testModelCustomizationUuid", + "modelInstanceName": "testModelInstanceName", + "modelUuid": "testModelUuid" + }, + "networkRole": "testNetworkRole", + "networkType": "testNetworkType" + } + ] + } +}
\ No newline at end of file diff --git a/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml b/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml index 715ddaa937..236d435cb7 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml +++ b/bpmn/MSOCommonBPMN/src/test/resources/application-test.yaml @@ -31,6 +31,9 @@ log: vnfAdapterRestV1: 'true' mso: adapters: + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 completemsoprocess: endpoint: http://localhost:${wiremock.server.port}/CompleteMsoProcess db: @@ -159,7 +162,7 @@ mso: global: dmaap: username: dmaapUsername - password: dmaapPassword + password: ZG1hYXBQYXNzd29yZA== host: http://localhost:${wiremock.server.port} publisher: topic: com.att.mso.asyncStatusUpdate diff --git a/bpmn/MSOCommonBPMN/src/test/resources/logback-test.xml b/bpmn/MSOCommonBPMN/src/test/resources/logback-test.xml index d8f6ba3930..9088d1a844 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/logback-test.xml +++ b/bpmn/MSOCommonBPMN/src/test/resources/logback-test.xml @@ -25,6 +25,6 @@ <appender-ref ref="STDOUT" /> </root> - <logger name="wiremock.org" level="DEBUG" /> + <logger name="wiremock.org" level="ERROR" /> </configuration>
\ No newline at end of file diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java index 099f084637..5e7a4796c4 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceDecomposition.java @@ -69,7 +69,7 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable { private OwningEntity owningEntity; @JsonProperty("serviceVnfs") private List <VnfResource> vnfResources; - @JsonProperty("networkResource") + @JsonProperty("serviceNetworks") private List <NetworkResource> networkResources; @JsonProperty("serviceAllottedResources") private List <AllottedResource> allottedResources; diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java index 6d2db0ca33..4295f50a3c 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java @@ -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. @@ -46,6 +46,8 @@ public class ServiceInstance extends JsonWrapper implements Serializable { private String environmentContext; private String workloadContext; private Map serviceParams; + private Customer customer = new Customer(); + private String e2eVpnKey; public String getServiceType() { return serviceType; @@ -113,4 +115,15 @@ public class ServiceInstance extends JsonWrapper implements Serializable { public void setServiceRole(String serviceRole) { this.serviceRole = serviceRole; } -}
\ No newline at end of file + public Customer getCustomer(){ + return customer; + } + + public String getE2eVpnKey(){ + return e2eVpnKey; + } + + public void setE2eVpnKey(String e2eVpnKey){ + this.e2eVpnKey = e2eVpnKey; + } +} diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java index 82470f125b..5d8d55152c 100644 --- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java +++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/domain/ServiceDecompositionTest.java @@ -103,6 +103,8 @@ public class ServiceDecompositionTest { serviceDecomp.addResource(allottedResource); serviceDecomp.addResource(configResource); + System.out.println(serviceDecomp.toJsonString()); + assertThat(serviceDecomp.getServiceResource(vnfResource.getResourceId()), sameBeanAs(vnfResource)); assertThat(serviceDecomp.getServiceResource(networkResource.getResourceId()), sameBeanAs(networkResource)); assertThat(serviceDecomp.getServiceResource(allottedResource.getResourceId()), sameBeanAs(allottedResource)); diff --git a/bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json b/bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json index c424293ca2..f094e99782 100644 --- a/bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json +++ b/bpmn/MSOCoreBPMN/src/test/resources/json-examples/ServiceDecompositionExpected.json @@ -1,51 +1,59 @@ { - "serviceResources" : { - "modelInfo" : { - "modelName" : "modelName", - "modelUuid" : "modelUuid", - "modelInvariantUuid" : "modelInvariantUuid", - "modelVersion" : "modelVersion", - "modelCustomizationUuid" : "modelCustomizationUuid", - "modelCustomizationName" : "modelCustomizationName", - "modelInstanceName" : "modelInstanceName", - "modelType" : "modelType" - }, - "serviceType" : "serviceType", - "serviceRole" : "serviceRole", - "project" : {}, - "owningEntity" : {}, - "serviceInstance" : { - "serviceInstanceId" : "serviceInstanceId" - }, - "serviceVnfs" : [ - { - "resourceId" : "vnfResourceId", - "resourceType" : "VNF", - "resourceInstance" : {}, - "homingSolution" : { - "license" : {}, - "rehome" : false - }, - "vfModules" : [] - } - ], - "networkResource" : [ - { - "resourceId" : "networkResourceId", - "resourceType" : "NETWORK" - } - ], - "serviceAllottedResources" : [ - { - "resourceId" : "allottedResourceId", - "resourceType" : "ALLOTTED_RESOURCE" - } - ], - "configResource" : [ - { - "resourceId" : "configResourceId", - "resourceType" : "CONFIGURATION" - } - ] - } -} + "serviceResources" : { + "serviceInstance" : { + "instanceId" : "serviceInstanceId", + "customer" : { } + }, + "modelInfo" : { + "modelName" : "modelName", + "modelUuid" : "modelUuid", + "modelInvariantUuid" : "modelInvariantUuid", + "modelVersion" : "modelVersion", + "modelCustomizationUuid" : "modelCustomizationUuid", + "modelCustomizationName" : "modelCustomizationName", + "modelInstanceName" : "modelInstanceName", + "modelType" : "modelType" + }, + "serviceType" : "serviceType", + "serviceRole" : "serviceRole", + "project" : { }, + "owningEntity" : { }, + "serviceVnfs" : [ { + "resourceId" : "vnfResourceId", + "resourceType" : "VNF", + "resourceInstance" : { }, + "homingSolution" : { + "license" : { }, + "rehome" : false + }, + "vfModules" : [ ] + } ], + "serviceNetworks" : [ { + "resourceId" : "networkResourceId", + "resourceType" : "NETWORK", + "resourceInstance" : { }, + "homingSolution" : { + "license" : { }, + "rehome" : false + } + } ], + "serviceAllottedResources" : [ { + "resourceId" : "allottedResourceId", + "resourceType" : "ALLOTTED_RESOURCE", + "resourceInstance" : { }, + "homingSolution" : { + "license" : { }, + "rehome" : false + } + } ], + "configResource" : [ { + "resourceId" : "configResourceId", + "resourceType" : "CONFIGURATION", + "resourceInstance" : { }, + "homingSolution" : { + "license" : { }, + "rehome" : false + } + } ] + } +}
\ No newline at end of file diff --git a/bpmn/MSORESTClient/src/test/java/org/onap/so/rest/RESTClientTest.java b/bpmn/MSORESTClient/src/test/java/org/onap/so/rest/RESTClientTest.java index bbdaa94581..17ede2f2ff 100644 --- a/bpmn/MSORESTClient/src/test/java/org/onap/so/rest/RESTClientTest.java +++ b/bpmn/MSORESTClient/src/test/java/org/onap/so/rest/RESTClientTest.java @@ -51,7 +51,8 @@ public class RESTClientTest { private String jsonResponseAsString; @Rule - public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().port(28090)); + public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicPort()); + @Before public void before() throws Exception { @@ -62,7 +63,7 @@ public class RESTClientTest { jsonResponse = new JSONObject(); jsonResponse.put("response", "responseValue"); jsonResponseAsString = jsonResponse.toString(); - restClient = new RESTClient("http://localhost:28090/example", "localhost", 28090); + restClient = new RESTClient("http://localhost:" + wireMockRule.port() + "/example", "localhost", wireMockRule.port()); } @Test @@ -79,9 +80,9 @@ public class RESTClientTest { assertEquals(1, restClient.getParameters().size()); restClient.addAuthorizationHeader("token"); assertEquals("[token]", restClient.getHeaders().get("Authorization").toString()); - assertEquals("http://localhost:28090/example", restClient.getURL()); - restClient = new RESTClient("http://localhost:28090/example1"); - assertEquals("http://localhost:28090/example1", restClient.getURL()); + assertEquals("http://localhost:" + wireMockRule.port() + "/example", restClient.getURL()); + restClient = new RESTClient("http://localhost:" + wireMockRule.port() + "/example1"); + assertEquals("http://localhost:" + wireMockRule.port() + "/example1", restClient.getURL()); } @Test diff --git a/bpmn/att-services-bpmn/src/test/resources/__files/dhv/DHVChangeSpeed/getPInterface.json b/bpmn/att-services-bpmn/src/test/resources/__files/dhv/DHVChangeSpeed/getPInterface.json deleted file mode 100644 index b8c123eb15..0000000000 --- a/bpmn/att-services-bpmn/src/test/resources/__files/dhv/DHVChangeSpeed/getPInterface.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "interface-name": "Xe-7/1/10", - "port-description": "VVIG EGRESS", - "resource-version": "1494002035673", - "relationship-list": { - "relationship": [ - { - "related-to": "physical-link", - "related-link": "/aai/v11/network/physical-links/physical-link/testPhysicalLinkUcpe", - "relationship-data": [ - { - "relationship-key": "physical-link.link-name", - "relationship-value": "L4YS.999964..ATI_EGRESS" - } - ] - } - ] - } -} diff --git a/bpmn/att-services-bpmn/src/test/resources/__files/dhv/DHVChangeSpeed/getPInterfaces.json b/bpmn/att-services-bpmn/src/test/resources/__files/dhv/DHVChangeSpeed/getPInterfaces.json deleted file mode 100644 index 9ea3869121..0000000000 --- a/bpmn/att-services-bpmn/src/test/resources/__files/dhv/DHVChangeSpeed/getPInterfaces.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "p-interface": [ - { - "interface-name": "Xe-7/1/10", - "port-description": "VVIG EGRESS", - "resource-version": "1494002035673", - "relationship-list": { - "relationship": [ - { - "related-to": "physical-link", - "related-link": "/aai/v11/network/physical-links/physical-link/testPhysicalLinkUcpe", - "relationship-data": [ - { - "relationship-key": "physical-link.link-name", - "relationship-value": "L4YS.999964..ATI_EGRESS" - } - ] - } - ] - } - }, - { - "interface-name": "Xe-8/2/11", - "port-description": "VVIG EGRESS", - "resource-version": "1494002035673", - "relationship-list": { - "relationship": [ - { - "related-to": "physical-link", - "related-link": "/aai/v11/network/physical-links/physical-link/testPhysicalLinkUcpe2", - "relationship-data": [ - { - "relationship-key": "physical-link.link-name", - "relationship-value": "L4YS.999964..ATI_EGRESS" - } - ] - } - ] - } - } - ] -}
\ No newline at end of file diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml index 151ba2c3aa..77e2fa27d3 100644 --- a/bpmn/mso-infrastructure-bpmn/pom.xml +++ b/bpmn/mso-infrastructure-bpmn/pom.xml @@ -201,5 +201,10 @@ <artifactId>so-bpmn-tasks</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>cxf-logging</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> </project> diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java index cfd07d8c39..9ed36e5ba9 100644 --- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java +++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java @@ -36,10 +36,12 @@ import javax.ws.rs.ext.Provider; import org.camunda.bpm.engine.ProcessEngineServices; import org.camunda.bpm.engine.variable.impl.VariableMapImpl; +import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.onap.so.bpmn.common.workflow.context.WorkflowContext; import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder; import org.onap.so.bpmn.common.workflow.context.WorkflowResponse; import org.onap.so.logger.MsoLogger; +import org.openecomp.mso.bpmn.common.workflow.service.WorkflowProcessorException; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -92,7 +94,6 @@ public class WorkflowAsyncResource extends ProcessEngineAwareService { /** * Asynchronous JAX-RS method that starts a process instance. - * @param asyncResponse an object that will receive the asynchronous response * @param processKey the process key * @param variableMap input variables to the process * @return @@ -110,11 +111,14 @@ public class WorkflowAsyncResource extends ProcessEngineAwareService { @PathParam("processKey") String processKey, VariableMapImpl variableMap){ Map<String, Object> inputVariables = getInputVariables(variableMap); try { - MDC.put(MsoLogger.REQUEST_ID, getRequestId(inputVariables)); + MDC.put(ONAPLogConstants.MDCs.REQUEST_ID, getRequestId(inputVariables)); processor.startProcess(processKey, variableMap); WorkflowResponse response = waitForResponse(getRequestId(inputVariables)); return Response.status(202).entity(response).build(); - } catch (Exception e) { + } catch (WorkflowProcessorException e) { + WorkflowResponse response = e.getWorkflowResponse(); + return Response.status(500).entity(response).build(); + }catch (Exception e) { WorkflowResponse response = buildUnkownError(getRequestId(inputVariables),e.getMessage()); return Response.status(500).entity(response).build(); } diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java index edc05afba2..da24ba14fd 100644 --- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java +++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java @@ -28,11 +28,10 @@ import java.util.UUID; import org.camunda.bpm.engine.RuntimeService; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.camunda.bpm.engine.variable.impl.VariableMapImpl; -import org.onap.so.bpmn.common.workflow.context.WorkflowCallbackResponse; -import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder; +import org.onap.so.bpmn.common.workflow.context.WorkflowResponse; import org.onap.so.logger.MsoLogger; +import org.openecomp.mso.bpmn.common.workflow.service.WorkflowProcessorException; import org.slf4j.MDC; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; @@ -79,13 +78,12 @@ public class WorkflowProcessor extends ProcessEngineAwareService { msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError, logMarker + "Error in starting the process: " + e.getMessage()); - WorkflowCallbackResponse callbackResponse = new WorkflowCallbackResponse(); - callbackResponse.setStatusCode(500); - callbackResponse.setMessage("Fail"); - callbackResponse.setResponse("Error occurred while executing the process: " + e); - - WorkflowContextHolder.getInstance().processCallback(processKey, processInstanceId, - getRequestId(inputVariables), callbackResponse); + WorkflowResponse workflowResponse = new WorkflowResponse(); + workflowResponse.setResponse("Error occurred while executing the process: " + e); + workflowResponse.setProcessInstanceID(processInstanceId); + workflowResponse.setMessageCode(500); + workflowResponse.setMessage("Fail"); + throw new WorkflowProcessorException(workflowResponse); } } diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java index 8fe7ebe93a..62be1330b1 100644 --- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java +++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java @@ -37,7 +37,9 @@ import org.onap.so.bpmn.common.workflow.service.WorkflowAsyncResource; import org.onap.so.bpmn.common.workflow.service.WorkflowMessageResource; import org.onap.so.bpmn.common.workflow.service.WorkflowResource; import org.onap.so.logger.MsoLogger; -import org.onap.so.logging.jaxrs.filter.jersey.JaxRsFilterLogging; +import org.onap.so.logging.cxf.interceptor.SOAPLoggingInInterceptor; +import org.onap.so.logging.cxf.interceptor.SOAPLoggingOutInterceptor; +import org.onap.so.logging.jaxrs.filter.JaxRsFilterLogging; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; @@ -85,6 +87,9 @@ public class CXFConfiguration { public Endpoint vnfAdapterCallback() { EndpointImpl endpoint = new EndpointImpl(bus, vnfAdapterNotifyServiceImpl); endpoint.publish("/VNFAdaptercallback"); + endpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); + endpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); + endpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); return endpoint; } @@ -92,6 +97,9 @@ public class CXFConfiguration { public Endpoint sndcAdapterCallback() { EndpointImpl endpoint = new EndpointImpl(bus, sdncAdapterCallbackServiceImpl); endpoint.publish("/SDNCAdapterCallbackService"); + endpoint.getInInterceptors().add(new SOAPLoggingInInterceptor()); + endpoint.getOutInterceptors().add(new SOAPLoggingOutInterceptor()); + endpoint.getOutFaultInterceptors().add(new SOAPLoggingOutInterceptor()); return endpoint; } diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java index c263fe636c..db2304d6b7 100644 --- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java +++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java @@ -29,9 +29,7 @@ import org.camunda.bpm.application.ProcessApplicationInfo; import org.camunda.bpm.engine.ProcessEngine; import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; import org.onap.so.logger.MsoLogger; -import org.onap.so.requestsdb.RequestsDBHelper; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -52,9 +50,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; @EnableProcessApplication("MSO Infrastructure Application") @EnableAsync @ComponentScan(basePackages = { "org.onap" }, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { - @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class) }) public class MSOInfrastructureApplication { private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterCallbackRequestTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterCallbackRequestTest.java index 9843a95342..884c2ac9c6 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterCallbackRequestTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterCallbackRequestTest.java @@ -23,7 +23,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.bpmn.common.adapter.sdnc.CallbackHeader; import org.onap.so.bpmn.common.adapter.sdnc.SDNCAdapterCallbackRequest; diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java index 8ebc80c4c2..041afe398b 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java @@ -141,7 +141,8 @@ public abstract class WorkflowTest { */ protected static final String JSON = "application/json; charset=UTF-8"; - + private static final int timeout = 2000; + /** * Constructor. */ @@ -580,10 +581,27 @@ public abstract class WorkflowTest { * reserve, assign, delete:ERR * </pre> * Errors are handled with junit assertions and will cause the test to fail. + * Uses the static/default timeout value for backward compatibility. * @param callbacks an object containing callback data for the program * @param program the program to execute */ protected void injectSDNCCallbacks(CallbackSet callbacks, String program) { + injectSDNCCallbacks(callbacks, program, timeout); + } + + /** + * Runs a program to inject SDNC callback data into the test environment. + * A program is essentially just a list of keys that identify callback data + * to be injected, in sequence. An example program: + * <pre> + * reserve, assign, delete:ERR + * </pre> + * Errors are handled with junit assertions and will cause the test to fail. + * @param callbacks an object containing callback data for the program + * @param program the program to execute + * @param timeout a timeout value to wait for the callback + */ + protected void injectSDNCCallbacks(CallbackSet callbacks, String program, int timeout) { String[] cmds = program.replaceAll("\\s+", "").split(","); @@ -1487,7 +1505,7 @@ public abstract class WorkflowTest { for(Resource resource:resourceList){ resourceId = resource.getResourceId(); } - String homingList = getJsonValue(content, "solutionInfo.placement"); + String homingList = getJsonValue(content, "solutionInfo.placementInfo"); JSONArray placementArr = null; try { placementArr = new JSONArray(homingList); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceExceptionHandlingTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceExceptionHandlingTest.java new file mode 100644 index 0000000000..ff5e18c210 --- /dev/null +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResourceExceptionHandlingTest.java @@ -0,0 +1,78 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.bpmn.common.workflow.service; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +import javax.ws.rs.core.Response; + +import org.camunda.bpm.engine.test.Deployment; +import org.camunda.bpm.engine.variable.impl.VariableMapImpl; +import org.junit.Test; +import org.onap.so.bpmn.common.workflow.context.WorkflowResponse; + + +public class WorkflowAsyncResourceExceptionHandlingTest { + + @Test + @Deployment(resources = { "testAsyncResource.bpmn" }) + public void asyncRequestSuccess() throws InterruptedException { + VariableMapImpl variableMap = new VariableMapImpl(); + + Map<String, Object> variableValueType = new HashMap<>(); + + Map<String, Object> requestMsg = new HashMap<>(); + requestMsg.put("value", ""); + requestMsg.put("type", "String"); + + Map<String, Object> msorequestId = new HashMap<>(); + msorequestId.put("type", "String"); + msorequestId.put("value",UUID.randomUUID().toString()); + + Map<String, Object> timeout = new HashMap<>(); + timeout.put("type", "String"); + timeout.put("value","5"); + + variableValueType.put("testAsyncRequestMsg", requestMsg); + variableValueType.put("mso-request-id", msorequestId); + variableValueType.put("mso-service-request-timeout", timeout); + + variableMap.put("variables", variableValueType); + WorkflowAsyncResource workflowAsyncResource = new WorkflowAsyncResource(); + workflowAsyncResource.setProcessor(new WorkflowProcessor()); + Response res = workflowAsyncResource.startProcessInstanceByKey("randomKey", variableMap); + assertEquals(500,res.getStatus()); + WorkflowResponse workflowResponse = (WorkflowResponse)res.getEntity(); + assertNotNull(workflowResponse); + assertEquals(500, workflowResponse.getMessageCode()); + assertTrue(workflowResponse.getResponse().startsWith("Error occurred while executing the process:")); + assertEquals("Fail", workflowResponse.getMessage()); + + + } + +} diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java index 7cb649d66e..201e791a24 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java @@ -20,38 +20,25 @@ package org.onap.so.bpmn.infrastructure.pnf.delegate; +import org.onap.aai.domain.yang.Pnf; +import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection; + import java.io.IOException; import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; -import org.onap.aai.domain.yang.Pnf; -import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection; public class AaiConnectionTestImpl implements AaiConnection { - public static final String ID_WITH_ENTRY_AND_IP = "idWithEntryAndIp"; - public static final String ID_WITH_IP_V6 = "idWithIpV6"; public static final String ID_WITHOUT_ENTRY = "IdWithoutEntry"; - public static final String ID_WITH_ENTRY_NO_IP = "idWithEntryNoIp"; - public static final String DEFAULT_IP = "1.2.3.4"; - public static final String DEFAULT_IP_V6 = "2001:db8::ff00:42:8329"; + public static final String ID_WITH_ENTRY = "idWithEntryNoIp"; private Map<String, Pnf> created = new HashMap<>(); @Override public Optional<Pnf> getEntryFor(String correlationId) throws IOException { - if (Objects.equals(correlationId, ID_WITH_ENTRY_AND_IP)) { - Pnf pnf = new Pnf(); - pnf.setIpaddressV4Oam(DEFAULT_IP); - return Optional.of(pnf); - } else if (Objects.equals(correlationId, ID_WITH_IP_V6)) { - Pnf pnf = new Pnf(); - pnf.setIpaddressV6Oam(DEFAULT_IP_V6); - return Optional.of(pnf); - } else if (Objects.equals(correlationId, ID_WITH_ENTRY_NO_IP)) { + if (Objects.equals(correlationId, ID_WITH_ENTRY)) { return Optional.of(new Pnf()); } else { return Optional.empty(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java index b514c38d47..2348af5dec 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java @@ -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. @@ -18,33 +18,27 @@ * ============LICENSE_END========================================================= */ -package org.onap.so.bpmn.infrastructure.pnf.delegate.bpmn; +package org.onap.so.bpmn.infrastructure.pnf.delegate; -import static org.assertj.core.api.Assertions.assertThat; -import static org.camunda.bpm.engine.test.assertions.ProcessEngineAssertions.assertThat; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITHOUT_ENTRY; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY_AND_IP; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY_NO_IP; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.assertj.core.api.Assertions; import org.camunda.bpm.engine.RuntimeService; -import org.camunda.bpm.engine.history.HistoricVariableInstance; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.camunda.bpm.engine.test.Deployment; import org.camunda.bpm.engine.test.ProcessEngineRule; +import org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions; import org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; -import org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl; -import org.onap.so.bpmn.infrastructure.pnf.delegate.DmaapClientTestImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringRunner; +import java.util.HashMap; +import java.util.Map; + +import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID; + @RunWith(SpringRunner.class) @ContextConfiguration(locations = "/applicationContext_forPnfTesting.xml") public class CreateAndActivatePnfResourceTest { @@ -65,47 +59,25 @@ public class CreateAndActivatePnfResourceTest { @Test @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"}) - public void shouldSaveCurrentIpToVariableIfItAlreadyExistsInAai() throws Exception { + public void shouldWaitForMessageFromDmaapAndUpdateAaiEntryWhenAaiEntryExists() { // given aaiConnection.reset(); BpmnAwareTests.init(processEngineRule.getProcessEngine()); Map<String, Object> variables = new HashMap<>(); variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S); - variables.put(CORRELATION_ID, ID_WITH_ENTRY_AND_IP); - // when - ProcessInstance instance = runtimeService - .startProcessInstanceByKey("CreateAndActivatePnfResource", variables); - // then - assertThat(instance).isEnded().hasPassedInOrder( - "CreateAndActivatePnf_StartEvent", - "CheckAiiForCorrelationId", - "DoesAaiContainInfoAboutPnf", - "DoesAaiContainInfoAboutIp", - "AaiEntryAlreadyUpToDate" - ); - } - - @Test - @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"}) - public void shouldWaitForMessageFromDmaapAndUpdateAaiEntryWhenIpIsMissingInAaiEntry() throws Exception { - // given - aaiConnection.reset(); - BpmnAwareTests.init(processEngineRule.getProcessEngine()); - Map<String, Object> variables = new HashMap<>(); - variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S); - variables.put(CORRELATION_ID, ID_WITH_ENTRY_NO_IP); + variables.put(CORRELATION_ID, AaiConnectionTestImpl.ID_WITH_ENTRY); // when ProcessInstance instance = runtimeService .startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables); - assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage"); + BpmnAwareAssertions.assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage"); dmaapClientTestImpl.sendMessage(); // then - assertThat(instance).isEnded().hasPassedInOrder( + BpmnAwareAssertions.assertThat(instance).isEnded().hasPassedInOrder( "CreateAndActivatePnf_StartEvent", + "CheckInputs", "CheckAiiForCorrelationId", "DoesAaiContainInfoAboutPnf", - "DoesAaiContainInfoAboutIp", "AaiEntryExists", "InformDmaapClient", "WaitForDmaapPnfReadyNotification", @@ -115,22 +87,23 @@ public class CreateAndActivatePnfResourceTest { @Test @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"}) - public void shouldCreateAaiEntryWaitForMessageFromDmaapAndUpdateAaiEntryWhenNoAaiEntry() throws Exception { + public void shouldCreateAaiEntryWaitForMessageFromDmaapAndUpdateAaiEntryWhenNoAaiEntryExists() { // given aaiConnection.reset(); BpmnAwareTests.init(processEngineRule.getProcessEngine()); Map<String, Object> variables = new HashMap<>(); variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S); - variables.put(CORRELATION_ID, ID_WITHOUT_ENTRY); + variables.put(CORRELATION_ID, AaiConnectionTestImpl.ID_WITHOUT_ENTRY); // when ProcessInstance instance = runtimeService .startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables); - assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage"); + BpmnAwareAssertions.assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage"); dmaapClientTestImpl.sendMessage(); // then - assertThat(instance).isEnded().hasPassedInOrder( + BpmnAwareAssertions.assertThat(instance).isEnded().hasPassedInOrder( "CreateAndActivatePnf_StartEvent", + "CheckInputs", "CheckAiiForCorrelationId", "DoesAaiContainInfoAboutPnf", "CreateAndActivatePnf_CreateAaiEntry", @@ -139,11 +112,6 @@ public class CreateAndActivatePnfResourceTest { "WaitForDmaapPnfReadyNotification", "AaiEntryUpdated" ); - assertThat(aaiConnection.getCreated()).containsOnlyKeys(ID_WITHOUT_ENTRY); - } - - private List<HistoricVariableInstance> getVariables(ProcessInstance instance) { - return processEngineRule.getHistoryService().createHistoricVariableInstanceQuery() - .processInstanceId(instance.getProcessInstanceId()).taskIdIn().list(); + Assertions.assertThat(aaiConnection.getCreated()).containsOnlyKeys(AaiConnectionTestImpl.ID_WITHOUT_ENTRY); } } diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java index f2a4205ebd..09fb2d4cd7 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java @@ -21,6 +21,7 @@ package org.onap.so.bpmn.infrastructure.pnf.delegate; import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient; + import java.util.Objects; public class DmaapClientTestImpl implements DmaapClient { diff --git a/bpmn/pom.xml b/bpmn/pom.xml index 9f004afe89..bf278253a6 100644 --- a/bpmn/pom.xml +++ b/bpmn/pom.xml @@ -19,7 +19,7 @@ <camunda.bpm.assert.version>1.2</camunda.bpm.assert.version> <camunda.bpm.webapp.artifact>camunda-webapp-jboss-standalone</camunda.bpm.webapp.artifact> <h2.version>1.4.196</h2.version> - <groovy.version>2.4.7</groovy.version> + <groovy.version>2.4.8</groovy.version> <saxon.version>9.5.1-8</saxon.version> <xmlunit.version>2.4.0</xmlunit.version> @@ -90,6 +90,11 @@ <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + <optional>true</optional> + </dependency> </dependencies> </project> diff --git a/bpmn/so-bpmn-building-blocks/pom.xml b/bpmn/so-bpmn-building-blocks/pom.xml index a8a6441740..a523c1e676 100644 --- a/bpmn/so-bpmn-building-blocks/pom.xml +++ b/bpmn/so-bpmn-building-blocks/pom.xml @@ -1,5 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<?xml version="1.0"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.onap.so</groupId> <artifactId>bpmn</artifactId> @@ -12,7 +12,7 @@ <httpclient.version>3.1</httpclient.version> <camunda.bpm.assert.version>1.2</camunda.bpm.assert.version> <h2.version>1.4.196</h2.version> - <groovy.version>2.4.7</groovy.version> + <groovy.version>2.4.8</groovy.version> <saxon.version>9.5.1-8</saxon.version> <xmlunit.version>1.6</xmlunit.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -83,7 +83,7 @@ </goals> </pluginExecutionFilter> <action> - <ignore></ignore> + <ignore/> </action> </pluginExecution> </pluginExecutions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAICheckVnfInMaintBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAICheckVnfInMaintBB.bpmn index de0f450624..99d03d69d7 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAICheckVnfInMaintBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAICheckVnfInMaintBB.bpmn @@ -1,10 +1,10 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AAICheckVnfInMaintBB" name="AAICheckVnfInMaintBB" isExecutable="true"> - <bpmn:startEvent id="Start_AAICheckVnfInMaintBB" name="start"> + <bpmn:startEvent id="Start_AAICheckVnfInMaintBB"> <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> </bpmn:startEvent> - <bpmn:endEvent id="End_AAICheckVnfInMaintBB" name="end"> + <bpmn:endEvent id="End_AAICheckVnfInMaintBB"> <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> </bpmn:endEvent> <bpmn:serviceTask id="Task_CheckVnfInMaint" name="Check If Vnf In Maint (AAI)" camunda:expression="${AAIFlagTasks.checkVnfInMaintFlag(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> @@ -17,9 +17,9 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AAICheckVnfInMaintBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_AAICheckVnfInMaintBB"> - <dc:Bounds x="104" y="76" width="36" height="36" /> + <dc:Bounds x="99" y="76" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="111" y="112" width="22" height="12" /> + <dc:Bounds x="106" y="112" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_AAICheckVnfInMaintBB"> @@ -32,10 +32,10 @@ <dc:Bounds x="192" y="54" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> - <di:waypoint xsi:type="dc:Point" x="140" y="94" /> + <di:waypoint xsi:type="dc:Point" x="135" y="94" /> <di:waypoint xsi:type="dc:Point" x="192" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="166" y="73" width="0" height="12" /> + <dc:Bounds x="118.5" y="73" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1jwsja5_di" bpmnElement="SequenceFlow_1jwsja5"> @@ -47,4 +47,4 @@ </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn:definitions>
\ No newline at end of file +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAISetVnfInMaintBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAISetVnfInMaintBB.bpmn index b2e100061d..c55b519def 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAISetVnfInMaintBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAISetVnfInMaintBB.bpmn @@ -1,10 +1,10 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AAISetVnfInMaintBB" name="AAISetVnfInMaintBB" isExecutable="true"> - <bpmn:startEvent id="Start_AAISetVnfInMaintBB" name="start"> + <bpmn:startEvent id="Start_AAISetVnfInMaintBB"> <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> </bpmn:startEvent> - <bpmn:endEvent id="End_AAISetVnfInMaintBB" name="end"> + <bpmn:endEvent id="End_AAISetVnfInMaintBB"> <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> </bpmn:endEvent> <bpmn:serviceTask id="Task_SetInMaint" name="VNF Set InMaint Flag (AAI)" camunda:expression="${AAIFlagTasks.modifyVnfInMaintFlag(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), true)}"> @@ -17,34 +17,34 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AAISetVnfInMaintBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_AAISetVnfInMaintBB"> - <dc:Bounds x="104" y="76" width="36" height="36" /> + <dc:Bounds x="95" y="76" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="111" y="112" width="22" height="12" /> + <dc:Bounds x="102" y="112" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_AAISetVnfInMaintBB"> - <dc:Bounds x="320" y="76" width="36" height="36" /> + <dc:Bounds x="361" y="76" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="329" y="116" width="18" height="12" /> + <dc:Bounds x="370" y="116" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="Task_SetInMaint"> <dc:Bounds x="192" y="54" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> - <di:waypoint xsi:type="dc:Point" x="140" y="94" /> + <di:waypoint xsi:type="dc:Point" x="131" y="94" /> <di:waypoint xsi:type="dc:Point" x="192" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="166" y="73" width="0" height="12" /> + <dc:Bounds x="116.5" y="73" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1jwsja5_di" bpmnElement="SequenceFlow_1jwsja5"> <di:waypoint xsi:type="dc:Point" x="292" y="94" /> - <di:waypoint xsi:type="dc:Point" x="320" y="94" /> + <di:waypoint xsi:type="dc:Point" x="361" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="306" y="79" width="0" height="0" /> + <dc:Bounds x="281.5" y="79" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn:definitions>
\ No newline at end of file +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAIUnsetVnfInMaintBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAIUnsetVnfInMaintBB.bpmn index 7335f8677c..463b82d88c 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAIUnsetVnfInMaintBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AAIUnsetVnfInMaintBB.bpmn @@ -1,10 +1,10 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AAIUnsetVnfInMaintBB" name="AAIUnsetVnfInMaintBB" isExecutable="true"> - <bpmn:startEvent id="Start_AAIUnsetVnfInMaintBB" name="start"> + <bpmn:startEvent id="Start_AAIUnsetVnfInMaintBB"> <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> </bpmn:startEvent> - <bpmn:endEvent id="End_AAIUnsetVnfInMaintBB" name="end"> + <bpmn:endEvent id="End_AAIUnsetVnfInMaintBB"> <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_AAIUnsetVnfInMaintBB" targetRef="Task_UnsetInMaint" /> @@ -17,22 +17,22 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AAIUnsetVnfInMaintBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_AAIUnsetVnfInMaintBB"> - <dc:Bounds x="104" y="76" width="36" height="36" /> + <dc:Bounds x="87" y="76" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="111" y="112" width="22" height="12" /> + <dc:Bounds x="94" y="112" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_AAIUnsetVnfInMaintBB"> - <dc:Bounds x="320" y="76" width="36" height="36" /> + <dc:Bounds x="361" y="76" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="329" y="116" width="18" height="12" /> + <dc:Bounds x="370" y="116" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> - <di:waypoint xsi:type="dc:Point" x="140" y="94" /> + <di:waypoint xsi:type="dc:Point" x="123" y="94" /> <di:waypoint xsi:type="dc:Point" x="192" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="166" y="73" width="0" height="0" /> + <dc:Bounds x="112.5" y="79" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="Task_UnsetInMaint"> @@ -40,11 +40,11 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1jwsja5_di" bpmnElement="SequenceFlow_1jwsja5"> <di:waypoint xsi:type="dc:Point" x="292" y="94" /> - <di:waypoint xsi:type="dc:Point" x="320" y="94" /> + <di:waypoint xsi:type="dc:Point" x="361" y="94" /> <bpmndi:BPMNLabel> - <dc:Bounds x="306" y="79" width="0" height="0" /> + <dc:Bounds x="281.5" y="79" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn:definitions>
\ No newline at end of file +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn index 6ca3745f43..dc6e4a8d94 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkBB.bpmn @@ -1,17 +1,17 @@ <?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.8.2" 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="ActivateNetworkBB" name="ActivateNetworkBB" isExecutable="true"> - <bpmn2:startEvent id="activateNetwork_startEvent" name="Start Flow"> + <bpmn2:startEvent id="activateNetwork_startEvent"> <bpmn2:outgoing>SequenceFlow_05elmhj</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:endEvent id="activateNetwork_EndEvent" name="End Flow"> + <bpmn2:endEvent id="activateNetwork_EndEvent"> <bpmn2:incoming>SequenceFlow_18atf08</bpmn2:incoming> </bpmn2:endEvent> - <bpmn2:serviceTask id="Activate_Network_SDNC_ServiceTask" name="Activate Network (SDNC)" camunda:expression="${SDNCActivateTasks.activateNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="Activate_Network_SDNC_ServiceTask" name=" SDNC Activate (network) " camunda:expression="${SDNCActivateTasks.activateNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_05elmhj</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0xbvwsu</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="Activate_Network_AAI_ServiceTask" name="Activate Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="Activate_Network_AAI_ServiceTask" name=" AAI Update (network) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0xbvwsu</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_18atf08</bpmn2:outgoing> </bpmn2:serviceTask> @@ -26,13 +26,13 @@ <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="activateNetwork_startEvent"> <dc:Bounds x="545" y="-55" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="538" y="-14" width="49" height="12" /> + <dc:Bounds x="538" y="-14" width="50" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="activateNetwork_EndEvent"> <dc:Bounds x="975" y="-55" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="971" y="-19" width="45" height="12" /> + <dc:Bounds x="971" y="-19" width="46" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1k7d8ih_di" bpmnElement="Activate_Network_SDNC_ServiceTask"> @@ -68,4 +68,4 @@ </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn2:definitions>
\ No newline at end of file +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkCollectionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkCollectionBB.bpmn index 87a1dae090..e927a78017 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkCollectionBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateNetworkCollectionBB.bpmn @@ -1,13 +1,13 @@ <?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.8.2" 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="ActivateNetworkCollectionBB" name="ActivateNetworkCollectionBB" isExecutable="true"> - <bpmn2:startEvent id="activateNetworkCollection_startEvent" name="Start Flow"> + <bpmn2:startEvent id="activateNetworkCollection_startEvent"> <bpmn2:outgoing>SequenceFlow_05elmhj</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:endEvent id="activateNetworkCollection_EndEvent" name="End Flow"> + <bpmn2:endEvent id="activateNetworkCollection_EndEvent"> <bpmn2:incoming>SequenceFlow_18atf08</bpmn2:incoming> </bpmn2:endEvent> - <bpmn2:serviceTask id="Activate_Network_Collection_AAI_ServiceTask" name="Activate Network Collection (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveNetworkCollection(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="Activate_Network_Collection_AAI_ServiceTask" name=" AAI Update (network) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveNetworkCollection(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_05elmhj</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_18atf08</bpmn2:outgoing> </bpmn2:serviceTask> @@ -19,32 +19,32 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ActivateNetworkCollectionBB"> <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="activateNetworkCollection_startEvent"> - <dc:Bounds x="590" y="-55" width="36" height="36" /> + <dc:Bounds x="197" y="115" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="583" y="-14" width="49" height="12" /> + <dc:Bounds x="190" y="156" width="50" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="activateNetworkCollection_EndEvent"> - <dc:Bounds x="894" y="-55" width="36" height="36" /> + <dc:Bounds x="501" y="115" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="890" y="-19" width="45" height="12" /> + <dc:Bounds x="497" y="151" width="46" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1911vum_di" bpmnElement="Activate_Network_Collection_AAI_ServiceTask"> - <dc:Bounds x="715" y="-77" width="100" height="80" /> + <dc:Bounds x="322" y="93" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_05elmhj_di" bpmnElement="SequenceFlow_05elmhj"> - <di:waypoint xsi:type="dc:Point" x="626" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="715" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="233" y="133" /> + <di:waypoint xsi:type="dc:Point" x="322" y="133" /> <bpmndi:BPMNLabel> - <dc:Bounds x="671" y="-52" width="0" height="0" /> + <dc:Bounds x="233" y="118" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_18atf08_di" bpmnElement="SequenceFlow_18atf08"> - <di:waypoint xsi:type="dc:Point" x="815" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="894" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="422" y="133" /> + <di:waypoint xsi:type="dc:Point" x="501" y="133" /> <bpmndi:BPMNLabel> - <dc:Bounds x="855" y="-52" width="0" height="0" /> + <dc:Bounds x="417" y="118" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateServiceInstanceBB.bpmn index 3d55ecd8f6..47cd3cf30b 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateServiceInstanceBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateServiceInstanceBB.bpmn @@ -1,10 +1,10 @@ <?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.8.2"> +<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="ActivateServiceInstanceBB" name="ActivateServiceInstanceBB" isExecutable="true"> - <bpmn:startEvent id="Start_ActivateServiceInstanceBB" name="start"> + <bpmn:startEvent id="Start_ActivateServiceInstanceBB"> <bpmn:outgoing>SequenceFlow_1byfr8v</bpmn:outgoing> </bpmn:startEvent> - <bpmn:endEvent id="End_ActivateServiceInstanceBB" name="end"> + <bpmn:endEvent id="End_ActivateServiceInstanceBB"> <bpmn:incoming>SequenceFlow_0pioehv</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_00q7fsg" sourceRef="Task_NoOpServiceInstance" targetRef="Task_UpdateServiceOrchestrationStatusToActive" /> @@ -13,7 +13,7 @@ <bpmn:outgoing>SequenceFlow_00q7fsg</bpmn:outgoing> </bpmn:task> <bpmn:sequenceFlow id="SequenceFlow_0pioehv" sourceRef="Task_UpdateServiceOrchestrationStatusToActive" targetRef="End_ActivateServiceInstanceBB" /> - <bpmn:serviceTask id="Task_UpdateServiceOrchestrationStatusToActive" name="Update Service Orchestration Status to Active (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_UpdateServiceOrchestrationStatusToActive" name=" AAI Update (svc instance) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_00q7fsg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0pioehv</bpmn:outgoing> </bpmn:serviceTask> @@ -24,7 +24,7 @@ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ActivateServiceInstanceBB"> <dc:Bounds x="174" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="181" y="138" width="22" height="12" /> + <dc:Bounds x="181" y="138" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1qdtskz_di" bpmnElement="End_ActivateServiceInstanceBB"> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn index b118d9b71c..c7b7952f02 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVfModuleBB.bpmn @@ -1,19 +1,19 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="ActivateVfModuleBB" name="ActivateVfModuleBB" isExecutable="true"> - <bpmn:startEvent id="ActivateVfModuleBB_Start" name="Start"> + <bpmn:startEvent id="ActivateVfModuleBB_Start"> <bpmn:outgoing>SequenceFlow_0ieafii</bpmn:outgoing> </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_0ieafii" sourceRef="ActivateVfModuleBB_Start" targetRef="ActivateVfModule" /> - <bpmn:endEvent id="ActivateVfModuleBB_End" name="End"> + <bpmn:endEvent id="ActivateVfModuleBB_End"> <bpmn:incoming>SequenceFlow_0xsp0pv</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="ActivateVfModule" name="SDNC Adapter VFModule Activate" camunda:expression="${SDNCActivateTasks.activateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="ActivateVfModule" name=" SDNC Activate (vf module) " camunda:expression="${SDNCActivateTasks.activateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0ieafii</bpmn:incoming> <bpmn:outgoing>SequenceFlow_14kvrbe</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_14kvrbe" sourceRef="ActivateVfModule" targetRef="UpdateVfModuleActiveStatus" /> - <bpmn:serviceTask id="UpdateVfModuleActiveStatus" name="Activate OStatus (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleActiveStatus" name=" AAI Update (vf module) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_14kvrbe</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0xsp0pv</bpmn:outgoing> </bpmn:serviceTask> @@ -30,35 +30,35 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0ieafii_di" bpmnElement="SequenceFlow_0ieafii"> <di:waypoint xsi:type="dc:Point" x="209" y="120" /> - <di:waypoint xsi:type="dc:Point" x="260" y="120" /> + <di:waypoint xsi:type="dc:Point" x="288" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="189.5" y="99" width="90" height="12" /> + <dc:Bounds x="203.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1v967li_di" bpmnElement="ActivateVfModuleBB_End"> - <dc:Bounds x="636" y="102" width="36" height="36" /> + <dc:Bounds x="624" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="645" y="142" width="19" height="12" /> + <dc:Bounds x="633" y="142" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0hawa84_di" bpmnElement="ActivateVfModule"> - <dc:Bounds x="260" y="80" width="100" height="80" /> + <dc:Bounds x="288" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_14kvrbe_di" bpmnElement="SequenceFlow_14kvrbe"> - <di:waypoint xsi:type="dc:Point" x="360" y="120" /> - <di:waypoint xsi:type="dc:Point" x="466" y="120" /> + <di:waypoint xsi:type="dc:Point" x="388" y="120" /> + <di:waypoint xsi:type="dc:Point" x="433" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="368" y="99" width="90" height="12" /> + <dc:Bounds x="365.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_175e9ul_di" bpmnElement="UpdateVfModuleActiveStatus"> - <dc:Bounds x="466" y="80" width="100" height="80" /> + <dc:Bounds x="433" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0xsp0pv_di" bpmnElement="SequenceFlow_0xsp0pv"> - <di:waypoint xsi:type="dc:Point" x="566" y="120" /> - <di:waypoint xsi:type="dc:Point" x="636" y="120" /> + <di:waypoint xsi:type="dc:Point" x="533" y="120" /> + <di:waypoint xsi:type="dc:Point" x="624" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="601" y="99" width="0" height="12" /> + <dc:Bounds x="533.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn index 61d8f6eb44..1147283160 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVnfBB.bpmn @@ -1,20 +1,20 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="ActivateVnfBB" name="ActivateVnfBB" isExecutable="true"> - <bpmn:startEvent id="Start_ActivateVnfBB" name="start"> + <bpmn:startEvent id="Start_ActivateVnfBB"> <bpmn:outgoing>SequenceFlow_0k9qnoi</bpmn:outgoing> </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_0k9qnoi" sourceRef="Start_ActivateVnfBB" targetRef="Task_SDNCAdapterVnfTopologyActivate" /> <bpmn:sequenceFlow id="SequenceFlow_0r6pzwt" sourceRef="Task_SDNCAdapterVnfTopologyActivate" targetRef="Task_ActivateOrchestrationStatusVnf" /> - <bpmn:endEvent id="End_ActivateVnfBB" name="end"> + <bpmn:endEvent id="End_ActivateVnfBB"> <bpmn:incoming>SequenceFlow_0vnitwg</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_0vnitwg" sourceRef="Task_ActivateOrchestrationStatusVnf" targetRef="End_ActivateVnfBB" /> - <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyActivate" name="Call SDNC Adapter VNF Topology Activate" camunda:expression="${SDNCActivateTasks.activateVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyActivate" name=" SDNC Activate (vnf) " camunda:expression="${SDNCActivateTasks.activateVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0k9qnoi</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0r6pzwt</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_ActivateOrchestrationStatusVnf" name="Activate Orchestration Status Vnf (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_ActivateOrchestrationStatusVnf" name=" AAI Update (vnf) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0r6pzwt</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0vnitwg</bpmn:outgoing> </bpmn:serviceTask> @@ -24,41 +24,41 @@ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ActivateVnfBB"> <dc:Bounds x="173" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="180" y="138" width="22" height="12" /> + <dc:Bounds x="180" y="138" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0k9qnoi_di" bpmnElement="SequenceFlow_0k9qnoi"> <di:waypoint xsi:type="dc:Point" x="209" y="120" /> - <di:waypoint xsi:type="dc:Point" x="263" y="120" /> + <di:waypoint xsi:type="dc:Point" x="279" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="236" y="99" width="0" height="12" /> + <dc:Bounds x="199" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0r6pzwt_di" bpmnElement="SequenceFlow_0r6pzwt"> - <di:waypoint xsi:type="dc:Point" x="363" y="120" /> - <di:waypoint xsi:type="dc:Point" x="422" y="120" /> + <di:waypoint xsi:type="dc:Point" x="379" y="120" /> + <di:waypoint xsi:type="dc:Point" x="411" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="392.5" y="99" width="0" height="12" /> + <dc:Bounds x="350" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1ad7eym_di" bpmnElement="End_ActivateVnfBB"> - <dc:Bounds x="572" y="102" width="36" height="36" /> + <dc:Bounds x="580" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="581" y="142" width="18" height="12" /> + <dc:Bounds x="589" y="142" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0vnitwg_di" bpmnElement="SequenceFlow_0vnitwg"> - <di:waypoint xsi:type="dc:Point" x="522" y="120" /> - <di:waypoint xsi:type="dc:Point" x="572" y="120" /> + <di:waypoint xsi:type="dc:Point" x="511" y="120" /> + <di:waypoint xsi:type="dc:Point" x="580" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="547" y="99" width="0" height="12" /> + <dc:Bounds x="500.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1k98q3r_di" bpmnElement="Task_SDNCAdapterVnfTopologyActivate"> - <dc:Bounds x="263" y="80" width="100" height="80" /> + <dc:Bounds x="279" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1vg25fs_di" bpmnElement="Task_ActivateOrchestrationStatusVnf"> - <dc:Bounds x="422" y="80" width="100" height="80" /> + <dc:Bounds x="411" y="80" width="100" height="80" /> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVolumeGroupBB.bpmn index 03ba8bbe43..bb79e552e7 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVolumeGroupBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ActivateVolumeGroupBB.bpmn @@ -1,14 +1,14 @@ <?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.8.2"> +<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="ActivateVolumeGroupBB" name="ActivateVolumeGroupBB" isExecutable="true"> - <bpmn:startEvent id="ActivateVolumeGroupBB_Start" name="Start"> + <bpmn:startEvent id="ActivateVolumeGroupBB_Start"> <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_1wz1rfg" sourceRef="ActivateVolumeGroupBB_Start" targetRef="ActivateVolumeGroup" /> <bpmn:endEvent id="ActivateVolumeGroupBB_End"> <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="ActivateVolumeGroup" name="ActivateVolumeGroup" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="ActivateVolumeGroup" name=" AAI Update (volume) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusActiveVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> </bpmn:serviceTask> @@ -26,25 +26,25 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1wz1rfg_di" bpmnElement="SequenceFlow_1wz1rfg"> <di:waypoint xsi:type="dc:Point" x="346" y="120" /> - <di:waypoint xsi:type="dc:Point" x="464" y="120" /> + <di:waypoint xsi:type="dc:Point" x="441" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="360" y="99" width="90" height="12" /> + <dc:Bounds x="348.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="ActivateVolumeGroupBB_End"> - <dc:Bounds x="662" y="102" width="36" height="36" /> + <dc:Bounds x="638" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="635" y="142" width="90" height="12" /> + <dc:Bounds x="611" y="142" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0rytcj0_di" bpmnElement="ActivateVolumeGroup"> - <dc:Bounds x="464" y="80" width="100" height="80" /> + <dc:Bounds x="441" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0mh0v9h_di" bpmnElement="SequenceFlow_0mh0v9h"> - <di:waypoint xsi:type="dc:Point" x="564" y="120" /> - <di:waypoint xsi:type="dc:Point" x="662" y="120" /> + <di:waypoint xsi:type="dc:Point" x="541" y="120" /> + <di:waypoint xsi:type="dc:Point" x="638" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="613" y="98" width="0" height="13" /> + <dc:Bounds x="544.5" y="98.5" width="90" height="13" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetwork1802BB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetwork1802BB.bpmn deleted file mode 100644 index cb4be0279e..0000000000 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetwork1802BB.bpmn +++ /dev/null @@ -1,92 +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: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.7.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd"> - <bpmn2:process id="AssignNetwork1802BB" name="AssignNetwork1802BB" isExecutable="true"> - <bpmn2:startEvent id="AssignNetworkBB_start" name="Start Flow"> - <bpmn2:outgoing>SequenceFlow_11op1ih</bpmn2:outgoing> - </bpmn2:startEvent> - <bpmn2:serviceTask id="ServiceTask_get_cloud_region" name="Process cloud region by version " camunda:expression="${AssignNetworkBBUtils.getCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_11op1ih</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:serviceTask id="ServiceTask_assign_network_sdnc" name="Assign Network (SDNC)" camunda:expression="${SDNCAssignTasks.assignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0do51t8</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ServiceTask_get_cloud_region" targetRef="ServiceTask_assign_network_sdnc" /> - <bpmn2:sequenceFlow id="SequenceFlow_0do51t8" sourceRef="ServiceTask_assign_network_sdnc" targetRef="ServiceTask_assign_network_aai" /> - <bpmn2:serviceTask id="ServiceTask_assign_network_aai" name="Assign Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_0do51t8</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0ln3hj3</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:endEvent id="AssignNetworkBB_end" name="End Flow"> - <bpmn2:incoming>SequenceFlow_0ln3hj3</bpmn2:incoming> - </bpmn2:endEvent> - <bpmn2:sequenceFlow id="SequenceFlow_0ln3hj3" sourceRef="ServiceTask_assign_network_aai" targetRef="AssignNetworkBB_end" /> - <bpmn2:sequenceFlow id="SequenceFlow_11op1ih" sourceRef="AssignNetworkBB_start" targetRef="ServiceTask_get_cloud_region" /> - <bpmn2:textAnnotation id="TextAnnotation_0dnksb2"> <bpmn2:text>sets Cloud Region on BB execution for SDNC assign</bpmn2:text> -</bpmn2:textAnnotation> - <bpmn2:association id="Association_1rsqd3z" sourceRef="ServiceTask_get_cloud_region" targetRef="TextAnnotation_0dnksb2" /> - </bpmn2:process> - <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> - <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> - <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignNetwork1802BB"> - <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="AssignNetworkBB_start"> - <dc:Bounds x="1167" y="246" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1160" y="287" width="49" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_1wo7ke9_di" bpmnElement="ServiceTask_get_cloud_region"> - <dc:Bounds x="1298" y="224" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_1ofnl0p_di" bpmnElement="ServiceTask_assign_network_sdnc"> - <dc:Bounds x="1449" y="229" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32"> - <di:waypoint xsi:type="dc:Point" x="1398" y="264" /> - <di:waypoint xsi:type="dc:Point" x="1446" y="264" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1422" y="249" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0do51t8_di" bpmnElement="SequenceFlow_0do51t8"> - <di:waypoint xsi:type="dc:Point" x="1499" y="309" /> - <di:waypoint xsi:type="dc:Point" x="1499" y="378" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1514" y="343.5" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="TextAnnotation_0dnksb2_di" bpmnElement="TextAnnotation_0dnksb2"> - <dc:Bounds x="1393" y="153" width="212" height="30" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="Association_1rsqd3z_di" bpmnElement="Association_1rsqd3z"> - <di:waypoint xsi:type="dc:Point" x="1397" y="233" /> - <di:waypoint xsi:type="dc:Point" x="1475" y="183" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_18yks1p_di" bpmnElement="ServiceTask_assign_network_aai"> - <dc:Bounds x="1449" y="378" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_083u1a5_di" bpmnElement="AssignNetworkBB_end"> - <dc:Bounds x="1481" y="512" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1476" y="552" width="45" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0ln3hj3_di" bpmnElement="SequenceFlow_0ln3hj3"> - <di:waypoint xsi:type="dc:Point" x="1499" y="458" /> - <di:waypoint xsi:type="dc:Point" x="1499" y="512" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1514" y="475" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_11op1ih_di" bpmnElement="SequenceFlow_11op1ih"> - <di:waypoint xsi:type="dc:Point" x="1203" y="264" /> - <di:waypoint xsi:type="dc:Point" x="1298" y="264" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1205.5" y="249" width="90" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - </bpmndi:BPMNPlane> - </bpmndi:BPMNDiagram> -</bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn index 79cbe68a3a..5f7b29b3ab 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignNetworkBB.bpmn @@ -1,63 +1,68 @@ <?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.7.2" 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="AssignNetworkBB" name="AssignNetworkBB" isExecutable="true"> - <bpmn2:startEvent id="AssignNetworkBB_start" name="Start Flow"> + <bpmn2:startEvent id="AssignNetworkBB_start"> <bpmn2:outgoing>SequenceFlow_11op1ih</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:serviceTask id="ServiceTask_get_cloud_region" name="Process cloud region by version " camunda:expression="${AssignNetworkBBUtils.getCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_0mxc4ri</bpmn2:incoming> - <bpmn2:incoming>SequenceFlow_017131q</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing> + <bpmn2:serviceTask id="ServiceTask_get_cloud_region" name=" Process cloud region by version " camunda:expression="${AssignNetworkBBUtils.getCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0jm95hf</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_16hhbw3</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="ServiceTask_assign_network_sdnc" name="Assign Network (SDNC)" camunda:expression="${SDNCAssignTasks.assignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0do51t8</bpmn2:outgoing> + <bpmn2:serviceTask id="ServiceTask_assign_network_sdnc" name=" SDNC Assign (network) " camunda:expression="${SDNCAssignTasks.assignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_16hhbw3</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0oawye1</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="ServiceTask_get_cloud_region" targetRef="ServiceTask_assign_network_sdnc" /> - <bpmn2:sequenceFlow id="SequenceFlow_0do51t8" sourceRef="ServiceTask_assign_network_sdnc" targetRef="ServiceTask_assign_network_aai" /> - <bpmn2:serviceTask id="ServiceTask_put_network_in_AAI" name="Put network shell in AAI " camunda:expression="${AAICreateTasks.createNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="ServiceTask_put_network_in_AAI" name=" AAI Create (network) " camunda:expression="${AAICreateTasks.createNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0gkr871</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1ctpnpe</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="ServiceTask_assign_network_aai" name="Assign Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_0do51t8</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0ln3hj3</bpmn2:outgoing> + <bpmn2:serviceTask id="ServiceTask_assign_network_aai" name=" AAI Update (network) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0oawye1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0988gld</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:exclusiveGateway id="networkFoundByName_ExclusiveGateway" name="skip if network found by name or to be created by SDNC" default="SequenceFlow_0gkr871"> - <bpmn2:incoming>SequenceFlow_11op1ih</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_017131q</bpmn2:outgoing> - <bpmn2:outgoing>SequenceFlow_0gkr871</bpmn2:outgoing> - </bpmn2:exclusiveGateway> - <bpmn2:sequenceFlow id="SequenceFlow_017131q" name="Yes" sourceRef="networkFoundByName_ExclusiveGateway" targetRef="ServiceTask_get_cloud_region"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{AssignNetwork.skipNetworkCreationInAAI(execution.getVariable("gBuildingBlockExecution")) == true}]]></bpmn2:conditionExpression> + <bpmn2:sequenceFlow id="SequenceFlow_017131q" name="Yes" sourceRef="networkFoundByName_ExclusiveGateway" targetRef="ExclusiveGateway_0vtj8n8"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{AssignNetwork.networkFoundByName(execution.getVariable("gBuildingBlockExecution")) == true}]]></bpmn2:conditionExpression> </bpmn2:sequenceFlow> <bpmn2:sequenceFlow id="SequenceFlow_0gkr871" name="No" sourceRef="networkFoundByName_ExclusiveGateway" targetRef="ServiceTask_put_network_in_AAI" /> - <bpmn2:endEvent id="AssignNetworkBB_end" name="End Flow"> - <bpmn2:incoming>SequenceFlow_0ln3hj3</bpmn2:incoming> + <bpmn2:endEvent id="AssignNetworkBB_end"> + <bpmn2:incoming>SequenceFlow_0988gld</bpmn2:incoming> </bpmn2:endEvent> - <bpmn2:sequenceFlow id="SequenceFlow_0ln3hj3" sourceRef="ServiceTask_assign_network_aai" targetRef="AssignNetworkBB_end" /> <bpmn2:sequenceFlow id="SequenceFlow_11op1ih" sourceRef="AssignNetworkBB_start" targetRef="networkFoundByName_ExclusiveGateway" /> - <bpmn2:serviceTask id="ServiceTask_connect_to_NCIG" name="Connect L3Network to NetworkCollectionInstanceGroup " camunda:expression="${AAICreateTasks.connectNetworkToNetworkCollectionInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="ServiceTask_connect_to_NCIG" name=" AAI Connect (collection) " camunda:expression="${AAICreateTasks.connectNetworkToNetworkCollectionInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_07z7hcu</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0e08b9t</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="ServiceTask_connect_to_NCSI" name="Connect L3Network to ServiceInstance " camunda:expression="${AAICreateTasks.connectNetworkToNetworkCollectionServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="ServiceTask_connect_to_NCSI" name=" AAI Connect (svc instance) " camunda:expression="${AAICreateTasks.connectNetworkToNetworkCollectionServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0e08b9t</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0mxc4ri</bpmn2:outgoing> </bpmn2:serviceTask> <bpmn2:sequenceFlow id="SequenceFlow_1ctpnpe" sourceRef="ServiceTask_put_network_in_AAI" targetRef="ServiceTask_connect_to_Tenant" /> <bpmn2:sequenceFlow id="SequenceFlow_0e08b9t" sourceRef="ServiceTask_connect_to_NCIG" targetRef="ServiceTask_connect_to_NCSI" /> - <bpmn2:sequenceFlow id="SequenceFlow_0mxc4ri" sourceRef="ServiceTask_connect_to_NCSI" targetRef="ServiceTask_get_cloud_region" /> - <bpmn2:serviceTask id="ServiceTask_connect_to_Tenant" name="Connect L3Network to Tenant " camunda:expression="${AAICreateTasks.connectNetworkToTenant(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:sequenceFlow id="SequenceFlow_0mxc4ri" sourceRef="ServiceTask_connect_to_NCSI" targetRef="ExclusiveGateway_0vtj8n8" /> + <bpmn2:serviceTask id="ServiceTask_connect_to_Tenant" name=" AAI Connect (tenant) " camunda:expression="${AAICreateTasks.connectNetworkToTenant(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_1ctpnpe</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0fwcvep</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="ServiceTask_connect_to_CloudRegion" name="Connect L3Network to Cloud Region " camunda:expression="${AAICreateTasks.connectNetworkToCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="ServiceTask_connect_to_CloudRegion" name=" AAI Connect (cloud region) " camunda:expression="${AAICreateTasks.connectNetworkToCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0fwcvep</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_07z7hcu</bpmn2:outgoing> </bpmn2:serviceTask> <bpmn2:sequenceFlow id="SequenceFlow_0fwcvep" sourceRef="ServiceTask_connect_to_Tenant" targetRef="ServiceTask_connect_to_CloudRegion" /> <bpmn2:sequenceFlow id="SequenceFlow_07z7hcu" sourceRef="ServiceTask_connect_to_CloudRegion" targetRef="ServiceTask_connect_to_NCIG" /> + <bpmn2:inclusiveGateway id="networkFoundByName_ExclusiveGateway" name="Network Name Found?" default="SequenceFlow_0gkr871"> + <bpmn2:incoming>SequenceFlow_11op1ih</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_017131q</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0gkr871</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:inclusiveGateway id="ExclusiveGateway_0vtj8n8"> + <bpmn2:incoming>SequenceFlow_017131q</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0mxc4ri</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0jm95hf</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0jm95hf" sourceRef="ExclusiveGateway_0vtj8n8" targetRef="ServiceTask_get_cloud_region" /> + <bpmn2:sequenceFlow id="SequenceFlow_16hhbw3" sourceRef="ServiceTask_get_cloud_region" targetRef="ServiceTask_assign_network_sdnc" /> + <bpmn2:sequenceFlow id="SequenceFlow_0oawye1" sourceRef="ServiceTask_assign_network_sdnc" targetRef="ServiceTask_assign_network_aai" /> + <bpmn2:sequenceFlow id="SequenceFlow_0988gld" sourceRef="ServiceTask_assign_network_aai" targetRef="AssignNetworkBB_end" /> <bpmn2:textAnnotation id="TextAnnotation_0dnksb2"> <bpmn2:text>sets Cloud Region on BB execution for SDNC assign</bpmn2:text> </bpmn2:textAnnotation> <bpmn2:association id="Association_1rsqd3z" sourceRef="ServiceTask_get_cloud_region" targetRef="TextAnnotation_0dnksb2" /> @@ -70,138 +75,154 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignNetworkBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="AssignNetworkBB_start"> - <dc:Bounds x="764" y="-105" width="36" height="36" /> + <dc:Bounds x="746" y="-105" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="757" y="-64" width="49" height="12" /> + <dc:Bounds x="739" y="-64" width="50" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1wo7ke9_di" bpmnElement="ServiceTask_get_cloud_region"> - <dc:Bounds x="1298" y="224" width="100" height="80" /> + <dc:Bounds x="1632" y="-127" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1ofnl0p_di" bpmnElement="ServiceTask_assign_network_sdnc"> - <dc:Bounds x="1449" y="229" width="100" height="80" /> + <dc:Bounds x="1769" y="-127" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32"> - <di:waypoint xsi:type="dc:Point" x="1398" y="264" /> - <di:waypoint xsi:type="dc:Point" x="1446" y="264" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1422" y="249" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0do51t8_di" bpmnElement="SequenceFlow_0do51t8"> - <di:waypoint xsi:type="dc:Point" x="1499" y="309" /> - <di:waypoint xsi:type="dc:Point" x="1499" y="378" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1514" y="343.5" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="TextAnnotation_0dnksb2_di" bpmnElement="TextAnnotation_0dnksb2"> - <dc:Bounds x="1393" y="153" width="212" height="30" /> + <dc:Bounds x="1576" y="35" width="212" height="30" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Association_1rsqd3z_di" bpmnElement="Association_1rsqd3z"> - <di:waypoint xsi:type="dc:Point" x="1397" y="233" /> - <di:waypoint xsi:type="dc:Point" x="1475" y="183" /> + <di:waypoint xsi:type="dc:Point" x="1682" y="-47" /> + <di:waypoint xsi:type="dc:Point" x="1682" y="35" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1dm3ngd_di" bpmnElement="ServiceTask_put_network_in_AAI"> - <dc:Bounds x="813" y="-22" width="100" height="80" /> + <dc:Bounds x="906" y="-49" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_18yks1p_di" bpmnElement="ServiceTask_assign_network_aai"> - <dc:Bounds x="1449" y="378" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ExclusiveGateway_19hvq7h_di" bpmnElement="networkFoundByName_ExclusiveGateway" isMarkerVisible="true"> - <dc:Bounds x="838" y="-112" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="821" y="-176" width="83" height="24" /> - </bpmndi:BPMNLabel> + <dc:Bounds x="1909" y="-127" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_017131q_di" bpmnElement="SequenceFlow_017131q"> - <di:waypoint xsi:type="dc:Point" x="888" y="-87" /> - <di:waypoint xsi:type="dc:Point" x="1348" y="-87" /> - <di:waypoint xsi:type="dc:Point" x="1348" y="224" /> + <di:waypoint xsi:type="dc:Point" x="863" y="-112" /> + <di:waypoint xsi:type="dc:Point" x="863" y="-161" /> + <di:waypoint xsi:type="dc:Point" x="1562" y="-161" /> + <di:waypoint xsi:type="dc:Point" x="1562" y="-112" /> <bpmndi:BPMNLabel> - <dc:Bounds x="904" y="-113" width="18" height="12" /> + <dc:Bounds x="871.5" y="-151.96931534232883" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0gkr871_di" bpmnElement="SequenceFlow_0gkr871"> <di:waypoint xsi:type="dc:Point" x="863" y="-62" /> - <di:waypoint xsi:type="dc:Point" x="863" y="-22" /> + <di:waypoint xsi:type="dc:Point" x="863" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="906" y="-9" /> <bpmndi:BPMNLabel> - <dc:Bounds x="887" y="-53" width="14" height="12" /> + <dc:Bounds x="872.125" y="-36.06410256410257" width="14" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_083u1a5_di" bpmnElement="AssignNetworkBB_end"> - <dc:Bounds x="1481" y="512" width="36" height="36" /> + <dc:Bounds x="2118" y="-105" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1476" y="552" width="45" height="12" /> + <dc:Bounds x="2113" y="-65" width="46" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0ln3hj3_di" bpmnElement="SequenceFlow_0ln3hj3"> - <di:waypoint xsi:type="dc:Point" x="1499" y="458" /> - <di:waypoint xsi:type="dc:Point" x="1499" y="512" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1514" y="475" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_11op1ih_di" bpmnElement="SequenceFlow_11op1ih"> - <di:waypoint xsi:type="dc:Point" x="800" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="782" y="-87" /> <di:waypoint xsi:type="dc:Point" x="838" y="-87" /> <bpmndi:BPMNLabel> - <dc:Bounds x="819" y="-102" width="0" height="0" /> + <dc:Bounds x="765" y="-102" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0a96yhg_di" bpmnElement="ServiceTask_connect_to_NCIG"> - <dc:Bounds x="970" y="224" width="100" height="80" /> + <dc:Bounds x="1286" y="-49" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0mauyto_di" bpmnElement="ServiceTask_connect_to_NCSI"> - <dc:Bounds x="1130" y="224" width="100" height="80" /> + <dc:Bounds x="1422" y="-49" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1ctpnpe_di" bpmnElement="SequenceFlow_1ctpnpe"> - <di:waypoint xsi:type="dc:Point" x="863" y="58" /> - <di:waypoint xsi:type="dc:Point" x="863" y="99" /> + <di:waypoint xsi:type="dc:Point" x="1006" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="1036" y="-9" /> <bpmndi:BPMNLabel> - <dc:Bounds x="878" y="79" width="0" height="0" /> + <dc:Bounds x="976" y="-24" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0e08b9t_di" bpmnElement="SequenceFlow_0e08b9t"> - <di:waypoint xsi:type="dc:Point" x="1070" y="264" /> - <di:waypoint xsi:type="dc:Point" x="1130" y="264" /> + <di:waypoint xsi:type="dc:Point" x="1386" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="1422" y="-9" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1100" y="249" width="0" height="0" /> + <dc:Bounds x="1359" y="-24" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0mxc4ri_di" bpmnElement="SequenceFlow_0mxc4ri"> - <di:waypoint xsi:type="dc:Point" x="1230" y="264" /> - <di:waypoint xsi:type="dc:Point" x="1298" y="264" /> + <di:waypoint xsi:type="dc:Point" x="1522" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="1562" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="1562" y="-62" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1264" y="239" width="0" height="0" /> + <dc:Bounds x="1497" y="-24" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_019bzpc_di" bpmnElement="ServiceTask_connect_to_Tenant"> - <dc:Bounds x="813" y="99" width="100" height="80" /> + <dc:Bounds x="1036" y="-49" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1alvmym_di" bpmnElement="ServiceTask_connect_to_CloudRegion"> - <dc:Bounds x="813" y="224" width="100" height="80" /> + <dc:Bounds x="1162" y="-49" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0fwcvep_di" bpmnElement="SequenceFlow_0fwcvep"> - <di:waypoint xsi:type="dc:Point" x="863" y="179" /> - <di:waypoint xsi:type="dc:Point" x="863" y="224" /> + <di:waypoint xsi:type="dc:Point" x="1136" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="1162" y="-9" /> <bpmndi:BPMNLabel> - <dc:Bounds x="878" y="191.5" width="0" height="0" /> + <dc:Bounds x="1104" y="-24" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_07z7hcu_di" bpmnElement="SequenceFlow_07z7hcu"> - <di:waypoint xsi:type="dc:Point" x="913" y="264" /> - <di:waypoint xsi:type="dc:Point" x="970" y="264" /> + <di:waypoint xsi:type="dc:Point" x="1262" y="-9" /> + <di:waypoint xsi:type="dc:Point" x="1286" y="-9" /> <bpmndi:BPMNLabel> - <dc:Bounds x="942" y="239" width="0" height="0" /> + <dc:Bounds x="1229" y="-24" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="TextAnnotation_17jb2vn_di" bpmnElement="TextAnnotation_17jb2vn"> - <dc:Bounds x="941" y="344" width="158" height="54" /> + <dc:Bounds x="1232" y="86" width="158" height="54" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Association_15ppe1t_di" bpmnElement="Association_15ppe1t"> - <di:waypoint xsi:type="dc:Point" x="996" y="304" /> - <di:waypoint xsi:type="dc:Point" x="973" y="344" /> + <di:waypoint xsi:type="dc:Point" x="1306" y="31" /> + <di:waypoint xsi:type="dc:Point" x="1267" y="86" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="InclusiveGateway_0kiphfm_di" bpmnElement="networkFoundByName_ExclusiveGateway"> + <dc:Bounds x="838" y="-112" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="898" y="-104" width="73" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="InclusiveGateway_0pxktc3_di" bpmnElement="ExclusiveGateway_0vtj8n8"> + <dc:Bounds x="1537" y="-112" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1562" y="-58" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0jm95hf_di" bpmnElement="SequenceFlow_0jm95hf"> + <di:waypoint xsi:type="dc:Point" x="1587" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="1632" y="-87" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1609.5" y="-108" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_16hhbw3_di" bpmnElement="SequenceFlow_16hhbw3"> + <di:waypoint xsi:type="dc:Point" x="1732" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="1769" y="-87" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1750.5" y="-108" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0oawye1_di" bpmnElement="SequenceFlow_0oawye1"> + <di:waypoint xsi:type="dc:Point" x="1869" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="1909" y="-87" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1889" y="-108" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0988gld_di" bpmnElement="SequenceFlow_0988gld"> + <di:waypoint xsi:type="dc:Point" x="2009" y="-87" /> + <di:waypoint xsi:type="dc:Point" x="2118" y="-87" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="2063.5" y="-108" width="0" height="12" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn index f68fc91584..d1f2286258 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignServiceInstanceBB.bpmn @@ -1,22 +1,22 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AssignServiceInstanceBB" name="AssignServiceInstanceBB" isExecutable="true"> - <bpmn:startEvent id="Start_AssignServiceInstanceBB" name="start"> + <bpmn:startEvent id="Start_AssignServiceInstanceBB"> <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="Task_CreateServiceInstance" name="Create Service Instance (AAI)" camunda:expression="${AAICreateTasks.createServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_CreateServiceInstance" name=" AAI Create (svc instance) " camunda:expression="${AAICreateTasks.createServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1h6t7yr</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0czewtx</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_CreateProject" name="Create Project (AAI)" camunda:expression="${AAICreateTasks.createProject(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_CreateProject" name=" AAI Create (project) " camunda:expression="${AAICreateTasks.createProject(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0czewtx</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1t55i01</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_CreateOwningEntity" name="Create Owning Entity (AAI)" camunda:expression="${AAICreateTasks.createOwningEntity(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_CreateOwningEntity" name=" AAI Create (owning entity) " camunda:expression="${AAICreateTasks.createOwningEntity(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1t55i01</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0aef1l8</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_AssignServiceInstance" name="Assign Service Instance (SDNC)" camunda:expression="${SDNCAssignTasks.assignServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_AssignServiceInstance" name=" SDNC Assign (svc instance) " camunda:expression="${SDNCAssignTasks.assignServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0aef1l8</bpmn:incoming> <bpmn:outgoing>SequenceFlow_07ea5ui</bpmn:outgoing> </bpmn:serviceTask> @@ -24,16 +24,16 @@ <bpmn:sequenceFlow id="SequenceFlow_0czewtx" sourceRef="Task_CreateServiceInstance" targetRef="Task_CreateProject" /> <bpmn:sequenceFlow id="SequenceFlow_1t55i01" sourceRef="Task_CreateProject" targetRef="Task_CreateOwningEntity" /> <bpmn:sequenceFlow id="SequenceFlow_07ea5ui" sourceRef="Task_AssignServiceInstance" targetRef="Task_UpdateServiceOstatusToAssigned" /> - <bpmn:endEvent id="End_AssignServiceInstanceBB" name="end"> + <bpmn:endEvent id="End_AssignServiceInstanceBB"> <bpmn:incoming>SequenceFlow_14xl505</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_14xl505" sourceRef="Task_UpdateServiceOstatusToAssigned" targetRef="End_AssignServiceInstanceBB" /> - <bpmn:serviceTask id="Task_UpdateServiceOstatusToAssigned" name="Update Service Ostatus to Assigned (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_UpdateServiceOstatusToAssigned" name=" AAI Update (svc instance) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_07ea5ui</bpmn:incoming> <bpmn:outgoing>SequenceFlow_14xl505</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1h6t7yr" sourceRef="Task_CreateServiceSubscription" targetRef="Task_CreateServiceInstance" /> - <bpmn:serviceTask id="Task_CreateServiceSubscription" name="Create Service Subscription (AAI)" camunda:expression="${AAICreateTasks.createServiceSubscription(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_CreateServiceSubscription" name=" AAI Create (svc subscrip) " camunda:expression="${AAICreateTasks.createServiceSubscription(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1xr6chl</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1h6t7yr</bpmn:outgoing> </bpmn:serviceTask> @@ -43,84 +43,84 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignServiceInstanceBB"> <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="Start_AssignServiceInstanceBB"> - <dc:Bounds x="75" y="-3" width="36" height="36" /> + <dc:Bounds x="68" y="90" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="82" y="33" width="23" height="12" /> + <dc:Bounds x="75" y="126" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="Task_CreateServiceInstance"> - <dc:Bounds x="285" y="-25" width="100" height="80" /> + <dc:Bounds x="290" y="68" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0oh47a9_di" bpmnElement="Task_CreateProject"> - <dc:Bounds x="426" y="-25" width="100" height="80" /> + <dc:Bounds x="431" y="68" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_06hn530_di" bpmnElement="Task_CreateOwningEntity"> - <dc:Bounds x="572" y="-25" width="100" height="80" /> + <dc:Bounds x="577" y="68" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="Task_AssignServiceInstance"> - <dc:Bounds x="714" y="-25" width="100" height="80" /> + <dc:Bounds x="719" y="68" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl"> - <di:waypoint xsi:type="dc:Point" x="111" y="15" /> - <di:waypoint xsi:type="dc:Point" x="148" y="15" /> + <di:waypoint xsi:type="dc:Point" x="104" y="108" /> + <di:waypoint xsi:type="dc:Point" x="153" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="84.5" y="-6" width="90" height="12" /> + <dc:Bounds x="83.5" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0czewtx_di" bpmnElement="SequenceFlow_0czewtx"> - <di:waypoint xsi:type="dc:Point" x="385" y="15" /> - <di:waypoint xsi:type="dc:Point" x="426" y="15" /> + <di:waypoint xsi:type="dc:Point" x="390" y="108" /> + <di:waypoint xsi:type="dc:Point" x="431" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="361.5" y="-6" width="0" height="12" /> + <dc:Bounds x="322" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1t55i01_di" bpmnElement="SequenceFlow_1t55i01"> - <di:waypoint xsi:type="dc:Point" x="526" y="15" /> - <di:waypoint xsi:type="dc:Point" x="572" y="15" /> + <di:waypoint xsi:type="dc:Point" x="531" y="108" /> + <di:waypoint xsi:type="dc:Point" x="577" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="504" y="-6" width="0" height="12" /> + <dc:Bounds x="464" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_07ea5ui_di" bpmnElement="SequenceFlow_07ea5ui"> - <di:waypoint xsi:type="dc:Point" x="814" y="15" /> - <di:waypoint xsi:type="dc:Point" x="864" y="15" /> + <di:waypoint xsi:type="dc:Point" x="819" y="108" /> + <di:waypoint xsi:type="dc:Point" x="869" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="794" y="-6" width="90" height="12" /> + <dc:Bounds x="799" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="End_AssignServiceInstanceBB"> - <dc:Bounds x="1007" y="-3" width="36" height="36" /> + <dc:Bounds x="1030" y="90" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1016" y="37" width="18" height="12" /> + <dc:Bounds x="1039" y="130" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_14xl505_di" bpmnElement="SequenceFlow_14xl505"> - <di:waypoint xsi:type="dc:Point" x="964" y="15" /> - <di:waypoint xsi:type="dc:Point" x="1007" y="15" /> + <di:waypoint xsi:type="dc:Point" x="969" y="108" /> + <di:waypoint xsi:type="dc:Point" x="1030" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="940.5" y="-6" width="90" height="12" /> + <dc:Bounds x="954.5" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1dgenhy_di" bpmnElement="Task_UpdateServiceOstatusToAssigned"> - <dc:Bounds x="864" y="-25" width="100" height="80" /> + <dc:Bounds x="869" y="68" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1h6t7yr_di" bpmnElement="SequenceFlow_1h6t7yr"> - <di:waypoint xsi:type="dc:Point" x="248" y="15" /> - <di:waypoint xsi:type="dc:Point" x="285" y="15" /> + <di:waypoint xsi:type="dc:Point" x="253" y="108" /> + <di:waypoint xsi:type="dc:Point" x="290" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="266.5" y="-6" width="0" height="12" /> + <dc:Bounds x="227" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_09fq3rp_di" bpmnElement="Task_CreateServiceSubscription"> - <dc:Bounds x="148" y="-25" width="100" height="80" /> + <dc:Bounds x="153" y="68" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0aef1l8_di" bpmnElement="SequenceFlow_0aef1l8"> - <di:waypoint xsi:type="dc:Point" x="672" y="15" /> - <di:waypoint xsi:type="dc:Point" x="714" y="15" /> + <di:waypoint xsi:type="dc:Point" x="677" y="108" /> + <di:waypoint xsi:type="dc:Point" x="719" y="108" /> <bpmndi:BPMNLabel> - <dc:Bounds x="693" y="-6" width="0" height="12" /> + <dc:Bounds x="653" y="87" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> -</bpmn:definitions> +</bpmn:definitions>
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn index b7ce68eace..92b03a79d0 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVfModuleBB.bpmn @@ -1,30 +1,30 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AssignVfModuleBB" name="AssignVfModuleBB" isExecutable="true"> - <bpmn:startEvent id="AssignVfModuleBB_Start" name="Start"> + <bpmn:startEvent id="AssignVfModuleBB_Start"> <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="CreateVfModule" name="Create VF Module (AAI)" camunda:expression="${AAICreateTasks.createVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="CreateVfModule" name=" AAI Create (vf module) " camunda:expression="${AAICreateTasks.createVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1xr6chl</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0czewtx</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="AssignVfModule" name="Assign VF Module (SDNC)" camunda:expression="${SDNCAssignTasks.assignVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="AssignVfModule" name=" SDNC Assign (vf module) " camunda:expression="${SDNCAssignTasks.assignVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0574gaa</bpmn:incoming> <bpmn:outgoing>SequenceFlow_15hn8si</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1xr6chl" sourceRef="AssignVfModuleBB_Start" targetRef="CreateVfModule" /> <bpmn:sequenceFlow id="SequenceFlow_0czewtx" sourceRef="CreateVfModule" targetRef="ConnectVfModuleToVolumeGroup" /> - <bpmn:endEvent id="AssignVfModuleBB_End" name="End"> + <bpmn:endEvent id="AssignVfModuleBB_End"> <bpmn:incoming>SequenceFlow_14xl505</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_14xl505" sourceRef="UpdateVfModuleStatus" targetRef="AssignVfModuleBB_End" /> - <bpmn:serviceTask id="UpdateVfModuleStatus" name="Update VF Module Ostatus to Assigned (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleStatus" name=" AAI Update (vf module) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_15hn8si</bpmn:incoming> <bpmn:outgoing>SequenceFlow_14xl505</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_15hn8si" sourceRef="AssignVfModule" targetRef="UpdateVfModuleStatus" /> <bpmn:sequenceFlow id="SequenceFlow_0574gaa" sourceRef="ConnectVfModuleToVolumeGroup" targetRef="AssignVfModule" /> - <bpmn:serviceTask id="ConnectVfModuleToVolumeGroup" name="Connect VfModule to VolumeGroup (AAI)" camunda:expression="${AAICreateTasks.connectVfModuleToVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="ConnectVfModuleToVolumeGroup" name=" AAI Connect (volume) " camunda:expression="${AAICreateTasks.connectVfModuleToVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0czewtx</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0574gaa</bpmn:outgoing> </bpmn:serviceTask> @@ -32,63 +32,63 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignVfModuleBB"> <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="AssignVfModuleBB_Start"> - <dc:Bounds x="213" y="-3" width="36" height="36" /> + <dc:Bounds x="184" y="68" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="219" y="33" width="23" height="12" /> + <dc:Bounds x="190" y="104" width="24" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="CreateVfModule"> - <dc:Bounds x="326" y="-25" width="100" height="80" /> + <dc:Bounds x="297" y="46" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="AssignVfModule"> - <dc:Bounds x="661" y="-25" width="100" height="80" /> + <dc:Bounds x="632" y="46" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl"> - <di:waypoint xsi:type="dc:Point" x="249" y="15" /> - <di:waypoint xsi:type="dc:Point" x="326" y="15" /> + <di:waypoint xsi:type="dc:Point" x="220" y="86" /> + <di:waypoint xsi:type="dc:Point" x="297" y="86" /> <bpmndi:BPMNLabel> - <dc:Bounds x="288" y="0" width="0" height="0" /> + <dc:Bounds x="214" y="71" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0czewtx_di" bpmnElement="SequenceFlow_0czewtx"> - <di:waypoint xsi:type="dc:Point" x="426" y="15" /> - <di:waypoint xsi:type="dc:Point" x="490" y="15" /> + <di:waypoint xsi:type="dc:Point" x="397" y="86" /> + <di:waypoint xsi:type="dc:Point" x="461" y="86" /> <bpmndi:BPMNLabel> - <dc:Bounds x="458" y="0" width="0" height="0" /> + <dc:Bounds x="384" y="71" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="AssignVfModuleBB_End"> - <dc:Bounds x="1037" y="-3" width="36" height="36" /> + <dc:Bounds x="1008" y="68" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1045" y="37" width="19" height="12" /> + <dc:Bounds x="1016" y="108" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_14xl505_di" bpmnElement="SequenceFlow_14xl505"> - <di:waypoint xsi:type="dc:Point" x="935" y="15" /> - <di:waypoint xsi:type="dc:Point" x="1037" y="15" /> + <di:waypoint xsi:type="dc:Point" x="906" y="86" /> + <di:waypoint xsi:type="dc:Point" x="1008" y="86" /> <bpmndi:BPMNLabel> - <dc:Bounds x="986" y="0" width="0" height="0" /> + <dc:Bounds x="912" y="71" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1dgenhy_di" bpmnElement="UpdateVfModuleStatus"> - <dc:Bounds x="835" y="-25" width="100" height="80" /> + <dc:Bounds x="806" y="46" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_15hn8si_di" bpmnElement="SequenceFlow_15hn8si"> - <di:waypoint xsi:type="dc:Point" x="761" y="15" /> - <di:waypoint xsi:type="dc:Point" x="835" y="15" /> + <di:waypoint xsi:type="dc:Point" x="732" y="86" /> + <di:waypoint xsi:type="dc:Point" x="806" y="86" /> <bpmndi:BPMNLabel> - <dc:Bounds x="798" y="0" width="0" height="0" /> + <dc:Bounds x="724" y="71" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0574gaa_di" bpmnElement="SequenceFlow_0574gaa"> - <di:waypoint xsi:type="dc:Point" x="590" y="15" /> - <di:waypoint xsi:type="dc:Point" x="661" y="15" /> + <di:waypoint xsi:type="dc:Point" x="561" y="86" /> + <di:waypoint xsi:type="dc:Point" x="632" y="86" /> <bpmndi:BPMNLabel> - <dc:Bounds x="626" y="0" width="0" height="0" /> + <dc:Bounds x="552" y="71" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0ekqpfn_di" bpmnElement="ConnectVfModuleToVolumeGroup"> - <dc:Bounds x="490" y="-25" width="100" height="80" /> + <dc:Bounds x="461" y="46" width="100" height="80" /> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn index f1a023910b..8765bca20c 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn @@ -1,44 +1,38 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="AssignVnfBB" name="AssignVnfBB" isExecutable="true"> - <bpmn:startEvent id="Start_AssignVnfBB" name="start"> + <bpmn:startEvent id="Start_AssignVnfBB"> <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyAssign" name="Call SDNC Adapter VNF Topology Assign" camunda:expression="${SDNCAssignTasks.assignVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn:incoming>SequenceFlow_11jum90</bpmn:incoming> - <bpmn:incoming>SequenceFlow_0v8d14a</bpmn:incoming> + <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyAssign" name=" SDNC Assign (vnf) " camunda:expression="${SDNCAssignTasks.assignVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_14mpqit</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1ks8kmt</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:endEvent id="End_AssignVnfBB" name="end"> + <bpmn:endEvent id="End_AssignVnfBB"> <bpmn:incoming>SequenceFlow_0csh9dc</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="Task_CreateVnf" name="Create Vnf (AAI)" camunda:expression="${AAICreateTasks.createVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_CreateVnf" name=" AAI Create (vnf) " camunda:expression="${AAICreateTasks.createVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1jwsja5</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_AssignVnfBB" targetRef="Task_CreateVnf" /> <bpmn:sequenceFlow id="SequenceFlow_1ks8kmt" sourceRef="Task_SDNCAdapterVnfTopologyAssign" targetRef="Task_UpdateVnfOrchestrationStatusAssigned" /> <bpmn:sequenceFlow id="SequenceFlow_0csh9dc" sourceRef="Task_UpdateVnfOrchestrationStatusAssigned" targetRef="End_AssignVnfBB" /> - <bpmn:serviceTask id="Task_UpdateVnfOrchestrationStatusAssigned" name="Update VNF Orchestration Status Assigned (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_UpdateVnfOrchestrationStatusAssigned" name=" AAI Update (vnf) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1ks8kmt</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0csh9dc</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_createInstanceGroups" name="Create Instance Groups (AAI)" camunda:expression="${AssignVnf.createInstanceGroups(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_createInstanceGroups" name=" AAI Create (instance grp) " camunda:expression="${AssignVnf.createInstanceGroups(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1lppa2m</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1nle8kc</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1jwsja5" sourceRef="Task_CreateVnf" targetRef="Task_createPlatform" /> <bpmn:sequenceFlow id="SequenceFlow_1nle8kc" sourceRef="Task_createInstanceGroups" targetRef="ExclusiveGateway_02tchpp" /> - <bpmn:exclusiveGateway id="ExclusiveGateway_02tchpp" name="Call Homing?" default="SequenceFlow_11jum90"> - <bpmn:incoming>SequenceFlow_1nle8kc</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_11jum90</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_1uiok7v</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_11jum90" name="no" sourceRef="ExclusiveGateway_02tchpp" targetRef="Task_SDNCAdapterVnfTopologyAssign" /> + <bpmn:sequenceFlow id="SequenceFlow_11jum90" name="no" sourceRef="ExclusiveGateway_02tchpp" targetRef="ExclusiveGateway_1blf52g" /> <bpmn:sequenceFlow id="SequenceFlow_1uiok7v" name="yes" sourceRef="ExclusiveGateway_02tchpp" targetRef="Task_callHoming"> <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("callHoming")}]]></bpmn:conditionExpression> </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_0v8d14a" sourceRef="Task_callHoming" targetRef="Task_SDNCAdapterVnfTopologyAssign" /> + <bpmn:sequenceFlow id="SequenceFlow_0v8d14a" sourceRef="Task_callHoming" targetRef="ExclusiveGateway_1blf52g" /> <bpmn:callActivity id="Task_callHoming" name="Call Homing" calledElement="HomingV2"> <bpmn:extensionElements> <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> @@ -50,127 +44,187 @@ </bpmn:callActivity> <bpmn:sequenceFlow id="SequenceFlow_169g0ir" sourceRef="Task_createPlatform" targetRef="Task_createLineOfBusiness" /> <bpmn:sequenceFlow id="SequenceFlow_1lppa2m" sourceRef="Task_createLineOfBusiness" targetRef="Task_createInstanceGroups" /> - <bpmn:serviceTask id="Task_createPlatform" name="Create/Connect Platform" camunda:expression="${AAICreateTasks.createPlatform(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_createPlatform" name=" AAI Connect (platform) " camunda:expression="${AAICreateTasks.createPlatform(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1jwsja5</bpmn:incoming> <bpmn:outgoing>SequenceFlow_169g0ir</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_createLineOfBusiness" name="Create/Connect Line of Business" camunda:expression="${AAICreateTasks.createLineOfBusiness(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_createLineOfBusiness" name=" AAI Create (line bus) " camunda:expression="${AAICreateTasks.createLineOfBusiness(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_169g0ir</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1lppa2m</bpmn:outgoing> </bpmn:serviceTask> + <bpmn:subProcess id="SubProcess_19596dp" name="Error Handling " triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_1c3cyuv"> + <bpmn:outgoing>SequenceFlow_1i52a7x</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_1bywujf"> + <bpmn:incoming>SequenceFlow_1i52a7x</bpmn:incoming> + <bpmn:terminateEventDefinition /> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1i52a7x" sourceRef="StartEvent_1c3cyuv" targetRef="EndEvent_1bywujf" /> + </bpmn:subProcess> + <bpmn:sequenceFlow id="SequenceFlow_14mpqit" sourceRef="ExclusiveGateway_1blf52g" targetRef="Task_SDNCAdapterVnfTopologyAssign" /> + <bpmn:inclusiveGateway id="ExclusiveGateway_02tchpp" name="Call Homing?" default="SequenceFlow_11jum90"> + <bpmn:incoming>SequenceFlow_1nle8kc</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_11jum90</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1uiok7v</bpmn:outgoing> + </bpmn:inclusiveGateway> + <bpmn:inclusiveGateway id="ExclusiveGateway_1blf52g"> + <bpmn:incoming>SequenceFlow_11jum90</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0v8d14a</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_14mpqit</bpmn:outgoing> + </bpmn:inclusiveGateway> </bpmn:process> <bpmn:error id="Error_0rgauy1" name="gDelegateError" errorCode="7000" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignVnfBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_AssignVnfBB"> - <dc:Bounds x="-111" y="76" width="36" height="36" /> + <dc:Bounds x="72" y="116" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-104" y="112" width="22" height="12" /> + <dc:Bounds x="79" y="152" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0m0ikey_di" bpmnElement="Task_SDNCAdapterVnfTopologyAssign"> - <dc:Bounds x="605" y="54" width="100" height="80" /> + <dc:Bounds x="930" y="94" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_AssignVnfBB"> - <dc:Bounds x="895" y="76" width="36" height="36" /> + <dc:Bounds x="1229" y="116" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="904" y="116" width="18" height="12" /> + <dc:Bounds x="1238" y="156" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="Task_CreateVnf"> - <dc:Bounds x="-36" y="54" width="100" height="80" /> + <dc:Bounds x="147" y="94" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> - <di:waypoint xsi:type="dc:Point" x="-75" y="94" /> - <di:waypoint xsi:type="dc:Point" x="-36" y="94" /> + <di:waypoint xsi:type="dc:Point" x="108" y="134" /> + <di:waypoint xsi:type="dc:Point" x="147" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-100" y="73" width="90" height="12" /> + <dc:Bounds x="83" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1ks8kmt_di" bpmnElement="SequenceFlow_1ks8kmt"> - <di:waypoint xsi:type="dc:Point" x="705" y="94" /> - <di:waypoint xsi:type="dc:Point" x="747" y="94" /> + <di:waypoint xsi:type="dc:Point" x="1030" y="134" /> + <di:waypoint xsi:type="dc:Point" x="1056" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="681" y="73" width="90" height="12" /> + <dc:Bounds x="998" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0csh9dc_di" bpmnElement="SequenceFlow_0csh9dc"> - <di:waypoint xsi:type="dc:Point" x="847" y="94" /> - <di:waypoint xsi:type="dc:Point" x="895" y="94" /> + <di:waypoint xsi:type="dc:Point" x="1156" y="134" /> + <di:waypoint xsi:type="dc:Point" x="1229" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="826" y="73" width="90" height="12" /> + <dc:Bounds x="1147.5" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0s6d1be_di" bpmnElement="Task_UpdateVnfOrchestrationStatusAssigned"> - <dc:Bounds x="747" y="54" width="100" height="80" /> + <dc:Bounds x="1056" y="94" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0wjy7za_di" bpmnElement="Task_createInstanceGroups"> - <dc:Bounds x="351" y="54" width="100" height="80" /> + <dc:Bounds x="534" y="94" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1jwsja5_di" bpmnElement="SequenceFlow_1jwsja5"> - <di:waypoint xsi:type="dc:Point" x="64" y="94" /> - <di:waypoint xsi:type="dc:Point" x="96" y="94" /> + <di:waypoint xsi:type="dc:Point" x="247" y="134" /> + <di:waypoint xsi:type="dc:Point" x="279" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="35" y="73" width="90" height="12" /> + <dc:Bounds x="218" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1nle8kc_di" bpmnElement="SequenceFlow_1nle8kc"> - <di:waypoint xsi:type="dc:Point" x="451" y="94" /> - <di:waypoint xsi:type="dc:Point" x="496" y="94" /> + <di:waypoint xsi:type="dc:Point" x="634" y="134" /> + <di:waypoint xsi:type="dc:Point" x="679" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="428.5" y="73" width="90" height="12" /> + <dc:Bounds x="611.5" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ExclusiveGateway_02tchpp_di" bpmnElement="ExclusiveGateway_02tchpp" isMarkerVisible="true"> - <dc:Bounds x="496" y="69" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="489" y="123" width="64" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_11jum90_di" bpmnElement="SequenceFlow_11jum90"> - <di:waypoint xsi:type="dc:Point" x="546" y="94" /> - <di:waypoint xsi:type="dc:Point" x="605" y="94" /> + <di:waypoint xsi:type="dc:Point" x="704" y="159" /> + <di:waypoint xsi:type="dc:Point" x="704" y="195" /> + <di:waypoint xsi:type="dc:Point" x="874" y="195" /> + <di:waypoint xsi:type="dc:Point" x="874" y="159" /> <bpmndi:BPMNLabel> - <dc:Bounds x="569.5" y="73" width="12" height="12" /> + <dc:Bounds x="715.1383523847063" y="174" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1uiok7v_di" bpmnElement="SequenceFlow_1uiok7v"> - <di:waypoint xsi:type="dc:Point" x="521" y="69" /> - <di:waypoint xsi:type="dc:Point" x="521" y="-23" /> - <di:waypoint xsi:type="dc:Point" x="605" y="-23" /> + <di:waypoint xsi:type="dc:Point" x="704" y="109" /> + <di:waypoint xsi:type="dc:Point" x="704" y="68" /> + <di:waypoint xsi:type="dc:Point" x="739" y="68" /> <bpmndi:BPMNLabel> - <dc:Bounds x="527" y="17.494623655913976" width="18" height="12" /> + <dc:Bounds x="711" y="75.5" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0v8d14a_di" bpmnElement="SequenceFlow_0v8d14a"> - <di:waypoint xsi:type="dc:Point" x="655" y="17" /> - <di:waypoint xsi:type="dc:Point" x="655" y="54" /> + <di:waypoint xsi:type="dc:Point" x="839" y="68" /> + <di:waypoint xsi:type="dc:Point" x="874" y="68" /> + <di:waypoint xsi:type="dc:Point" x="874" y="109" /> <bpmndi:BPMNLabel> - <dc:Bounds x="670" y="29.5" width="0" height="12" /> + <dc:Bounds x="811.5" y="47" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_14ye6fs_di" bpmnElement="Task_callHoming"> - <dc:Bounds x="605" y="-63" width="100" height="80" /> + <dc:Bounds x="739" y="28" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_169g0ir_di" bpmnElement="SequenceFlow_169g0ir"> - <di:waypoint xsi:type="dc:Point" x="196" y="94" /> - <di:waypoint xsi:type="dc:Point" x="221" y="94" /> + <di:waypoint xsi:type="dc:Point" x="379" y="134" /> + <di:waypoint xsi:type="dc:Point" x="404" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="208.5" y="73" width="0" height="12" /> + <dc:Bounds x="347" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1lppa2m_di" bpmnElement="SequenceFlow_1lppa2m"> - <di:waypoint xsi:type="dc:Point" x="321" y="94" /> - <di:waypoint xsi:type="dc:Point" x="351" y="94" /> + <di:waypoint xsi:type="dc:Point" x="504" y="134" /> + <di:waypoint xsi:type="dc:Point" x="534" y="134" /> <bpmndi:BPMNLabel> - <dc:Bounds x="336" y="73" width="0" height="12" /> + <dc:Bounds x="474" y="113" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0c97kfg_di" bpmnElement="Task_createPlatform"> - <dc:Bounds x="96" y="54" width="100" height="80" /> + <dc:Bounds x="279" y="94" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1b9yljc_di" bpmnElement="Task_createLineOfBusiness"> - <dc:Bounds x="221" y="54" width="100" height="80" /> + <dc:Bounds x="404" y="94" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_19596dp_di" bpmnElement="SubProcess_19596dp" isExpanded="true"> + <dc:Bounds x="249" y="267" width="231" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1c3cyuv_di" bpmnElement="StartEvent_1c3cyuv"> + <dc:Bounds x="286" y="323" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="259" y="359" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1bywujf_di" bpmnElement="EndEvent_1bywujf"> + <dc:Bounds x="422" y="323" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="395" y="359" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1i52a7x_di" bpmnElement="SequenceFlow_1i52a7x"> + <di:waypoint xsi:type="dc:Point" x="322" y="341" /> + <di:waypoint xsi:type="dc:Point" x="422" y="341" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="372" y="320" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_14mpqit_di" bpmnElement="SequenceFlow_14mpqit"> + <di:waypoint xsi:type="dc:Point" x="899" y="134" /> + <di:waypoint xsi:type="dc:Point" x="930" y="134" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="914.5" y="113" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="InclusiveGateway_0x0c3kk_di" bpmnElement="ExclusiveGateway_02tchpp"> + <dc:Bounds x="679" y="109" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="732" y="128" width="64" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="InclusiveGateway_0ijggth_di" bpmnElement="ExclusiveGateway_1blf52g"> + <dc:Bounds x="849" y="109" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="896" y="163" width="0" height="12" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVolumeGroupBB.bpmn index b1626c8a53..7331d84e05 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVolumeGroupBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVolumeGroupBB.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.8.2"> +<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="AssignVolumeGroupBB" name="AssignVolumeGroupBB" isExecutable="true"> <bpmn:startEvent id="AssignVolumeGroupBB_Start" name="Start"> <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> @@ -8,7 +8,7 @@ <bpmn:endEvent id="AssignVolumeGroupBB_End"> <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="AssignVolumeGroup" name="AssignVolumeGroup" camunda:expression="${AAICreateTasks.createVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="AssignVolumeGroup" name=" AAI Create (volume) " camunda:expression="${AAICreateTasks.createVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> </bpmn:serviceTask> @@ -19,32 +19,32 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="AssignVolumeGroupBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="AssignVolumeGroupBB_Start"> - <dc:Bounds x="310" y="102" width="36" height="36" /> + <dc:Bounds x="177" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="316" y="138" width="24" height="12" /> + <dc:Bounds x="183" y="138" width="24" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1wz1rfg_di" bpmnElement="SequenceFlow_1wz1rfg"> - <di:waypoint xsi:type="dc:Point" x="346" y="120" /> - <di:waypoint xsi:type="dc:Point" x="464" y="120" /> + <di:waypoint xsi:type="dc:Point" x="213" y="120" /> + <di:waypoint xsi:type="dc:Point" x="331" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="360" y="99" width="90" height="12" /> + <dc:Bounds x="227" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="AssignVolumeGroupBB_End"> - <dc:Bounds x="662" y="102" width="36" height="36" /> + <dc:Bounds x="529" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="635" y="142" width="90" height="12" /> + <dc:Bounds x="502" y="142" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0rytcj0_di" bpmnElement="AssignVolumeGroup"> - <dc:Bounds x="464" y="80" width="100" height="80" /> + <dc:Bounds x="331" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0mh0v9h_di" bpmnElement="SequenceFlow_0mh0v9h"> - <di:waypoint xsi:type="dc:Point" x="564" y="120" /> - <di:waypoint xsi:type="dc:Point" x="662" y="120" /> + <di:waypoint xsi:type="dc:Point" x="431" y="120" /> + <di:waypoint xsi:type="dc:Point" x="529" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="613" y="98" width="0" height="13" /> + <dc:Bounds x="435" y="98" width="90" height="13" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn index 6641516bfa..fa0c7f4f44 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelServiceInstanceBB.bpmn @@ -1,20 +1,20 @@ <?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.8.2" 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="ChangeModelServiceInstanceBB" name="ChangeModelServiceInstanceBB" isExecutable="true"> - <bpmn2:startEvent id="ChangeModelServiceInstance_Start" name="Start"> + <bpmn2:startEvent id="ChangeModelServiceInstance_Start"> <bpmn2:outgoing>SequenceFlow_18i4a05</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:endEvent id="ChangeModelServiceInstance_End" name="End"> + <bpmn2:endEvent id="ChangeModelServiceInstance_End"> <bpmn2:incoming>SequenceFlow_0g502yj</bpmn2:incoming> </bpmn2:endEvent> <bpmn2:sequenceFlow id="SequenceFlow_18i4a05" sourceRef="ChangeModelServiceInstance_Start" targetRef="SDNCChangeModelServiceInstance" /> <bpmn2:sequenceFlow id="SequenceFlow_19kfk17" sourceRef="SDNCChangeModelServiceInstance" targetRef="AAIUpdateModelServiceInstance" /> <bpmn2:sequenceFlow id="SequenceFlow_0g502yj" sourceRef="AAIUpdateModelServiceInstance" targetRef="ChangeModelServiceInstance_End" /> - <bpmn2:serviceTask id="SDNCChangeModelServiceInstance" name="SDNC ChangeModel ServiceInstance" camunda:expression="${SDNCChangeAssignTasks.changeModelServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="SDNCChangeModelServiceInstance" name=" SDNC Change (svc instance) " camunda:expression="${SDNCChangeAssignTasks.changeModelServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_18i4a05</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_19kfk17</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="AAIUpdateModelServiceInstance" name="AAI Update Model ServiceInstance" camunda:expression="${AAIUpdateTasks.updateServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="AAIUpdateModelServiceInstance" name=" AAI Update (svc Instance) " camunda:expression="${AAIUpdateTasks.updateServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_19kfk17</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0g502yj</bpmn2:outgoing> </bpmn2:serviceTask> @@ -38,30 +38,30 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_18i4a05_di" bpmnElement="SequenceFlow_18i4a05"> <di:waypoint xsi:type="dc:Point" x="111" y="106" /> - <di:waypoint xsi:type="dc:Point" x="213" y="106" /> + <di:waypoint xsi:type="dc:Point" x="234" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="162" y="85" width="0" height="12" /> + <dc:Bounds x="127.5" y="85" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_19kfk17_di" bpmnElement="SequenceFlow_19kfk17"> - <di:waypoint xsi:type="dc:Point" x="313" y="106" /> - <di:waypoint xsi:type="dc:Point" x="423" y="106" /> + <di:waypoint xsi:type="dc:Point" x="334" y="106" /> + <di:waypoint xsi:type="dc:Point" x="390" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="368" y="85" width="0" height="12" /> + <dc:Bounds x="317" y="85" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0g502yj_di" bpmnElement="SequenceFlow_0g502yj"> - <di:waypoint xsi:type="dc:Point" x="523" y="106" /> + <di:waypoint xsi:type="dc:Point" x="490" y="106" /> <di:waypoint xsi:type="dc:Point" x="632" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="577.5" y="85" width="0" height="12" /> + <dc:Bounds x="516" y="85" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_03km5f0_di" bpmnElement="SDNCChangeModelServiceInstance"> - <dc:Bounds x="213" y="66" width="100" height="80" /> + <dc:Bounds x="234" y="66" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_10b2mxq_di" bpmnElement="AAIUpdateModelServiceInstance"> - <dc:Bounds x="423" y="66" width="100" height="80" /> + <dc:Bounds x="390" y="66" width="100" height="80" /> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn index a48abe25a1..fd247d26eb 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVfModuleBB.bpmn @@ -1,19 +1,19 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="ChangeModelVfModuleBB" name="ChangeModelVfModuleBB" isExecutable="true"> - <bpmn:startEvent id="ChangeModelVfModuleBB_Start" name="Start"> + <bpmn:startEvent id="ChangeModelVfModuleBB_Start"> <bpmn:outgoing>SequenceFlow_0ieafii</bpmn:outgoing> </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_0ieafii" sourceRef="ChangeModelVfModuleBB_Start" targetRef="ChangeModelVfModule" /> - <bpmn:endEvent id="ChangeModelVfModuleBB_End" name="End"> + <bpmn:endEvent id="ChangeModelVfModuleBB_End"> <bpmn:incoming>SequenceFlow_0xsp0pv</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="ChangeModelVfModule" name="SDNC VFModule Change Model" camunda:expression="${SDNCChangeAssignTasks.changeAssignModelVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="ChangeModelVfModule" name=" SDNC Change (vf model) " camunda:expression="${SDNCChangeAssignTasks.changeAssignModelVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0ieafii</bpmn:incoming> <bpmn:outgoing>SequenceFlow_14kvrbe</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_14kvrbe" sourceRef="ChangeModelVfModule" targetRef="UpdateVfModuleModel" /> - <bpmn:serviceTask id="UpdateVfModuleModel" name="Change VFModule Model (AAI)" camunda:expression="${AAIUpdateTasks.updateModelVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleModel" name=" AAI Update (vf model) " camunda:expression="${AAIUpdateTasks.updateModelVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_14kvrbe</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0xsp0pv</bpmn:outgoing> </bpmn:serviceTask> @@ -30,9 +30,9 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0ieafii_di" bpmnElement="SequenceFlow_0ieafii"> <di:waypoint xsi:type="dc:Point" x="209" y="120" /> - <di:waypoint xsi:type="dc:Point" x="260" y="120" /> + <di:waypoint xsi:type="dc:Point" x="297" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="189.5" y="99" width="90" height="12" /> + <dc:Bounds x="208" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1v967li_di" bpmnElement="ChangeModelVfModuleBB_End"> @@ -42,23 +42,23 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0hawa84_di" bpmnElement="ChangeModelVfModule"> - <dc:Bounds x="260" y="80" width="100" height="80" /> + <dc:Bounds x="297" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_14kvrbe_di" bpmnElement="SequenceFlow_14kvrbe"> - <di:waypoint xsi:type="dc:Point" x="360" y="120" /> - <di:waypoint xsi:type="dc:Point" x="466" y="120" /> + <di:waypoint xsi:type="dc:Point" x="397" y="120" /> + <di:waypoint xsi:type="dc:Point" x="435" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="368" y="99" width="90" height="12" /> + <dc:Bounds x="371" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_175e9ul_di" bpmnElement="UpdateVfModuleModel"> - <dc:Bounds x="466" y="80" width="100" height="80" /> + <dc:Bounds x="435" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0xsp0pv_di" bpmnElement="SequenceFlow_0xsp0pv"> - <di:waypoint xsi:type="dc:Point" x="566" y="120" /> + <di:waypoint xsi:type="dc:Point" x="535" y="120" /> <di:waypoint xsi:type="dc:Point" x="636" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="601" y="99" width="0" height="12" /> + <dc:Bounds x="540.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn index 68f491e1f0..b320c12a5e 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ChangeModelVnfBB.bpmn @@ -1,23 +1,34 @@ <?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.8.2" 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="ChangeModelVnfBB" name="ChangeModelVnfBB" isExecutable="true"> - <bpmn2:startEvent id="ChangeModelVnf_Start" name="Start"> + <bpmn2:startEvent id="ChangeModelVnf_Start"> <bpmn2:outgoing>SequenceFlow_18i4a05</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:endEvent id="ChangeModelVnf_End" name="End"> + <bpmn2:endEvent id="ChangeModelVnf_End"> <bpmn2:incoming>SequenceFlow_0g502yj</bpmn2:incoming> </bpmn2:endEvent> <bpmn2:sequenceFlow id="SequenceFlow_18i4a05" sourceRef="ChangeModelVnf_Start" targetRef="SDNCChangeModel" /> <bpmn2:sequenceFlow id="SequenceFlow_19kfk17" sourceRef="SDNCChangeModel" targetRef="AAIUpdateModel" /> <bpmn2:sequenceFlow id="SequenceFlow_0g502yj" sourceRef="AAIUpdateModel" targetRef="ChangeModelVnf_End" /> - <bpmn2:serviceTask id="SDNCChangeModel" name="SDNC ChangeModel Vnf" camunda:expression="${SDNCChangeAssignTasks.changeModelVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="SDNCChangeModel" name=" SDNC Change (vnf model) " camunda:expression="${SDNCChangeAssignTasks.changeModelVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_18i4a05</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_19kfk17</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="AAIUpdateModel" name="AAI Update Model Vnf" camunda:expression="${AAIUpdateTasks.updateObjectVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="AAIUpdateModel" name=" AAI Update (vnf model) " camunda:expression="${AAIUpdateTasks.updateObjectVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_19kfk17</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0g502yj</bpmn2:outgoing> </bpmn2:serviceTask> + <bpmn2:subProcess id="SubProcess_1nibii6" name="Error Handling " triggeredByEvent="true"> + <bpmn2:startEvent id="StartEvent_1fnfrm5"> + <bpmn2:outgoing>SequenceFlow_0s2743f</bpmn2:outgoing> + <bpmn2:errorEventDefinition /> + </bpmn2:startEvent> + <bpmn2:endEvent id="EndEvent_124ugc0"> + <bpmn2:incoming>SequenceFlow_0s2743f</bpmn2:incoming> + <bpmn2:terminateEventDefinition /> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_0s2743f" sourceRef="StartEvent_1fnfrm5" targetRef="EndEvent_124ugc0" /> + </bpmn2:subProcess> </bpmn2:process> <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> @@ -63,6 +74,28 @@ <bpmndi:BPMNShape id="ServiceTask_10b2mxq_di" bpmnElement="AAIUpdateModel"> <dc:Bounds x="423" y="66" width="100" height="80" /> </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_1nibii6_di" bpmnElement="SubProcess_1nibii6" isExpanded="true"> + <dc:Bounds x="164" y="244" width="231" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1fnfrm5_di" bpmnElement="StartEvent_1fnfrm5"> + <dc:Bounds x="201" y="300" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="174" y="336" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_124ugc0_di" bpmnElement="EndEvent_124ugc0"> + <dc:Bounds x="338" y="300" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="311" y="336" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0s2743f_di" bpmnElement="SequenceFlow_0s2743f"> + <di:waypoint xsi:type="dc:Point" x="237" y="318" /> + <di:waypoint xsi:type="dc:Point" x="338" y="318" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="287.5" y="297" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigurationScaleOutBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigurationScaleOutBB.bpmn new file mode 100644 index 0000000000..98a604951f --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigurationScaleOutBB.bpmn @@ -0,0 +1,68 @@ +<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_0ky0lyw" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> + <bpmn:process id="ConfigurationScaleOutBB" name="ConfigurationScaleOutBB" isExecutable="true"> + <bpmn:startEvent id="Start_ConfigScaleOutBB" name="Start"> + <bpmn:outgoing>SequenceFlow_06ab7wm</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="QueryVfModule" name="Query VF Module (SDNC)" camunda:expression="${SDNCQueryTasks.queryVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_06ab7wm</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_149xlbu</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_06ab7wm" sourceRef="Start_ConfigScaleOutBB" targetRef="QueryVfModule" /> + <bpmn:endEvent id="End_ConfigScaleOutBB" name="End"> + <bpmn:incoming>SequenceFlow_12srn62</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_12srn62" sourceRef="Call-AppC-ConfigScaleOut" targetRef="End_ConfigScaleOutBB" /> + <bpmn:sequenceFlow id="SequenceFlow_149xlbu" sourceRef="QueryVfModule" targetRef="GetConfigScaleOutParams" /> + <bpmn:sequenceFlow id="SequenceFlow_1juznaa" sourceRef="GetConfigScaleOutParams" targetRef="Call-AppC-ConfigScaleOut" /> + <bpmn:serviceTask id="GetConfigScaleOutParams" name="Get Config Scale Out Params" camunda:expression="${ConfigurationScaleOut.setParamsForConfigurationScaleOut(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_149xlbu</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1juznaa</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="Call-AppC-ConfigScaleOut" name="Call APP-C For Configuration Scale Out " camunda:expression="${ConfigurationScaleOut.callAppcClient(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1juznaa</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_12srn62</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ConfigurationScaleOutBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ConfigScaleOutBB"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="145" width="25" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1juzqvs_di" bpmnElement="QueryVfModule"> + <dc:Bounds x="261" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06ab7wm_di" bpmnElement="SequenceFlow_06ab7wm"> + <di:waypoint xsi:type="dc:Point" x="209" y="120" /> + <di:waypoint xsi:type="dc:Point" x="261" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_07e01q3_di" bpmnElement="End_ConfigScaleOutBB"> + <dc:Bounds x="694" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="702" y="145" width="20" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_12srn62_di" bpmnElement="SequenceFlow_12srn62"> + <di:waypoint xsi:type="dc:Point" x="653" y="120" /> + <di:waypoint xsi:type="dc:Point" x="694" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_149xlbu_di" bpmnElement="SequenceFlow_149xlbu"> + <di:waypoint xsi:type="dc:Point" x="361" y="120" /> + <di:waypoint xsi:type="dc:Point" x="406" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1juznaa_di" bpmnElement="SequenceFlow_1juznaa"> + <di:waypoint xsi:type="dc:Point" x="506" y="120" /> + <di:waypoint xsi:type="dc:Point" x="553" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1jq0gvz_di" bpmnElement="GetConfigScaleOutParams"> + <dc:Bounds x="406" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1778mx4_di" bpmnElement="Call-AppC-ConfigScaleOut"> + <dc:Bounds x="553" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateCustomerBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateCustomerBB.bpmn index 1e88963c21..42c6383f8b 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateCustomerBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateCustomerBB.bpmn @@ -1,14 +1,14 @@ <?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.8.2"> +<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="CreateCustomerBB" name="CreateCustomerBB" isExecutable="true"> - <bpmn:startEvent id="CreateCustomerBB_Start" name="Start"> + <bpmn:startEvent id="CreateCustomerBB_Start"> <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_1wz1rfg" sourceRef="CreateCustomerBB_Start" targetRef="CreateCustomerAAI" /> <bpmn:endEvent id="CreateCustomerBB_End"> <bpmn:incoming>SequenceFlow_0kfkpbh</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="CreateCustomerAAI" name="CreateCustomer (AAI)" camunda:expression="${AAICreateTasks.createCustomer(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="CreateCustomerAAI" name=" AAI Create (cust) " camunda:expression="${AAICreateTasks.createCustomer(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0kfkpbh</bpmn:outgoing> </bpmn:serviceTask> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkBB.bpmn index b91e2df8f7..609edf4b9b 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkBB.bpmn @@ -1,29 +1,29 @@ <?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.8.2" 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="CreateNetworkBB" name="CreateNetworkBB" isExecutable="true"> - <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow"> + <bpmn2:startEvent id="createNetwork_startEvent"> <bpmn2:outgoing>SequenceFlow_1maepy7</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:endEvent id="createNetwork_EndEvent" name="End Flow"> + <bpmn2:endEvent id="createNetwork_EndEvent"> <bpmn2:incoming>SequenceFlow_0sissul</bpmn2:incoming> </bpmn2:endEvent> - <bpmn2:serviceTask id="QueryVpnBinding_ServiceTask" name="Query Vpn Binding in AAI" camunda:expression="${AAIQueryTasks.queryNetworkVpnBinding(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="QueryVpnBinding_ServiceTask" name=" AAI Query (vpn binding) " camunda:expression="${AAIQueryTasks.queryNetworkVpnBinding(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_1oc7wcr</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0n42zi5</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="Create_Network_ServiceTask" name="Create Network" camunda:expression="${NetworkAdapterCreateTasks.createNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="Create_Network_ServiceTask" name=" AIC Create (network) " camunda:expression="${NetworkAdapterCreateTasks.createNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_1eqfh23</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0innva6</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="QueryNetworkPolicy_ServiceTask" name="Query Network Policy in AAI" camunda:expression="${AAIQueryTasks.queryNetworkPolicy(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="QueryNetworkPolicy_ServiceTask" name=" AAI Query (net policy) " camunda:expression="${AAIQueryTasks.queryNetworkPolicy(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0n42zi5</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1yy4aik</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="QueryNetworkTableRef_ServiceTask" name="Query Network TableRef in AAI" camunda:expression="${AAIQueryTasks.queryNetworkTableRef(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="QueryNetworkTableRef_ServiceTask" name=" AAI Query (net table) " camunda:expression="${AAIQueryTasks.queryNetworkTableRef(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_1yy4aik</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1h9kkhb</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="Update_Network_AAI_ServiceTask" name="Update Network in AAI" camunda:expression="${AAIUpdateTasks.updateNetworkCreated(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="Update_Network_AAI_ServiceTask" name=" AAI Update (network) " camunda:expression="${AAIUpdateTasks.updateNetworkCreated(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0innva6</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0sissul</bpmn2:outgoing> </bpmn2:serviceTask> @@ -31,11 +31,7 @@ <bpmn2:sequenceFlow id="SequenceFlow_1yy4aik" sourceRef="QueryNetworkPolicy_ServiceTask" targetRef="QueryNetworkTableRef_ServiceTask" /> <bpmn2:sequenceFlow id="SequenceFlow_0innva6" sourceRef="Create_Network_ServiceTask" targetRef="Update_Network_AAI_ServiceTask" /> <bpmn2:sequenceFlow id="SequenceFlow_0sissul" sourceRef="Update_Network_AAI_ServiceTask" targetRef="createNetwork_EndEvent" /> - <bpmn2:serviceTask id="QueryNetworkById_ServiceTask" name="Re-Query Network in AAI" camunda:expression="${AAIQueryTasks.getNetworkWrapperById(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_1maepy7</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_06rq9pi</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_1maepy7" sourceRef="createNetwork_startEvent" targetRef="QueryNetworkById_ServiceTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_1maepy7" sourceRef="createNetwork_startEvent" targetRef="ServiceTask_get_cloud_region" /> <bpmn2:intermediateThrowEvent id="ThrowEvent_ToCollectAAIData" name="ThrowEvent_ToCollectAAIData"> <bpmn2:incoming>SequenceFlow_03ebe6c</bpmn2:incoming> <bpmn2:linkEventDefinition name="CatchEvent_Collect_AAI_Data" /> @@ -56,10 +52,9 @@ <bpmn2:sequenceFlow id="SequenceFlow_1oc7wcr" sourceRef="CatchEvent_Collect_AAI_Data" targetRef="QueryVpnBinding_ServiceTask" /> <bpmn2:sequenceFlow id="SequenceFlow_1eqfh23" sourceRef="CatchEvent_Create_Network" targetRef="Create_Network_ServiceTask" /> <bpmn2:serviceTask id="ServiceTask_get_cloud_region" name="Process cloud region by version " camunda:expression="${AssignNetworkBBUtils.getCloudRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_06rq9pi</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1maepy7</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_03ebe6c</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_06rq9pi" sourceRef="QueryNetworkById_ServiceTask" targetRef="ServiceTask_get_cloud_region" /> <bpmn2:sequenceFlow id="SequenceFlow_03ebe6c" sourceRef="ServiceTask_get_cloud_region" targetRef="ThrowEvent_ToCollectAAIData" /> </bpmn2:process> <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> @@ -69,13 +64,13 @@ <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="createNetwork_startEvent"> <dc:Bounds x="236" y="-55" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="230" y="-14" width="48" height="14" /> + <dc:Bounds x="229" y="-14" width="50" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="createNetwork_EndEvent"> <dc:Bounds x="656" y="326" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="652" y="362" width="45" height="14" /> + <dc:Bounds x="652" y="362" width="46" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1k7d8ih_di" bpmnElement="QueryVpnBinding_ServiceTask"> @@ -121,14 +116,11 @@ <dc:Bounds x="628" y="319" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_08q9eo4_di" bpmnElement="QueryNetworkById_ServiceTask"> - <dc:Bounds x="346" y="-77" width="100" height="80" /> - </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1maepy7_di" bpmnElement="SequenceFlow_1maepy7"> <di:waypoint xsi:type="dc:Point" x="272" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="346" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="426" y="-37" /> <bpmndi:BPMNLabel> - <dc:Bounds x="309" y="-52" width="0" height="0" /> + <dc:Bounds x="304" y="-52" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="IntermediateThrowEvent_0fexg2g_di" bpmnElement="ThrowEvent_ToCollectAAIData"> @@ -177,20 +169,13 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_02qnccl_di" bpmnElement="ServiceTask_get_cloud_region"> - <dc:Bounds x="499" y="-77" width="100" height="80" /> + <dc:Bounds x="426" y="-77" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_06rq9pi_di" bpmnElement="SequenceFlow_06rq9pi"> - <di:waypoint xsi:type="dc:Point" x="446" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="499" y="-37" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="473" y="-62" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_03ebe6c_di" bpmnElement="SequenceFlow_03ebe6c"> - <di:waypoint xsi:type="dc:Point" x="599" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="526" y="-37" /> <di:waypoint xsi:type="dc:Point" x="666" y="-37" /> <bpmndi:BPMNLabel> - <dc:Bounds x="633" y="-52" width="0" height="0" /> + <dc:Bounds x="551" y="-52" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkCollectionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkCollectionBB.bpmn index c6c3599449..fb2bfae01a 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkCollectionBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateNetworkCollectionBB.bpmn @@ -1,10 +1,10 @@ <?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="CreateNetworkCollectionBB" name="CreateNetworkCollectionBB" isExecutable="true"> - <bpmn2:startEvent id="createNetworkCollection_startEvent" name="Start Flow"> + <bpmn2:startEvent id="createNetworkCollection_startEvent"> <bpmn2:outgoing>SequenceFlow_1maepy7</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:endEvent id="createNetworkCollection_EndEvent" name="End Flow"> + <bpmn2:endEvent id="createNetworkCollection_EndEvent"> <bpmn2:incoming>SequenceFlow_0hhklb4</bpmn2:incoming> </bpmn2:endEvent> <bpmn2:serviceTask id="BuildName_ServiceTask" name="Buld Collection and Instance Names" camunda:expression="${CreateNetworkCollection.buildNetworkCollectionName(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> @@ -12,22 +12,22 @@ <bpmn2:outgoing>SequenceFlow_06rq9pi</bpmn2:outgoing> </bpmn2:serviceTask> <bpmn2:sequenceFlow id="SequenceFlow_1maepy7" sourceRef="createNetworkCollection_startEvent" targetRef="BuildName_ServiceTask" /> - <bpmn2:serviceTask id="ServiceTask_create_NetworkCollection" name="Create Network Collection in AAI " camunda:expression="${AAICreateTasks.createNetworkCollection(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="ServiceTask_create_NetworkCollection" name=" AAI Create (net collection) " camunda:expression="${AAICreateTasks.createNetworkCollection(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_06rq9pi</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_05yxpu5</bpmn2:outgoing> </bpmn2:serviceTask> <bpmn2:sequenceFlow id="SequenceFlow_06rq9pi" sourceRef="BuildName_ServiceTask" targetRef="ServiceTask_create_NetworkCollection" /> - <bpmn2:serviceTask id="ServiceTask_create_NetworkCollectionInstanceGroup" name="Create Network Collection Instance Group in AAI " camunda:expression="${AAICreateTasks.createNetworkCollectionInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="ServiceTask_create_NetworkCollectionInstanceGroup" name=" AAI Create (instance grp) " camunda:expression="${AAICreateTasks.createNetworkCollectionInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_05yxpu5</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0z4c30j</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="ServiceTask_Connect_Collection_to_InstanceGroup" name="Connect Collection to InstanceGroup " camunda:expression="${CreateNetworkCollection.connectCollectionToInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> + <bpmn2:serviceTask id="ServiceTask_Connect_Collection_to_InstanceGroup" name=" AAI Connect (net collection) " camunda:expression="${CreateNetworkCollection.connectCollectionToInstanceGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> <bpmn2:incoming>SequenceFlow_0z4c30j</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1hij1px</bpmn2:outgoing> </bpmn2:serviceTask> <bpmn2:sequenceFlow id="SequenceFlow_05yxpu5" sourceRef="ServiceTask_create_NetworkCollection" targetRef="ServiceTask_create_NetworkCollectionInstanceGroup" /> <bpmn2:sequenceFlow id="SequenceFlow_0z4c30j" sourceRef="ServiceTask_create_NetworkCollectionInstanceGroup" targetRef="ServiceTask_Connect_Collection_to_InstanceGroup" /> - <bpmn2:serviceTask id="ServiceTask_Connect_Collection_to_ServiceInstance" name="Connect Collection to ServiceInstance " camunda:expression="${CreateNetworkCollection.connectCollectionToServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> + <bpmn2:serviceTask id="ServiceTask_Connect_Collection_to_ServiceInstance" name=" AAI Connect (svc instance) " camunda:expression="${CreateNetworkCollection.connectCollectionToServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))} "> <bpmn2:incoming>SequenceFlow_1hij1px</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0hhklb4</bpmn2:outgoing> </bpmn2:serviceTask> @@ -41,13 +41,13 @@ <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="createNetworkCollection_startEvent"> <dc:Bounds x="236" y="-55" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="230" y="-14" width="48" height="14" /> + <dc:Bounds x="229" y="-14" width="50" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="createNetworkCollection_EndEvent"> <dc:Bounds x="1132" y="-55" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1128" y="-19" width="45" height="12" /> + <dc:Bounds x="1128" y="-19" width="46" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_08q9eo4_di" bpmnElement="BuildName_ServiceTask"> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn index abc017c957..bd126de24e 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVfModuleBB.bpmn @@ -1,15 +1,15 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="CreateVfModuleBB" name="CreateVfModuleBB" isExecutable="true"> - <bpmn:startEvent id="CreateVfModuleBB_Start" name="Start"> + <bpmn:startEvent id="CreateVfModuleBB_Start"> <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="QueryVfModule" name="Query VF Module (SDNC)" camunda:expression="${SDNCQueryTasks.queryVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="QueryVfModule" name=" SDNC Get (vf module) " camunda:expression="${SDNCQueryTasks.queryVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1s4rpyp</bpmn:incoming> <bpmn:outgoing>SequenceFlow_15hn8si</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1xr6chl" sourceRef="CreateVfModuleBB_Start" targetRef="QueryVnf" /> - <bpmn:endEvent id="CreateVfModuleBB_End" name="End"> + <bpmn:endEvent id="CreateVfModuleBB_End"> <bpmn:incoming>SequenceFlow_1stomxq</bpmn:incoming> </bpmn:endEvent> <bpmn:serviceTask id="CreateVfModule" name="Create VF Module (VNF)" camunda:expression="${VnfAdapterCreateTasks.createVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> @@ -18,7 +18,7 @@ </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_15hn8si" sourceRef="QueryVfModule" targetRef="CreateVfModule" /> <bpmn:sequenceFlow id="SequenceFlow_1s4rpyp" sourceRef="QueryVnf" targetRef="QueryVfModule" /> - <bpmn:serviceTask id="QueryVnf" name="Query VNF (SDNC)" camunda:expression="${SDNCQueryTasks.queryVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="QueryVnf" name=" SDNC Get (vnf) " camunda:expression="${SDNCQueryTasks.queryVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1xr6chl</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1s4rpyp</bpmn:outgoing> </bpmn:serviceTask> @@ -29,103 +29,136 @@ <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="VNFREST_Request" target="VNFREST_Request" /> - <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:out source="heatStackId" target="heatStackId" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_16g4dz0</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0ecr393</bpmn:outgoing> </bpmn:callActivity> <bpmn:sequenceFlow id="SequenceFlow_1stomxq" sourceRef="UpdateVfModuleStatus" targetRef="CreateVfModuleBB_End" /> - <bpmn:serviceTask id="UpdateVfModuleStatus" name="Update VfModule Ostatus to Created (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleStatus" name=" AAI Update (vf module) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0qqsilv</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1stomxq</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0qqsilv" sourceRef="UpdateVfModuleHeatStackId" targetRef="UpdateVfModuleStatus" /> - <bpmn:serviceTask id="UpdateVfModuleHeatStackId" name="Update VfModule HeatStackId (AAI)" camunda:expression="${AAIUpdateTasks.updateHeatStackIdVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleHeatStackId" name=" AAI Update (vf module) " camunda:expression="${AAIUpdateTasks.updateHeatStackIdVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0ecr393</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0qqsilv</bpmn:outgoing> </bpmn:serviceTask> + <bpmn:subProcess id="SubProcess_1getwnf" name="Error Handling " triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_1c8o652"> + <bpmn:outgoing>SequenceFlow_0gcots6</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_1emam1w"> + <bpmn:incoming>SequenceFlow_0gcots6</bpmn:incoming> + <bpmn:terminateEventDefinition /> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0gcots6" sourceRef="StartEvent_1c8o652" targetRef="EndEvent_1emam1w" /> + </bpmn:subProcess> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVfModuleBB"> <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="CreateVfModuleBB_Start"> - <dc:Bounds x="213" y="-3" width="36" height="36" /> + <dc:Bounds x="100" y="88" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="219" y="33" width="23" height="12" /> + <dc:Bounds x="106" y="124" width="24" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="QueryVfModule"> - <dc:Bounds x="529" y="-25" width="100" height="80" /> + <dc:Bounds x="416" y="66" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl"> - <di:waypoint xsi:type="dc:Point" x="249" y="15" /> - <di:waypoint xsi:type="dc:Point" x="329" y="15" /> + <di:waypoint xsi:type="dc:Point" x="136" y="106" /> + <di:waypoint xsi:type="dc:Point" x="216" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="289" y="0" width="0" height="0" /> + <dc:Bounds x="131" y="91" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="CreateVfModuleBB_End"> - <dc:Bounds x="1391" y="-3" width="36" height="36" /> + <dc:Bounds x="1278" y="88" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1399" y="37" width="19" height="12" /> + <dc:Bounds x="1286" y="128" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1dgenhy_di" bpmnElement="CreateVfModule"> - <dc:Bounds x="725" y="-25" width="100" height="80" /> + <dc:Bounds x="612" y="66" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_15hn8si_di" bpmnElement="SequenceFlow_15hn8si"> - <di:waypoint xsi:type="dc:Point" x="629" y="15" /> - <di:waypoint xsi:type="dc:Point" x="725" y="15" /> + <di:waypoint xsi:type="dc:Point" x="516" y="106" /> + <di:waypoint xsi:type="dc:Point" x="612" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="677" y="0" width="0" height="0" /> + <dc:Bounds x="519" y="91" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1s4rpyp_di" bpmnElement="SequenceFlow_1s4rpyp"> - <di:waypoint xsi:type="dc:Point" x="429" y="15" /> - <di:waypoint xsi:type="dc:Point" x="529" y="15" /> + <di:waypoint xsi:type="dc:Point" x="316" y="106" /> + <di:waypoint xsi:type="dc:Point" x="416" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="479" y="0" width="0" height="0" /> + <dc:Bounds x="321" y="91" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1frb5h2_di" bpmnElement="QueryVnf"> - <dc:Bounds x="329" y="-25" width="100" height="80" /> + <dc:Bounds x="216" y="66" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_16g4dz0_di" bpmnElement="SequenceFlow_16g4dz0"> - <di:waypoint xsi:type="dc:Point" x="825" y="15" /> - <di:waypoint xsi:type="dc:Point" x="890" y="15" /> + <di:waypoint xsi:type="dc:Point" x="712" y="106" /> + <di:waypoint xsi:type="dc:Point" x="777" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="857.5" y="-6" width="0" height="12" /> + <dc:Bounds x="700" y="85" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0ecr393_di" bpmnElement="SequenceFlow_0ecr393"> - <di:waypoint xsi:type="dc:Point" x="990" y="15" /> - <di:waypoint xsi:type="dc:Point" x="1063" y="15" /> + <di:waypoint xsi:type="dc:Point" x="877" y="106" /> + <di:waypoint xsi:type="dc:Point" x="950" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1027" y="0" width="0" height="0" /> + <dc:Bounds x="869" y="91" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_1i1pfzb_di" bpmnElement="VnfAdapter"> - <dc:Bounds x="890" y="-25" width="100" height="80" /> + <dc:Bounds x="777" y="66" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1stomxq_di" bpmnElement="SequenceFlow_1stomxq"> - <di:waypoint xsi:type="dc:Point" x="1327" y="15" /> - <di:waypoint xsi:type="dc:Point" x="1391" y="15" /> + <di:waypoint xsi:type="dc:Point" x="1214" y="106" /> + <di:waypoint xsi:type="dc:Point" x="1278" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1359" y="0" width="0" height="0" /> + <dc:Bounds x="1201" y="91" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0fpfn71_di" bpmnElement="UpdateVfModuleStatus"> - <dc:Bounds x="1227" y="-25" width="100" height="80" /> + <dc:Bounds x="1114" y="66" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0qqsilv_di" bpmnElement="SequenceFlow_0qqsilv"> - <di:waypoint xsi:type="dc:Point" x="1163" y="15" /> - <di:waypoint xsi:type="dc:Point" x="1227" y="15" /> + <di:waypoint xsi:type="dc:Point" x="1050" y="106" /> + <di:waypoint xsi:type="dc:Point" x="1114" y="106" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1195" y="0" width="0" height="0" /> + <dc:Bounds x="1037" y="91" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_04k1b85_di" bpmnElement="UpdateVfModuleHeatStackId"> - <dc:Bounds x="1063" y="-25" width="100" height="80" /> + <dc:Bounds x="950" y="66" width="100" height="80" /> </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_1getwnf_di" bpmnElement="SubProcess_1getwnf" isExpanded="true"> + <dc:Bounds x="172" y="276" width="231" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1c8o652_di" bpmnElement="StartEvent_1c8o652"> + <dc:Bounds x="211" y="334" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="184" y="370" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1emam1w_di" bpmnElement="EndEvent_1emam1w"> + <dc:Bounds x="348" y="334" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="321" y="370" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0gcots6_di" bpmnElement="SequenceFlow_0gcots6"> + <di:waypoint xsi:type="dc:Point" x="247" y="352" /> + <di:waypoint xsi:type="dc:Point" x="348" y="352" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="297.5" y="331" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn index a95dc9ce73..747265c2cf 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/CreateVolumeGroupBB.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.4.0"> +<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="CreateVolumeGroupBB" name="CreateVolumeGroupBB" isExecutable="true"> <bpmn:startEvent id="CreateVolumeGroupBB_Start" name="Start"> <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> @@ -8,17 +8,17 @@ <bpmn:endEvent id="CreateVolumeGroupBB_End"> <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="CreateVolumeGroupVnfAdapter" name="CreateVolumeGroupVnfAdapter Request" camunda:expression="${VnfAdapterCreateTasks.createVolumeGroupRequest(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="CreateVolumeGroupVnfAdapter" name="Create Request" camunda:expression="${VnfAdapterCreateTasks.createVolumeGroupRequest(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_06q6g74</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0kfkpbh</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0kfkpbh" sourceRef="CreateVolumeGroupVnfAdapter" targetRef="Vnf_Adapter" /> - <bpmn:serviceTask id="UpdateVolumeGroupAAI" name="UpdateVolumeGroupAAI" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVolumeGroupAAI" name=" AAI Update (volume) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1d5nux2</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0mh0v9h" sourceRef="UpdateVolumeGroupAAI" targetRef="CreateVolumeGroupBB_End" /> - <bpmn:serviceTask id="QueryVfModuleSDNC" name="Query Vf Module (SDNC)" camunda:expression="${SDNCQueryTasks.queryVfModuleForVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="QueryVfModuleSDNC" name=" SDNC Get (vnf) " camunda:expression="${SDNCQueryTasks.queryVfModuleForVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_06q6g74</bpmn:outgoing> </bpmn:serviceTask> @@ -28,17 +28,28 @@ <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="VNFREST_Request" target="VNFREST_Request" /> - <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:out source="heatStackId" target="heatStackId" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_0kfkpbh</bpmn:incoming> <bpmn:outgoing>SequenceFlow_06flg6h</bpmn:outgoing> </bpmn:callActivity> <bpmn:sequenceFlow id="SequenceFlow_06flg6h" sourceRef="Vnf_Adapter" targetRef="UpdateVolumeGroupHeatStackId" /> <bpmn:sequenceFlow id="SequenceFlow_1d5nux2" sourceRef="UpdateVolumeGroupHeatStackId" targetRef="UpdateVolumeGroupAAI" /> - <bpmn:serviceTask id="UpdateVolumeGroupHeatStackId" name="Update VolumeGroup HeatStackId (AAI)" camunda:expression="${AAIUpdateTasks.updateHeatStackIdVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVolumeGroupHeatStackId" name=" AAI Update (volume) " camunda:expression="${AAIUpdateTasks.updateHeatStackIdVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_06flg6h</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1d5nux2</bpmn:outgoing> </bpmn:serviceTask> + <bpmn:subProcess id="SubProcess_14koudj" name="Error Handling " triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_1f7qpgu"> + <bpmn:outgoing>SequenceFlow_1wtq4y7</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_0zycnsk"> + <bpmn:incoming>SequenceFlow_1wtq4y7</bpmn:incoming> + <bpmn:terminateEventDefinition /> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1wtq4y7" sourceRef="StartEvent_1f7qpgu" targetRef="EndEvent_0zycnsk" /> + </bpmn:subProcess> </bpmn:process> <bpmn:error id="Error_0pz4sdi" name="gDelegateError" errorCode="7000" /> <bpmn:escalation id="Escalation_1hjulni" name="Escalation_2cgup2p" /> @@ -113,6 +124,28 @@ <bpmndi:BPMNShape id="ServiceTask_0m035ns_di" bpmnElement="UpdateVolumeGroupHeatStackId"> <dc:Bounds x="774" y="80" width="100" height="80" /> </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_14koudj_di" bpmnElement="SubProcess_14koudj" isExpanded="true"> + <dc:Bounds x="310" y="264" width="231" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1f7qpgu_di" bpmnElement="StartEvent_1f7qpgu"> + <dc:Bounds x="350" y="323" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="323" y="359" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0zycnsk_di" bpmnElement="EndEvent_0zycnsk"> + <dc:Bounds x="487" y="323" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="460" y="359" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1wtq4y7_di" bpmnElement="SequenceFlow_1wtq4y7"> + <di:waypoint xsi:type="dc:Point" x="386" y="341" /> + <di:waypoint xsi:type="dc:Point" x="487" y="341" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="436.5" y="320" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn index 836f52b9be..5c85d17403 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateNetworkBB.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.7.2" 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="DeactivateNetworkBB" name="DeactivateNetworkBB" isExecutable="true"> <bpmn2:startEvent id="DeactivateNetworkBB_Start" name="Start"> <bpmn2:outgoing>SequenceFlow_05elmhj</bpmn2:outgoing> @@ -7,11 +7,11 @@ <bpmn2:endEvent id="DeactivateNetworkBB_End" name="End"> <bpmn2:incoming>SequenceFlow_18atf08</bpmn2:incoming> </bpmn2:endEvent> - <bpmn2:serviceTask id="DeactivateNetworkSDNC" name="Deactivate Network (SDNC)" camunda:expression="${SDNCDeactivateTasks.deactivateNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="DeactivateNetworkSDNC" name=" SDNC Deactivate Network " camunda:expression="${SDNCDeactivateTasks.deactivateNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_05elmhj</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_0xbvwsu</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="DeactivateNetworkAAI" name="Deactivate Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:serviceTask id="DeactivateNetworkAAI" name=" AAI Update (network) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_0xbvwsu</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_18atf08</bpmn2:outgoing> </bpmn2:serviceTask> @@ -25,46 +25,46 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeactivateNetworkBB"> <bpmndi:BPMNShape id="StartEvent_0lbwmd1_di" bpmnElement="DeactivateNetworkBB_Start"> - <dc:Bounds x="545" y="-55" width="36" height="36" /> + <dc:Bounds x="242" y="100" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="551" y="-14" width="24" height="12" /> + <dc:Bounds x="248" y="141" width="24" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_10l9a3s_di" bpmnElement="DeactivateNetworkBB_End"> - <dc:Bounds x="975" y="-55" width="36" height="36" /> + <dc:Bounds x="672" y="100" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="985" y="-19" width="19" height="12" /> + <dc:Bounds x="682" y="136" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1k7d8ih_di" bpmnElement="DeactivateNetworkSDNC"> - <dc:Bounds x="653" y="-77" width="100" height="80" /> + <dc:Bounds x="350" y="78" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1911vum_di" bpmnElement="DeactivateNetworkAAI"> - <dc:Bounds x="802" y="-77" width="100" height="80" /> + <dc:Bounds x="499" y="78" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_05elmhj_di" bpmnElement="SequenceFlow_05elmhj"> - <di:waypoint xsi:type="dc:Point" x="581" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="653" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="278" y="118" /> + <di:waypoint xsi:type="dc:Point" x="350" y="118" /> <bpmndi:BPMNLabel> - <dc:Bounds x="617" y="-62" width="0" height="0" /> + <dc:Bounds x="269" y="93" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0xbvwsu_di" bpmnElement="SequenceFlow_0xbvwsu"> - <di:waypoint xsi:type="dc:Point" x="753" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="778" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="778" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="802" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="450" y="118" /> + <di:waypoint xsi:type="dc:Point" x="475" y="118" /> + <di:waypoint xsi:type="dc:Point" x="475" y="118" /> + <di:waypoint xsi:type="dc:Point" x="499" y="118" /> <bpmndi:BPMNLabel> - <dc:Bounds x="793" y="-37" width="0" height="0" /> + <dc:Bounds x="445" y="118" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_18atf08_di" bpmnElement="SequenceFlow_18atf08"> - <di:waypoint xsi:type="dc:Point" x="902" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="939" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="939" y="-37" /> - <di:waypoint xsi:type="dc:Point" x="975" y="-37" /> + <di:waypoint xsi:type="dc:Point" x="599" y="118" /> + <di:waypoint xsi:type="dc:Point" x="636" y="118" /> + <di:waypoint xsi:type="dc:Point" x="636" y="118" /> + <di:waypoint xsi:type="dc:Point" x="672" y="118" /> <bpmndi:BPMNLabel> - <dc:Bounds x="954" y="-37" width="0" height="0" /> + <dc:Bounds x="606" y="118" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn index 80faf1378c..5284788b89 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateServiceInstanceBB.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.8.2"> +<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="DeactivateServiceInstanceBB" name="DeactivateServiceInstanceBB" isExecutable="true"> <bpmn:startEvent id="Start_DeactivateServiceInstanceBB" name="Start"> <bpmn:outgoing>SequenceFlow_101w1ck</bpmn:outgoing> @@ -9,11 +9,11 @@ </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_00q7fsg" sourceRef="Task_DeactivateServiceInstance_SDNC" targetRef="Task_DeactivateServiceInstance_AAI" /> <bpmn:sequenceFlow id="SequenceFlow_0pioehv" sourceRef="Task_DeactivateServiceInstance_AAI" targetRef="End_DeactivateServiceInstanceBB" /> - <bpmn:serviceTask id="Task_DeactivateServiceInstance_AAI" name="Update Service OStatus to Assigned (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_DeactivateServiceInstance_AAI" name=" AAI Update (svc instance) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedService(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_00q7fsg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0pioehv</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_DeactivateServiceInstance_SDNC" name="Service Instance Deactivate (SDNC)" camunda:expression="${SDNCDeactivateTasks.deactivateServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_DeactivateServiceInstance_SDNC" name=" SDNC Deactivate (svc instance) " camunda:expression="${SDNCDeactivateTasks.deactivateServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_101w1ck</bpmn:incoming> <bpmn:outgoing>SequenceFlow_00q7fsg</bpmn:outgoing> </bpmn:serviceTask> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn index 85cde2aca7..f30a1f18ce 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVfModuleBB.bpmn @@ -1,15 +1,15 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DeactivateVfModuleBB" name="DeactivateVfModuleBB" isExecutable="true"> <bpmn:startEvent id="DeactivateVfModuleBB_Start" name="Start"> <bpmn:outgoing>SequenceFlow_0m379r2</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="DeactivateVfModule" name="SDNC Vf Module Deactivate " camunda:expression="${SDNCDeactivateTasks.deactivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="DeactivateVfModule" name=" SDNC Deactivate (vf module) " camunda:expression="${SDNCDeactivateTasks.deactivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0m379r2</bpmn:incoming> <bpmn:outgoing>SequenceFlow_01bdpek</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0m379r2" sourceRef="DeactivateVfModuleBB_Start" targetRef="DeactivateVfModule" /> - <bpmn:serviceTask id="UpdateVfModuleDeactivateStatus" name="Deactivate OStatus (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusDeactivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleDeactivateStatus" name=" AAI Update (vf module) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusDeactivateVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_01bdpek</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1y1c7fh</bpmn:outgoing> </bpmn:serviceTask> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn index d6b7dd6534..790cab1737 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVnfBB.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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DeactivateVnfBB" name="DeactivateVnfBB" isExecutable="true"> <bpmn:startEvent id="Start_DeactivateVnfBB" name="start"> <bpmn:outgoing>SequenceFlow_0k9qnoi</bpmn:outgoing> @@ -10,11 +10,11 @@ <bpmn:incoming>SequenceFlow_0vnitwg</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_0vnitwg" sourceRef="Task_DeactivateOrchestrationStatusVnf" targetRef="End_DeactivateVnfBB" /> - <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyDeactivate" name="Call SDNC Adapter VNF Topology Deactivate" camunda:expression="${SDNCDeactivateTasks.deactivateVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_SDNCAdapterVnfTopologyDeactivate" name=" SDNC Deactivate (vnf) " camunda:expression="${SDNCDeactivateTasks.deactivateVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0k9qnoi</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0r6pzwt</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="Task_DeactivateOrchestrationStatusVnf" name="Deactivate Orchestration Status Vnf (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_DeactivateOrchestrationStatusVnf" name=" AAI Update (vnf) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0r6pzwt</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0vnitwg</bpmn:outgoing> </bpmn:serviceTask> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVolumeGroupBB.bpmn index 2b2e30b773..63a01d6573 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVolumeGroupBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeactivateVolumeGroupBB.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.8.2"> +<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="DeactivateVolumeGroupBB" name="DeactivateVolumeGroupBB" isExecutable="true"> <bpmn:startEvent id="DeactivateVolumeGroupBB_Start" name="Start"> <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> @@ -8,7 +8,7 @@ <bpmn:endEvent id="DeactivateVolumeGroupBB_End"> <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="DeactivateVolumeGroup" name="Deactivate VolumeGroup" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="DeactivateVolumeGroup" name=" AAI Update (volume) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusCreatedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> </bpmn:serviceTask> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkBB.bpmn index faa40600a5..95e481db4f 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteNetworkBB.bpmn @@ -1,20 +1,20 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DeleteNetworkBB" name="DeleteNetworkBB" isExecutable="true"> - <bpmn:startEvent id="deleteNetwork_startEvent" name="Start Flow"> + <bpmn:startEvent id="deleteNetwork_startEvent"> <bpmn:outgoing>SequenceFlow_1mc3d3f</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="updateNetworkAAI" name="Update Network (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="updateNetworkAAI" name=" AAI Update (network) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1c906im</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0nhd7b7</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1mc3d3f" sourceRef="deleteNetwork_startEvent" targetRef="deleteNetworkAIC" /> <bpmn:sequenceFlow id="SequenceFlow_1c906im" sourceRef="deleteNetworkAIC" targetRef="updateNetworkAAI" /> - <bpmn:serviceTask id="deleteNetworkAIC" name="Delete Network (AIC)" camunda:expression="${NetworkAdapterDeleteTasks.deleteNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="deleteNetworkAIC" name=" AIC Delete (network) " camunda:expression="${NetworkAdapterDeleteTasks.deleteNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1mc3d3f</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1c906im</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:endEvent id="deleteNetwork_endEvent" name="End Flow"> + <bpmn:endEvent id="deleteNetwork_endEvent"> <bpmn:incoming>SequenceFlow_0nhd7b7</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_0nhd7b7" sourceRef="updateNetworkAAI" targetRef="deleteNetwork_endEvent" /> @@ -38,24 +38,24 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0zd65z2_di" bpmnElement="updateNetworkAAI"> - <dc:Bounds x="555" y="80" width="100" height="80" /> + <dc:Bounds x="530" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1mc3d3f_di" bpmnElement="SequenceFlow_1mc3d3f"> <di:waypoint xsi:type="dc:Point" x="209" y="120" /> - <di:waypoint xsi:type="dc:Point" x="320" y="120" /> + <di:waypoint xsi:type="dc:Point" x="370" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="219.5" y="99" width="90" height="12" /> + <dc:Bounds x="244.5" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1c906im_di" bpmnElement="SequenceFlow_1c906im"> - <di:waypoint xsi:type="dc:Point" x="420" y="120" /> - <di:waypoint xsi:type="dc:Point" x="555" y="120" /> + <di:waypoint xsi:type="dc:Point" x="470" y="120" /> + <di:waypoint xsi:type="dc:Point" x="530" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="442.5" y="99" width="90" height="12" /> + <dc:Bounds x="455" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1gcfuzf_di" bpmnElement="deleteNetworkAIC"> - <dc:Bounds x="320" y="80" width="100" height="80" /> + <dc:Bounds x="370" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_02vxchc_di" bpmnElement="deleteNetwork_endEvent"> <dc:Bounds x="806" y="102" width="36" height="36" /> @@ -64,10 +64,10 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0nhd7b7_di" bpmnElement="SequenceFlow_0nhd7b7"> - <di:waypoint xsi:type="dc:Point" x="655" y="120" /> + <di:waypoint xsi:type="dc:Point" x="630" y="120" /> <di:waypoint xsi:type="dc:Point" x="806" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="685.5" y="99" width="90" height="12" /> + <dc:Bounds x="673" y="99" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn index 07d0b18938..5795c1c671 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVfModuleBB.bpmn @@ -1,7 +1,7 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="DeleteVfModuleBB" name="Start" isExecutable="true"> - <bpmn:startEvent id="DeleteVfModuleBB_Start" name="Start"> + <bpmn:startEvent id="DeleteVfModuleBB_Start"> <bpmn:outgoing>SequenceFlow_1537yw5</bpmn:outgoing> </bpmn:startEvent> <bpmn:serviceTask id="DeleteVfModuleVnfAdapter" name="Delete Vf Module VnfAdapter" camunda:expression="${VnfAdapterDeleteTasks.deleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> @@ -9,12 +9,12 @@ <bpmn:outgoing>SequenceFlow_08tvhtf</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_1537yw5" sourceRef="DeleteVfModuleBB_Start" targetRef="DeleteVfModuleVnfAdapter" /> - <bpmn:serviceTask id="UpdateVfModuleDeleteStatus" name="Update OStatus (AAI)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusDeleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UpdateVfModuleDeleteStatus" name=" AAI Update (vf module) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusDeleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_02lpx87</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1mxrfqv</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_08tvhtf" sourceRef="DeleteVfModuleVnfAdapter" targetRef="VnfAdapter" /> - <bpmn:endEvent id="DeleteVfModuleBB_End" name="End"> + <bpmn:endEvent id="DeleteVfModuleBB_End"> <bpmn:incoming>SequenceFlow_1mxrfqv</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_1mxrfqv" sourceRef="UpdateVfModuleDeleteStatus" targetRef="DeleteVfModuleBB_End" /> @@ -24,12 +24,23 @@ <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="deleteVfModuleRequest" target="deleteVfModuleRequest" /> <camunda:in source="VNFREST_Request" target="VNFREST_Request" /> - <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:out source="heatStackId" target="heatStackId" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_08tvhtf</bpmn:incoming> <bpmn:outgoing>SequenceFlow_02lpx87</bpmn:outgoing> </bpmn:callActivity> <bpmn:sequenceFlow id="SequenceFlow_02lpx87" sourceRef="VnfAdapter" targetRef="UpdateVfModuleDeleteStatus" /> + <bpmn:subProcess id="SubProcess_11p7mrh" name="Error Handling " triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_1xp6ewt"> + <bpmn:outgoing>SequenceFlow_0h607z0</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_0guhjau"> + <bpmn:incoming>SequenceFlow_0h607z0</bpmn:incoming> + <bpmn:terminateEventDefinition /> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0h607z0" sourceRef="StartEvent_1xp6ewt" targetRef="EndEvent_0guhjau" /> + </bpmn:subProcess> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVfModuleBB"> @@ -82,6 +93,28 @@ <dc:Bounds x="560" y="99" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="SubProcess_11p7mrh_di" bpmnElement="SubProcess_11p7mrh" isExpanded="true"> + <dc:Bounds x="261" y="276" width="231" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1xp6ewt_di" bpmnElement="StartEvent_1xp6ewt"> + <dc:Bounds x="304" y="338" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="277" y="374" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0guhjau_di" bpmnElement="EndEvent_0guhjau"> + <dc:Bounds x="433" y="338" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="406" y="374" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0h607z0_di" bpmnElement="SequenceFlow_0h607z0"> + <di:waypoint xsi:type="dc:Point" x="340" y="356" /> + <di:waypoint xsi:type="dc:Point" x="433" y="356" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="386.5" y="335" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVolumeGroupBB.bpmn index 6fd7773714..f2bd2246e4 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVolumeGroupBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/DeleteVolumeGroupBB.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="DeleteVolumeGroupBB" name="DeleteVolumeGroupBB" isExecutable="true"> <bpmn:startEvent id="DeleteVolumeGroupBB_Start" name="Start"> <bpmn:outgoing>SequenceFlow_1wz1rfg</bpmn:outgoing> @@ -8,16 +8,41 @@ <bpmn:endEvent id="DeleteVolumeGroupBB_End"> <bpmn:incoming>SequenceFlow_0mh0v9h</bpmn:incoming> </bpmn:endEvent> - <bpmn:serviceTask id="UpdateVolumeGroupAAI" name="Update Volume Group A&AI (AAI Assigned)" camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn:incoming>SequenceFlow_13ngwev</bpmn:incoming> + <bpmn:serviceTask id="UpdateVolumeGroupAAI" name=" AAI Update (volume grp) " camunda:expression="${AAIUpdateTasks.updateOrchestrationStatusAssignedVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_0fkan8t</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mh0v9h</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0mh0v9h" sourceRef="UpdateVolumeGroupAAI" targetRef="DeleteVolumeGroupBB_End" /> - <bpmn:sequenceFlow id="SequenceFlow_13ngwev" sourceRef="DeleteVolumeGroupVnfAdapter" targetRef="UpdateVolumeGroupAAI" /> + <bpmn:sequenceFlow id="SequenceFlow_13ngwev" sourceRef="DeleteVolumeGroupVnfAdapter" targetRef="VnfAdapter" /> <bpmn:serviceTask id="DeleteVolumeGroupVnfAdapter" name="Delete Volume Group Vnf Adapter (AIC Delete)" camunda:expression="${VnfAdapterDeleteTasks.deleteVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1wz1rfg</bpmn:incoming> <bpmn:outgoing>SequenceFlow_13ngwev</bpmn:outgoing> </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0fkan8t" sourceRef="VnfAdapter" targetRef="UpdateVolumeGroupAAI" /> + <bpmn:callActivity id="VnfAdapter" name="Vnf Adapter" calledElement="VnfAdapter"> + <bpmn:extensionElements> + <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:inputOutput> + <camunda:outputParameter name="Output_3bec9ju" /> + </camunda:inputOutput> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="heatStackId" target="heatStackId" /> + <camunda:in source="deleteVolumeGroupRequest" target="deleteVolumeGroupRequest" /> + <camunda:in source="VNFREST_Request" target="VNFREST_Request" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_13ngwev</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0fkan8t</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:subProcess id="SubProcess_089t601" name="Sub Process Error" triggeredByEvent="true"> + <bpmn:endEvent id="EndEvent_18lpeyi" name="End"> + <bpmn:incoming>SequenceFlow_07rsz9o</bpmn:incoming> + </bpmn:endEvent> + <bpmn:startEvent id="StartEvent_1gun94q" name="Start"> + <bpmn:outgoing>SequenceFlow_07rsz9o</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_07rsz9o" sourceRef="StartEvent_1gun94q" targetRef="EndEvent_18lpeyi" /> + </bpmn:subProcess> </bpmn:process> <bpmn:error id="Error_0pz4sdi" name="gDelegateError" errorCode="7000" /> <bpmn:escalation id="Escalation_1hjulni" name="Escalation_2cgup2p" /> @@ -37,31 +62,65 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1k6463v_di" bpmnElement="DeleteVolumeGroupBB_End"> - <dc:Bounds x="684" y="102" width="36" height="36" /> + <dc:Bounds x="824" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="657" y="142" width="90" height="12" /> + <dc:Bounds x="842" y="142" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0rytcj0_di" bpmnElement="UpdateVolumeGroupAAI"> - <dc:Bounds x="525" y="80" width="100" height="80" /> + <dc:Bounds x="665" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0mh0v9h_di" bpmnElement="SequenceFlow_0mh0v9h"> - <di:waypoint xsi:type="dc:Point" x="625" y="120" /> - <di:waypoint xsi:type="dc:Point" x="684" y="120" /> + <di:waypoint xsi:type="dc:Point" x="765" y="120" /> + <di:waypoint xsi:type="dc:Point" x="824" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="609.5" y="98.5" width="90" height="13" /> + <dc:Bounds x="795" y="99" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_13ngwev_di" bpmnElement="SequenceFlow_13ngwev"> <di:waypoint xsi:type="dc:Point" x="488" y="120" /> - <di:waypoint xsi:type="dc:Point" x="525" y="120" /> + <di:waypoint xsi:type="dc:Point" x="526" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="506.5" y="99" width="0" height="12" /> + <dc:Bounds x="507" y="105" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1nrp0hb_di" bpmnElement="DeleteVolumeGroupVnfAdapter"> <dc:Bounds x="388" y="80" width="100" height="80" /> </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0fkan8t_di" bpmnElement="SequenceFlow_0fkan8t"> + <di:waypoint xsi:type="dc:Point" x="626" y="120" /> + <di:waypoint xsi:type="dc:Point" x="665" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="646" y="105" width="0" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0li7q97_di" bpmnElement="VnfAdapter"> + <dc:Bounds x="526" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_089t601_di" bpmnElement="SubProcess_089t601" isExpanded="true"> + <dc:Bounds x="459" y="242" width="233" height="135" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_18lpeyi_di" bpmnElement="EndEvent_18lpeyi"> + <dc:Bounds x="613" y="287" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="622" y="327" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1gun94q_di" bpmnElement="StartEvent_1gun94q"> + <dc:Bounds x="498" y="287" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="505" y="327" width="24" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_07rsz9o_di" bpmnElement="SequenceFlow_07rsz9o"> + <di:waypoint xsi:type="dc:Point" x="534" y="305" /> + <di:waypoint xsi:type="dc:Point" x="573" y="305" /> + <di:waypoint xsi:type="dc:Point" x="573" y="305" /> + <di:waypoint xsi:type="dc:Point" x="613" y="305" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="543" y="305" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn index 8640f7e069..01d88b91dc 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.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.8.2"> +<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="ExecuteBuildingBlock" name="ExecuteBuildingBlock" isExecutable="true"> <bpmn:startEvent id="Start_ExecuteBuildingBlock" name="start"> <bpmn:outgoing>SequenceFlow_0rq4c5r</bpmn:outgoing> @@ -38,271 +38,240 @@ <bpmn:outgoing>SequenceFlow_1ryv9sh</bpmn:outgoing> </bpmn:exclusiveGateway> <bpmn:sequenceFlow id="SequenceFlow_0je0y25" sourceRef="StatusPolicy" targetRef="CheckOrchestrationStatusValidationResults" /> - <bpmn:boundaryEvent id="BoundaryEvent_0i3q236" attachedToRef="Task_BBInputSetup"> - <bpmn:outgoing>SequenceFlow_0yeaaxu</bpmn:outgoing> - <bpmn:errorEventDefinition errorRef="Error_17zcdbk" /> - </bpmn:boundaryEvent> - <bpmn:serviceTask id="Task_QueryRainyDayTable" name="QueryRainyDayTable" camunda:expression="${ExecuteBuildingBlockRainyDay.queryRainyDayTable(execution)}"> - <bpmn:incoming>SequenceFlow_0yeaaxu</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1b5op07</bpmn:incoming> - <bpmn:incoming>SequenceFlow_030qtgc</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0a62t4c</bpmn:outgoing> - </bpmn:serviceTask> - <bpmn:endEvent id="ErrorEnd2" name="end"> - <bpmn:incoming>SequenceFlow_0h8v45y</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1db2c7t</bpmn:incoming> - </bpmn:endEvent> - <bpmn:exclusiveGateway id="ExclusiveGateway_1aonzik" name="Check HandlingCode" default="SequenceFlow_0h8v45y"> - <bpmn:incoming>SequenceFlow_0a62t4c</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0fwsjva</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0h8v45y</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_RetryTimer" name="RetryTimer"> - <bpmn:incoming>SequenceFlow_0ndt8ft</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_07a1ytc</bpmn:outgoing> - <bpmn:timerEventDefinition> - <bpmn:timeDuration xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("RetryDuration")}]]></bpmn:timeDuration> - </bpmn:timerEventDefinition> - </bpmn:intermediateCatchEvent> - <bpmn:exclusiveGateway id="ExclusiveGateway_0ey4zpt" name="Retries Left?"> - <bpmn:incoming>SequenceFlow_0fwsjva</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1wbevp0</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_1db2c7t</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:endEvent id="EndEvent_1sez2lh" name="end"> - <bpmn:incoming>SequenceFlow_07a1ytc</bpmn:incoming> - </bpmn:endEvent> - <bpmn:serviceTask id="Task_SetRetryTimer" name="Set Retry Timer" camunda:expression="${ExecuteBuildingBlockRainyDay.setRetryTimer(execution)}"> - <bpmn:incoming>SequenceFlow_1wbevp0</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0ndt8ft</bpmn:outgoing> - </bpmn:serviceTask> - <bpmn:sequenceFlow id="SequenceFlow_0h8v45y" name="Rollback or Abort" sourceRef="ExclusiveGateway_1aonzik" targetRef="ErrorEnd2" /> - <bpmn:sequenceFlow id="SequenceFlow_1db2c7t" name="no" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="ErrorEnd2" /> - <bpmn:sequenceFlow id="SequenceFlow_0fwsjva" name="Retry" sourceRef="ExclusiveGateway_1aonzik" targetRef="ExclusiveGateway_0ey4zpt"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Retry"}]]></bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_0ndt8ft" sourceRef="Task_SetRetryTimer" targetRef="IntermediateCatchEvent_RetryTimer" /> - <bpmn:sequenceFlow id="SequenceFlow_07a1ytc" sourceRef="IntermediateCatchEvent_RetryTimer" targetRef="EndEvent_1sez2lh" /> - <bpmn:sequenceFlow id="SequenceFlow_1wbevp0" name="yes" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="Task_SetRetryTimer"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("retryCount")<5}]]></bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_0a62t4c" sourceRef="Task_QueryRainyDayTable" targetRef="ExclusiveGateway_1aonzik" /> - <bpmn:sequenceFlow id="SequenceFlow_0yeaaxu" sourceRef="BoundaryEvent_0i3q236" targetRef="Task_QueryRainyDayTable" /> - <bpmn:sequenceFlow id="SequenceFlow_1b5op07" sourceRef="BoundaryEvent_0c2v381" targetRef="Task_QueryRainyDayTable" /> - <bpmn:sequenceFlow id="SequenceFlow_030qtgc" sourceRef="BoundaryEvent_1jzujri" targetRef="Task_QueryRainyDayTable" /> - <bpmn:boundaryEvent id="BoundaryEvent_1jzujri" attachedToRef="Call_BBToExecute"> - <bpmn:outgoing>SequenceFlow_030qtgc</bpmn:outgoing> - <bpmn:errorEventDefinition errorRef="Error_17zcdbk" /> - </bpmn:boundaryEvent> - <bpmn:boundaryEvent id="BoundaryEvent_0c2v381" attachedToRef="StatusPolicy"> - <bpmn:outgoing>SequenceFlow_1b5op07</bpmn:outgoing> - <bpmn:errorEventDefinition errorRef="Error_17zcdbk" /> - </bpmn:boundaryEvent> + <bpmn:subProcess id="SubProcess_0tv8zda" name="Error Handling " triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_0tmcs9g"> + <bpmn:outgoing>SequenceFlow_09synl9</bpmn:outgoing> + <bpmn:errorEventDefinition /> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_09synl9" sourceRef="StartEvent_0tmcs9g" targetRef="Task_QueryRainyDayTable" /> + <bpmn:serviceTask id="Task_QueryRainyDayTable" name="QueryRainyDayTable" camunda:expression="${ExecuteBuildingBlockRainyDay.queryRainyDayTable(execution)}"> + <bpmn:incoming>SequenceFlow_09synl9</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0a62t4c</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:endEvent id="ErrorEnd2"> + <bpmn:incoming>SequenceFlow_1db2c7t</bpmn:incoming> + </bpmn:endEvent> + <bpmn:exclusiveGateway id="ExclusiveGateway_1aonzik" name="Check HandlingCode" default="SequenceFlow_0h8v45y"> + <bpmn:incoming>SequenceFlow_0a62t4c</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0fwsjva</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0h8v45y</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_RetryTimer" name="RetryTimer"> + <bpmn:incoming>SequenceFlow_0ndt8ft</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_07a1ytc</bpmn:outgoing> + <bpmn:timerEventDefinition> + <bpmn:timeDuration xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("RetryDuration")}]]></bpmn:timeDuration> + </bpmn:timerEventDefinition> + </bpmn:intermediateCatchEvent> + <bpmn:exclusiveGateway id="ExclusiveGateway_0ey4zpt" name="Retries Left?"> + <bpmn:incoming>SequenceFlow_0fwsjva</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1wbevp0</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1db2c7t</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:serviceTask id="Task_SetRetryTimer" name="Set Retry Timer" camunda:expression="${ExecuteBuildingBlockRainyDay.setRetryTimer(execution)}"> + <bpmn:incoming>SequenceFlow_1wbevp0</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0ndt8ft</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0a62t4c" sourceRef="Task_QueryRainyDayTable" targetRef="ExclusiveGateway_1aonzik" /> + <bpmn:sequenceFlow id="SequenceFlow_0h8v45y" name="Rollback or Abort" sourceRef="ExclusiveGateway_1aonzik" targetRef="EndEvent_0mvmk3i" /> + <bpmn:sequenceFlow id="SequenceFlow_1db2c7t" name="no" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="ErrorEnd2" /> + <bpmn:sequenceFlow id="SequenceFlow_0fwsjva" name="Retry" sourceRef="ExclusiveGateway_1aonzik" targetRef="ExclusiveGateway_0ey4zpt"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Retry"}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_0ndt8ft" sourceRef="Task_SetRetryTimer" targetRef="IntermediateCatchEvent_RetryTimer" /> + <bpmn:sequenceFlow id="SequenceFlow_07a1ytc" sourceRef="IntermediateCatchEvent_RetryTimer" targetRef="EndEvent_1sez2lh" /> + <bpmn:sequenceFlow id="SequenceFlow_1wbevp0" name="yes" sourceRef="ExclusiveGateway_0ey4zpt" targetRef="Task_SetRetryTimer"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("retryCount")<5}]]></bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:endEvent id="EndEvent_0mvmk3i"> + <bpmn:incoming>SequenceFlow_0h8v45y</bpmn:incoming> + </bpmn:endEvent> + <bpmn:endEvent id="EndEvent_1sez2lh" name="end"> + <bpmn:incoming>SequenceFlow_07a1ytc</bpmn:incoming> + <bpmn:terminateEventDefinition /> + </bpmn:endEvent> + </bpmn:subProcess> </bpmn:process> <bpmn:error id="Error_0tnktdw" name="Error" errorCode="java.lang.Exception" /> <bpmn:error id="Error_17zcdbk" name="Bpmn Error" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ExecuteBuildingBlock"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_ExecuteBuildingBlock"> - <dc:Bounds x="-46" y="162" width="36" height="36" /> + <dc:Bounds x="42" y="162" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-39" y="198" width="23" height="12" /> + <dc:Bounds x="49" y="198" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_0n67obl_di" bpmnElement="Call_BBToExecute"> - <dc:Bounds x="501" y="140" width="100" height="80" /> + <dc:Bounds x="589" y="140" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0rq4c5r_di" bpmnElement="SequenceFlow_0rq4c5r"> - <di:waypoint xsi:type="dc:Point" x="-10" y="180" /> - <di:waypoint xsi:type="dc:Point" x="53" y="180" /> + <di:waypoint xsi:type="dc:Point" x="78" y="180" /> + <di:waypoint xsi:type="dc:Point" x="141" y="180" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-23.5" y="165" width="90" height="0" /> + <dc:Bounds x="65" y="165" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0uzwjrq_di" bpmnElement="SequenceFlow_0uzwjrq"> - <di:waypoint xsi:type="dc:Point" x="153" y="180" /> - <di:waypoint xsi:type="dc:Point" x="219" y="180" /> + <di:waypoint xsi:type="dc:Point" x="241" y="180" /> + <di:waypoint xsi:type="dc:Point" x="307" y="180" /> <bpmndi:BPMNLabel> - <dc:Bounds x="141" y="165" width="90" height="0" /> + <dc:Bounds x="229" y="165" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1jcuk3b_di" bpmnElement="Task_BBInputSetup"> - <dc:Bounds x="53" y="140" width="100" height="80" /> + <dc:Bounds x="141" y="140" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_0ahsxzi_di" bpmnElement="End_ExecuteBuildingBlock"> - <dc:Bounds x="668" y="162" width="36" height="36" /> + <dc:Bounds x="808" y="162" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="677" y="202" width="18" height="12" /> + <dc:Bounds x="817" y="202" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_01h9qmz_di" bpmnElement="SequenceFlow_01h9qmz"> - <di:waypoint xsi:type="dc:Point" x="601" y="180" /> - <di:waypoint xsi:type="dc:Point" x="668" y="180" /> + <di:waypoint xsi:type="dc:Point" x="689" y="180" /> + <di:waypoint xsi:type="dc:Point" x="808" y="180" /> <bpmndi:BPMNLabel> - <dc:Bounds x="589.5" y="159" width="90" height="12" /> + <dc:Bounds x="703.5" y="159" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ExclusiveGateway_0ey4zpt_di" bpmnElement="ExclusiveGateway_0ey4zpt" isMarkerVisible="true"> - <dc:Bounds x="392" y="493" width="50" height="50" /> + <dc:Bounds x="435" y="467" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="386" y="468" width="63" height="13" /> + <dc:Bounds x="430" y="442" width="62" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="IntermediateCatchEvent_0qjyidb_di" bpmnElement="IntermediateCatchEvent_RetryTimer"> - <dc:Bounds x="655" y="500" width="36" height="36" /> + <dc:Bounds x="668" y="474" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="645" y="475" width="55" height="13" /> + <dc:Bounds x="658" y="449" width="56" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_1aonzik_di" bpmnElement="ExclusiveGateway_1aonzik" isMarkerVisible="true"> - <dc:Bounds x="264" y="493" width="50" height="50" /> + <dc:Bounds x="324" y="467" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="236" y="456" width="70" height="25" /> + <dc:Bounds x="315" y="429" width="68" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1wbevp0_di" bpmnElement="SequenceFlow_1wbevp0"> - <di:waypoint xsi:type="dc:Point" x="442" y="518" /> - <di:waypoint xsi:type="dc:Point" x="507" y="518" /> + <di:waypoint xsi:type="dc:Point" x="485" y="492" /> + <di:waypoint xsi:type="dc:Point" x="539" y="492" /> <bpmndi:BPMNLabel> - <dc:Bounds x="458" y="493" width="18" height="13" /> + <dc:Bounds x="496.68461538461537" y="467" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0fwsjva_di" bpmnElement="SequenceFlow_0fwsjva"> - <di:waypoint xsi:type="dc:Point" x="314" y="518" /> - <di:waypoint xsi:type="dc:Point" x="392" y="518" /> + <di:waypoint xsi:type="dc:Point" x="374" y="492" /> + <di:waypoint xsi:type="dc:Point" x="435" y="492" /> <bpmndi:BPMNLabel> - <dc:Bounds x="339" y="526" width="27" height="13" /> + <dc:Bounds x="390.60897435897436" y="500" width="27" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0h8v45y_di" bpmnElement="SequenceFlow_0h8v45y"> - <di:waypoint xsi:type="dc:Point" x="289" y="543" /> - <di:waypoint xsi:type="dc:Point" x="289" y="617" /> - <di:waypoint xsi:type="dc:Point" x="475" y="617" /> + <di:waypoint xsi:type="dc:Point" x="349" y="517" /> + <di:waypoint xsi:type="dc:Point" x="349" y="573" /> <bpmndi:BPMNLabel> - <dc:Bounds x="323" y="624" width="85" height="13" /> + <dc:Bounds x="355" y="538" width="85" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_0svi3iy_di" bpmnElement="ErrorEnd2"> - <dc:Bounds x="475" y="599" width="36" height="36" /> + <dc:Bounds x="442" y="573" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="484" y="639" width="19" height="13" /> + <dc:Bounds x="452" y="613" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_1tifgqh_di" bpmnElement="Task_QueryRainyDayTable"> - <dc:Bounds x="80" y="478" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_1sez2lh_di" bpmnElement="EndEvent_1sez2lh"> - <dc:Bounds x="733" y="500" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="742" y="540" width="19" height="13" /> - </bpmndi:BPMNLabel> + <dc:Bounds x="181" y="452" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1db2c7t_di" bpmnElement="SequenceFlow_1db2c7t"> - <di:waypoint xsi:type="dc:Point" x="417" y="543" /> - <di:waypoint xsi:type="dc:Point" x="417" y="574" /> - <di:waypoint xsi:type="dc:Point" x="493" y="574" /> - <di:waypoint xsi:type="dc:Point" x="493" y="599" /> + <di:waypoint xsi:type="dc:Point" x="460" y="517" /> + <di:waypoint xsi:type="dc:Point" x="460" y="573" /> <bpmndi:BPMNLabel> - <dc:Bounds x="449" y="553" width="13" height="13" /> + <dc:Bounds x="469" y="518.5833333333333" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0ndt8ft_di" bpmnElement="SequenceFlow_0ndt8ft"> - <di:waypoint xsi:type="dc:Point" x="607" y="518" /> - <di:waypoint xsi:type="dc:Point" x="655" y="518" /> + <di:waypoint xsi:type="dc:Point" x="639" y="492" /> + <di:waypoint xsi:type="dc:Point" x="668" y="492" /> <bpmndi:BPMNLabel> - <dc:Bounds x="586" y="497" width="90" height="12" /> + <dc:Bounds x="608.5" y="471" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_07a1ytc_di" bpmnElement="SequenceFlow_07a1ytc"> - <di:waypoint xsi:type="dc:Point" x="691" y="518" /> - <di:waypoint xsi:type="dc:Point" x="733" y="518" /> + <di:waypoint xsi:type="dc:Point" x="704" y="492" /> + <di:waypoint xsi:type="dc:Point" x="753" y="492" /> <bpmndi:BPMNLabel> - <dc:Bounds x="667" y="497" width="90" height="12" /> + <dc:Bounds x="683.5" y="471" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1obvxht_di" bpmnElement="Task_SetRetryTimer"> - <dc:Bounds x="507" y="478" width="100" height="80" /> + <dc:Bounds x="539" y="452" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0kdjsnx_di" bpmnElement="Continue"> - <di:waypoint xsi:type="dc:Point" x="420" y="180" /> - <di:waypoint xsi:type="dc:Point" x="501" y="180" /> + <di:waypoint xsi:type="dc:Point" x="508" y="180" /> + <di:waypoint xsi:type="dc:Point" x="589" y="180" /> <bpmndi:BPMNLabel> - <dc:Bounds x="439.6328125" y="159" width="43" height="12" /> + <dc:Bounds x="528" y="159" width="43" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0brnbqx_di" bpmnElement="StatusPolicy"> - <dc:Bounds x="219" y="140" width="100" height="80" /> + <dc:Bounds x="307" y="140" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1ryv9sh_di" bpmnElement="SequenceFlow_1ryv9sh"> - <di:waypoint xsi:type="dc:Point" x="395" y="155" /> - <di:waypoint xsi:type="dc:Point" x="395" y="75" /> - <di:waypoint xsi:type="dc:Point" x="686" y="75" /> - <di:waypoint xsi:type="dc:Point" x="686" y="162" /> + <di:waypoint xsi:type="dc:Point" x="483" y="155" /> + <di:waypoint xsi:type="dc:Point" x="483" y="75" /> + <di:waypoint xsi:type="dc:Point" x="826" y="75" /> + <di:waypoint xsi:type="dc:Point" x="826" y="162" /> <bpmndi:BPMNLabel> - <dc:Bounds x="506.4229651162791" y="54" width="69" height="12" /> + <dc:Bounds x="620" y="54" width="69" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ExclusiveGateway_0f8ghh3_di" bpmnElement="CheckOrchestrationStatusValidationResults" isMarkerVisible="true"> - <dc:Bounds x="370" y="155" width="50" height="50" /> + <dc:Bounds x="458" y="155" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="354" y="209" width="87" height="48" /> + <dc:Bounds x="442" y="209" width="87" height="48" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0je0y25_di" bpmnElement="SequenceFlow_0je0y25"> - <di:waypoint xsi:type="dc:Point" x="319" y="180" /> - <di:waypoint xsi:type="dc:Point" x="370" y="180" /> + <di:waypoint xsi:type="dc:Point" x="407" y="180" /> + <di:waypoint xsi:type="dc:Point" x="458" y="180" /> <bpmndi:BPMNLabel> - <dc:Bounds x="344.5" y="159" width="0" height="12" /> + <dc:Bounds x="388" y="159" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="BoundaryEvent_1xzskt3_di" bpmnElement="BoundaryEvent_0i3q236"> - <dc:Bounds x="135" y="202" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="153" y="241" width="0" height="13" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0a62t4c_di" bpmnElement="SequenceFlow_0a62t4c"> - <di:waypoint xsi:type="dc:Point" x="180" y="518" /> - <di:waypoint xsi:type="dc:Point" x="264" y="518" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="222" y="496" width="0" height="13" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0yeaaxu_di" bpmnElement="SequenceFlow_0yeaaxu"> - <di:waypoint xsi:type="dc:Point" x="153" y="238" /> - <di:waypoint xsi:type="dc:Point" x="153" y="302" /> - <di:waypoint xsi:type="dc:Point" x="130" y="302" /> - <di:waypoint xsi:type="dc:Point" x="130" y="478" /> + <di:waypoint xsi:type="dc:Point" x="281" y="492" /> + <di:waypoint xsi:type="dc:Point" x="324" y="492" /> <bpmndi:BPMNLabel> - <dc:Bounds x="141.5" y="280.5" width="0" height="13" /> + <dc:Bounds x="257.5" y="470.5" width="90" height="13" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1b5op07_di" bpmnElement="SequenceFlow_1b5op07"> - <di:waypoint xsi:type="dc:Point" x="235" y="226" /> - <di:waypoint xsi:type="dc:Point" x="190" y="331" /> - <di:waypoint xsi:type="dc:Point" x="166" y="473" /> + <bpmndi:BPMNShape id="SubProcess_0tv8zda_di" bpmnElement="SubProcess_0tv8zda" isExpanded="true"> + <dc:Bounds x="76" y="376" width="733" height="253" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_0tmcs9g_di" bpmnElement="StartEvent_0tmcs9g"> + <dc:Bounds x="96" y="474" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="212.5" y="257" width="0" height="13" /> + <dc:Bounds x="24" y="510" width="0" height="12" /> </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_030qtgc_di" bpmnElement="SequenceFlow_030qtgc"> - <di:waypoint xsi:type="dc:Point" x="504" y="231" /> - <di:waypoint xsi:type="dc:Point" x="334" y="373" /> - <di:waypoint xsi:type="dc:Point" x="177" y="485" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_09synl9_di" bpmnElement="SequenceFlow_09synl9"> + <di:waypoint xsi:type="dc:Point" x="132" y="492" /> + <di:waypoint xsi:type="dc:Point" x="181" y="492" /> <bpmndi:BPMNLabel> - <dc:Bounds x="419" y="280.5" width="0" height="13" /> + <dc:Bounds x="156.5" y="471" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="BoundaryEvent_0k0rmt1_di" bpmnElement="BoundaryEvent_1jzujri"> - <dc:Bounds x="499" y="202" width="36" height="36" /> + <bpmndi:BPMNShape id="EndEvent_0mvmk3i_di" bpmnElement="EndEvent_0mvmk3i"> + <dc:Bounds x="331" y="573" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="517" y="241" width="0" height="13" /> + <dc:Bounds x="349" y="613" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="BoundaryEvent_1pw6a23_di" bpmnElement="BoundaryEvent_0c2v381"> - <dc:Bounds x="233" y="202" width="36" height="36" /> + <bpmndi:BPMNShape id="EndEvent_1aww7yx_di" bpmnElement="EndEvent_1sez2lh"> + <dc:Bounds x="753" y="474" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="251" y="241" width="0" height="13" /> + <dc:Bounds x="763" y="514" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/GenericVnfHealthCheckBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/GenericVnfHealthCheckBB.bpmn new file mode 100644 index 0000000000..d7828c5163 --- /dev/null +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/GenericVnfHealthCheckBB.bpmn @@ -0,0 +1,56 @@ +<?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:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0ky0lyw" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.2"> + <bpmn:process id="GenericVnfHealthCheckBB" name="GenericVnfHealthCheckBB" isExecutable="true"> + <bpmn:startEvent id="Start_GenericVnfHealthChkBB" name="Start"> + <bpmn:outgoing>SequenceFlow_06ab7wm</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:serviceTask id="SetParamsHealthCheck" name="Set Params HealthCheck" camunda:expression="${GenericVnfHealthCheck.setParamsForGenericVnfHealthCheck(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_06ab7wm</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1yhmh9s</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_06ab7wm" sourceRef="Start_GenericVnfHealthChkBB" targetRef="SetParamsHealthCheck" /> + <bpmn:endEvent id="End_GenericVnfHealthChkBB" name="End"> + <bpmn:incoming>SequenceFlow_12srn62</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1yhmh9s" sourceRef="SetParamsHealthCheck" targetRef="Call-AppC-HealthCheck" /> + <bpmn:sequenceFlow id="SequenceFlow_12srn62" sourceRef="Call-AppC-HealthCheck" targetRef="End_GenericVnfHealthChkBB" /> + <bpmn:serviceTask id="Call-AppC-HealthCheck" name="Call APP-C For HealthCheck " camunda:expression="${GenericVnfHealthCheck.callAppcClient(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:incoming>SequenceFlow_1yhmh9s</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_12srn62</bpmn:outgoing> + </bpmn:serviceTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericVnfHealthCheckBB"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_GenericVnfHealthChkBB"> + <dc:Bounds x="173" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="145" width="25" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_1juzqvs_di" bpmnElement="SetParamsHealthCheck"> + <dc:Bounds x="261" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_06ab7wm_di" bpmnElement="SequenceFlow_06ab7wm"> + <di:waypoint x="209" y="120" /> + <di:waypoint x="261" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_07e01q3_di" bpmnElement="End_GenericVnfHealthChkBB"> + <dc:Bounds x="554" y="102" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="562" y="145" width="20" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1yhmh9s_di" bpmnElement="SequenceFlow_1yhmh9s"> + <di:waypoint x="361" y="120" /> + <di:waypoint x="413" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_12srn62_di" bpmnElement="SequenceFlow_12srn62"> + <di:waypoint x="513" y="120" /> + <di:waypoint x="554" y="120" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0d1v1dn_di" bpmnElement="Call-AppC-HealthCheck"> + <dc:Bounds x="413" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions>
\ No newline at end of file diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn deleted file mode 100644 index 212e735dd1..0000000000 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetwork1802BB.bpmn +++ /dev/null @@ -1,80 +0,0 @@ -<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> - <bpmn:process id="UnassignNetwork1802BB" name="UnassignNetwork1802BB" isExecutable="true"> - <bpmn:startEvent id="Start_UnassignNetworkBB" name="start"> - <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> - </bpmn:startEvent> - <bpmn:serviceTask id="Task_SNDCUnAssign" name="Call SDNC Adapter Topology UnAssign" camunda:expression="${SDNCUnassignTasks.unassignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn:incoming>SequenceFlow_0le4vrj</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1ks8kmt</bpmn:outgoing> - </bpmn:serviceTask> - <bpmn:endEvent id="End_UnassignNetworkBB" name="end"> - <bpmn:incoming>SequenceFlow_1ks8kmt</bpmn:incoming> - </bpmn:endEvent> - <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_UnassignNetworkBB" targetRef="Task_VfModuleRelatioship" /> - <bpmn:sequenceFlow id="SequenceFlow_1ks8kmt" sourceRef="Task_SNDCUnAssign" targetRef="End_UnassignNetworkBB" /> - <bpmn:serviceTask id="Task_VfModuleRelatioship" name="Veriyf 'vf-module' relationship exists" camunda:expression="${UnassignNetworkBB.checkRelationshipRelatedTo(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), "vf-module")}"> - <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0mxe1a7</bpmn:outgoing> - </bpmn:serviceTask> - <bpmn:sequenceFlow id="SequenceFlow_0mxe1a7" sourceRef="Task_VfModuleRelatioship" targetRef="Task_GetCloudRegionVersion" /> - <bpmn:sequenceFlow id="SequenceFlow_0le4vrj" sourceRef="Task_GetCloudRegionVersion" targetRef="Task_SNDCUnAssign" /> - <bpmn:serviceTask id="Task_GetCloudRegionVersion" name="Get Sdnc Cloud Region Version" camunda:expression="${UnassignNetworkBB.getCloudSdncRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn:incoming>SequenceFlow_0mxe1a7</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0le4vrj</bpmn:outgoing> - </bpmn:serviceTask> - </bpmn:process> - <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignNetwork1802BB"> - <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_UnassignNetworkBB"> - <dc:Bounds x="288" y="119" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="295" y="155" width="22" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_0m0ikey_di" bpmnElement="Task_SNDCUnAssign"> - <dc:Bounds x="665" y="97" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="End_UnassignNetworkBB"> - <dc:Bounds x="817" y="119" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="826" y="159" width="18" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> - <di:waypoint xsi:type="dc:Point" x="324" y="137" /> - <di:waypoint xsi:type="dc:Point" x="375" y="137" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="304.5" y="122" width="90" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1ks8kmt_di" bpmnElement="SequenceFlow_1ks8kmt"> - <di:waypoint xsi:type="dc:Point" x="765" y="137" /> - <di:waypoint xsi:type="dc:Point" x="817" y="137" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="791" y="122" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_194x6el_di" bpmnElement="Task_VfModuleRelatioship"> - <dc:Bounds x="375" y="97" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0mxe1a7_di" bpmnElement="SequenceFlow_0mxe1a7"> - <di:waypoint xsi:type="dc:Point" x="475" y="137" /> - <di:waypoint xsi:type="dc:Point" x="524" y="137" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="500" y="122" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0le4vrj_di" bpmnElement="SequenceFlow_0le4vrj"> - <di:waypoint xsi:type="dc:Point" x="624" y="137" /> - <di:waypoint xsi:type="dc:Point" x="665" y="137" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="645" y="122" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_1ev9w69_di" bpmnElement="Task_GetCloudRegionVersion"> - <dc:Bounds x="524" y="97" width="100" height="80" /> - </bpmndi:BPMNShape> - </bpmndi:BPMNPlane> - </bpmndi:BPMNDiagram> -</bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn index 208e41f174..fdae49fdda 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignNetworkBB.bpmn @@ -1,33 +1,28 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="UnassignNetworkBB" name="UnassignNetworkBB" isExecutable="true"> <bpmn:startEvent id="Start_UnassignNetworkBB" name="start"> <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="Task_SNDCUnAssign" name="Call SDNC Adapter Topology UnAssign" camunda:expression="${SDNCUnassignTasks.unassignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_SNDCUnAssign" name=" SDNC Unassign (network) " camunda:expression="${SDNCUnassignTasks.unassignNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0le4vrj</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1ks8kmt</bpmn:outgoing> </bpmn:serviceTask> <bpmn:endEvent id="End_UnassignNetworkBB" name="end"> <bpmn:incoming>SequenceFlow_0csh9dc</bpmn:incoming> </bpmn:endEvent> - <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_UnassignNetworkBB" targetRef="Task_GetL3NetworkById" /> + <bpmn:sequenceFlow id="SequenceFlow_0zaz9o2" sourceRef="Start_UnassignNetworkBB" targetRef="Task_VfModuleRelatioship" /> <bpmn:sequenceFlow id="SequenceFlow_1ks8kmt" sourceRef="Task_SNDCUnAssign" targetRef="Task_DeleteNetwork" /> <bpmn:sequenceFlow id="SequenceFlow_0csh9dc" sourceRef="Task_DeleteNetwork" targetRef="End_UnassignNetworkBB" /> - <bpmn:serviceTask id="Task_DeleteNetwork" name="Delete Network (AAI)" camunda:expression="${AAIDeleteTasks.deleteNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_DeleteNetwork" name=" AAI Delete (network) " camunda:expression="${AAIDeleteTasks.deleteNetwork(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1ks8kmt</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0csh9dc</bpmn:outgoing> </bpmn:serviceTask> <bpmn:serviceTask id="Task_VfModuleRelatioship" name="Veriyf 'vf-module' relationship exists" camunda:expression="${UnassignNetworkBB.checkRelationshipRelatedTo(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), "vf-module")}"> - <bpmn:incoming>SequenceFlow_1gd5h4c</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mxe1a7</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0mxe1a7" sourceRef="Task_VfModuleRelatioship" targetRef="Task_GetCloudRegionVersion" /> - <bpmn:sequenceFlow id="SequenceFlow_1gd5h4c" sourceRef="Task_GetL3NetworkById" targetRef="Task_VfModuleRelatioship" /> - <bpmn:serviceTask id="Task_GetL3NetworkById" name="Get L3Network by networkId (AAI)" camunda:expression="${AAIQueryTasks.getNetworkWrapperById(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn:incoming>SequenceFlow_0zaz9o2</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1gd5h4c</bpmn:outgoing> - </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0le4vrj" sourceRef="Task_GetCloudRegionVersion" targetRef="Task_SNDCUnAssign" /> <bpmn:serviceTask id="Task_GetCloudRegionVersion" name="Get Sdnc Cloud Region Version" camunda:expression="${UnassignNetworkBB.getCloudSdncRegion(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0mxe1a7</bpmn:incoming> @@ -37,9 +32,9 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignNetworkBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_UnassignNetworkBB"> - <dc:Bounds x="145" y="119" width="36" height="36" /> + <dc:Bounds x="269" y="119" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="152" y="155" width="22" height="12" /> + <dc:Bounds x="276" y="155" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0m0ikey_di" bpmnElement="Task_SNDCUnAssign"> @@ -52,10 +47,10 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0zaz9o2_di" bpmnElement="SequenceFlow_0zaz9o2"> - <di:waypoint xsi:type="dc:Point" x="181" y="137" /> - <di:waypoint xsi:type="dc:Point" x="232" y="137" /> + <di:waypoint xsi:type="dc:Point" x="305" y="137" /> + <di:waypoint xsi:type="dc:Point" x="375" y="137" /> <bpmndi:BPMNLabel> - <dc:Bounds x="207" y="122" width="0" height="0" /> + <dc:Bounds x="295" y="122" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1ks8kmt_di" bpmnElement="SequenceFlow_1ks8kmt"> @@ -85,16 +80,6 @@ <dc:Bounds x="500" y="122" width="0" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1gd5h4c_di" bpmnElement="SequenceFlow_1gd5h4c"> - <di:waypoint xsi:type="dc:Point" x="332" y="137" /> - <di:waypoint xsi:type="dc:Point" x="375" y="137" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="354" y="122" width="0" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_1scptd7_di" bpmnElement="Task_GetL3NetworkById"> - <dc:Bounds x="232" y="97" width="100" height="80" /> - </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0le4vrj_di" bpmnElement="SequenceFlow_0le4vrj"> <di:waypoint xsi:type="dc:Point" x="624" y="137" /> <di:waypoint xsi:type="dc:Point" x="665" y="137" /> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn index 235c7c9eac..f077c78348 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignServiceInstanceBB.bpmn @@ -1,20 +1,20 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="UnassignServiceInstanceBB" name="UnassignServiceInstanceBB" isExecutable="true"> - <bpmn:startEvent id="Start_UnassignServiceInstanceBB" name="start"> + <bpmn:startEvent id="Start_UnassignServiceInstanceBB"> <bpmn:outgoing>SequenceFlow_0fzrhkc</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="Task_AAIDeleteServiceInstance" name="Delete Service Instance (AAI)" camunda:expression="${AAIDeleteTasks.deleteServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_AAIDeleteServiceInstance" name=" AAI Delete (svc instance) " camunda:expression="${AAIDeleteTasks.deleteServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0pu9j6i</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0sfeg65</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0sfeg65" sourceRef="Task_AAIDeleteServiceInstance" targetRef="End_UnassignServiceInstanceBB" /> - <bpmn:serviceTask id="Task_SdncUnassignServiceInstance" name="Unassign Service Instance (SDNC)" camunda:expression="${SDNCUnassignTasks.unassignServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="Task_SdncUnassignServiceInstance" name=" SDNC Unassign (svc instance) " camunda:expression="${SDNCUnassignTasks.unassignServiceInstance(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0fzrhkc</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0pu9j6i</bpmn:outgoing> </bpmn:serviceTask> <bpmn:sequenceFlow id="SequenceFlow_0pu9j6i" sourceRef="Task_SdncUnassignServiceInstance" targetRef="Task_AAIDeleteServiceInstance" /> - <bpmn:endEvent id="End_UnassignServiceInstanceBB" name="end"> + <bpmn:endEvent id="End_UnassignServiceInstanceBB"> <bpmn:incoming>SequenceFlow_0sfeg65</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_0fzrhkc" sourceRef="Start_UnassignServiceInstanceBB" targetRef="Task_SdncUnassignServiceInstance" /> @@ -24,9 +24,9 @@ <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="UnassignServiceInstanceBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_UnassignServiceInstanceBB"> - <dc:Bounds x="474" y="213" width="36" height="36" /> + <dc:Bounds x="444" y="213" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="482" y="256" width="22" height="12" /> + <dc:Bounds x="452" y="256" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0ltb3dj_di" bpmnElement="Task_AAIDeleteServiceInstance"> @@ -34,9 +34,9 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0sfeg65_di" bpmnElement="SequenceFlow_0sfeg65"> <di:waypoint xsi:type="dc:Point" x="808" y="231" /> - <di:waypoint xsi:type="dc:Point" x="853" y="231" /> + <di:waypoint xsi:type="dc:Point" x="871" y="231" /> <bpmndi:BPMNLabel> - <dc:Bounds x="785.5" y="210" width="90" height="12" /> + <dc:Bounds x="794.5" y="210" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_11klnmn_di" bpmnElement="Task_SdncUnassignServiceInstance"> @@ -50,16 +50,16 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_1p34ka9_di" bpmnElement="End_UnassignServiceInstanceBB"> - <dc:Bounds x="853" y="213" width="36" height="36" /> + <dc:Bounds x="871" y="213" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="863" y="255" width="21" height="12" /> + <dc:Bounds x="883" y="255" width="18" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0fzrhkc_di" bpmnElement="SequenceFlow_0fzrhkc"> - <di:waypoint xsi:type="dc:Point" x="510" y="231" /> + <di:waypoint xsi:type="dc:Point" x="480" y="231" /> <di:waypoint xsi:type="dc:Point" x="563" y="231" /> <bpmndi:BPMNLabel> - <dc:Bounds x="536.5" y="210" width="0" height="12" /> + <dc:Bounds x="476.5" y="210" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn index 2b9edbc3d5..0f3138121e 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVfModuleBB.bpmn @@ -1,18 +1,18 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="UnassignVfModuleBB" name="UnassignVfModuleBB" isExecutable="true"> - <bpmn:startEvent id="UnassignVfModuleBB_Start" name="Start"> + <bpmn:startEvent id="UnassignVfModuleBB_Start"> <bpmn:outgoing>SequenceFlow_1kfxl04</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="DeleteVfModule" name="Delete VF Module (AAI)" camunda:expression="${AAIDeleteTasks.deleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="DeleteVfModule" name=" AAI Delete (vf module) " camunda:expression="${AAIDeleteTasks.deleteVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1p2r4og</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0qa6sxx</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="UnassignVfModule" name="Unassign VF Module (SDNC)" camunda:expression="${SDNCUnassignTasks.unassignVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UnassignVfModule" name=" SDNC Unassign (vf module) " camunda:expression="${SDNCUnassignTasks.unassignVfModule(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1kfxl04</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1p2r4og</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:endEvent id="UnassignVfModuleBB_End" name="End"> + <bpmn:endEvent id="UnassignVfModuleBB_End"> <bpmn:incoming>SequenceFlow_0qa6sxx</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_1kfxl04" sourceRef="UnassignVfModuleBB_Start" targetRef="UnassignVfModule" /> @@ -24,14 +24,14 @@ <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="UnassignVfModuleBB_Start"> <dc:Bounds x="213" y="-3" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="219" y="33" width="23" height="12" /> + <dc:Bounds x="219" y="33" width="24" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="DeleteVfModule"> - <dc:Bounds x="571" y="-25" width="100" height="80" /> + <dc:Bounds x="537" y="-25" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_13t22km_di" bpmnElement="UnassignVfModule"> - <dc:Bounds x="367" y="-25" width="100" height="80" /> + <dc:Bounds x="387" y="-25" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="UnassignVfModuleBB_End"> <dc:Bounds x="782" y="-3" width="36" height="36" /> @@ -41,23 +41,23 @@ </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1kfxl04_di" bpmnElement="SequenceFlow_1kfxl04"> <di:waypoint xsi:type="dc:Point" x="249" y="15" /> - <di:waypoint xsi:type="dc:Point" x="367" y="15" /> + <di:waypoint xsi:type="dc:Point" x="387" y="15" /> <bpmndi:BPMNLabel> - <dc:Bounds x="308" y="0" width="0" height="0" /> + <dc:Bounds x="273" y="0" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1p2r4og_di" bpmnElement="SequenceFlow_1p2r4og"> - <di:waypoint xsi:type="dc:Point" x="467" y="15" /> - <di:waypoint xsi:type="dc:Point" x="571" y="15" /> + <di:waypoint xsi:type="dc:Point" x="487" y="15" /> + <di:waypoint xsi:type="dc:Point" x="537" y="15" /> <bpmndi:BPMNLabel> - <dc:Bounds x="519" y="-10" width="0" height="0" /> + <dc:Bounds x="467" y="0" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0qa6sxx_di" bpmnElement="SequenceFlow_0qa6sxx"> - <di:waypoint xsi:type="dc:Point" x="671" y="15" /> + <di:waypoint xsi:type="dc:Point" x="637" y="15" /> <di:waypoint xsi:type="dc:Point" x="782" y="15" /> <bpmndi:BPMNLabel> - <dc:Bounds x="727" y="0" width="0" height="0" /> + <dc:Bounds x="664.5" y="0" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn index 83ba0a9155..4676acfa42 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVnfBB.bpmn @@ -1,23 +1,23 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="UnassignVnfBB" name="UnassignVnfBB" isExecutable="true"> - <bpmn:startEvent id="UnassignVnfBB_Start" name="Start"> + <bpmn:startEvent id="UnassignVnfBB_Start"> <bpmn:outgoing>SequenceFlow_1kfxl04</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="DeleteVnf" name="Delete Vnf (AAI)" camunda:expression="${AAIDeleteTasks.deleteVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="DeleteVnf" name=" AAI Delete (vnf) " camunda:expression="${AAIDeleteTasks.deleteVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_0w3s09a</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0qa6sxx</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:serviceTask id="UnassignVnf" name="Unassign Vnf (SDNC)" camunda:expression="${SDNCUnassignTasks.unassignVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UnassignVnf" name=" SDNC Unassign (vnf) " camunda:expression="${SDNCUnassignTasks.unassignVnf(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1kfxl04</bpmn:incoming> <bpmn:outgoing>SequenceFlow_02st1i1</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:endEvent id="UnassignVnfBB_End" name="End"> + <bpmn:endEvent id="UnassignVnfBB_End"> <bpmn:incoming>SequenceFlow_0qa6sxx</bpmn:incoming> </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_1kfxl04" sourceRef="UnassignVnfBB_Start" targetRef="UnassignVnf" /> <bpmn:sequenceFlow id="SequenceFlow_0qa6sxx" sourceRef="DeleteVnf" targetRef="UnassignVnfBB_End" /> - <bpmn:serviceTask id="DeleteVnfInstanceGroups" name="Delete Vnf Instance Groups (AAI)" camunda:expression="${UnassignVnf.deleteInstanceGroups(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="DeleteVnfInstanceGroups" name=" AAI Delete (instance grp) " camunda:expression="${UnassignVnf.deleteInstanceGroups(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_02st1i1</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0w3s09a</bpmn:outgoing> </bpmn:serviceTask> @@ -29,7 +29,7 @@ <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="UnassignVnfBB_Start"> <dc:Bounds x="213" y="-3" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="218" y="33" width="25" height="12" /> + <dc:Bounds x="219" y="33" width="24" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0028k7a_di" bpmnElement="DeleteVnf"> @@ -41,7 +41,7 @@ <bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="UnassignVnfBB_End"> <dc:Bounds x="959" y="-3" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="967" y="37" width="20" height="12" /> + <dc:Bounds x="968" y="37" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1kfxl04_di" bpmnElement="SequenceFlow_1kfxl04"> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVolumeGroupBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVolumeGroupBB.bpmn index 12af246153..9947d1a1c5 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVolumeGroupBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UnassignVolumeGroupBB.bpmn @@ -1,10 +1,10 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="UnassignVolumeGroupBB" name="UnassignVolumeGroupBB" isExecutable="true"> <bpmn:startEvent id="UnassignVolumeGroupBB_Start" name="Start"> <bpmn:outgoing>SequenceFlow_1kfxl04</bpmn:outgoing> </bpmn:startEvent> - <bpmn:serviceTask id="UnassignVolumeGroup" name="Delete VolumeGroup (AAI)" camunda:expression="${AAIDeleteTasks.deleteVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn:serviceTask id="UnassignVolumeGroup" name=" AAI Delete (volume grp) " camunda:expression="${AAIDeleteTasks.deleteVolumeGroup(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_1kfxl04</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0qa6sxx</bpmn:outgoing> </bpmn:serviceTask> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn index 9f431212b1..1cfb9a3860 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/UpdateNetworkBB.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="UpdateNetworkBB" name="UpdateNetworkBB" isExecutable="true"> <bpmn2:startEvent id="UpdateNetworkBB_Start" name="Start"> <bpmn2:outgoing>SequenceFlow_074w2et</bpmn2:outgoing> @@ -14,20 +14,15 @@ <bpmn2:linkEventDefinition name="SDNC_to_AAI" /> </bpmn2:intermediateThrowEvent> <bpmn2:sequenceFlow id="SequenceFlow_04yezm3" sourceRef="SDNCChangeAssignNetwork" targetRef="SDNC_End" /> - <bpmn2:serviceTask id="QueryNetworkAAI" name="Re-Query Network (AAI)" camunda:expression="${AAIQueryTasks.getNetworkWrapperById(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_1trqq6d</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_03janqs</bpmn2:outgoing> - </bpmn2:serviceTask> <bpmn2:intermediateCatchEvent id="AAI_Start" name="To AAI"> <bpmn2:outgoing>SequenceFlow_1trqq6d</bpmn2:outgoing> <bpmn2:linkEventDefinition name="SDNC_to_AAI" /> </bpmn2:intermediateCatchEvent> - <bpmn2:sequenceFlow id="SequenceFlow_1trqq6d" sourceRef="AAI_Start" targetRef="QueryNetworkAAI" /> + <bpmn2:sequenceFlow id="SequenceFlow_1trqq6d" sourceRef="AAI_Start" targetRef="QueryVpnBindingAAI" /> <bpmn2:serviceTask id="QueryVpnBindingAAI" name="Query Vpn Binding (AAI)" camunda:expression="${AAIQueryTasks.queryNetworkVpnBinding(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_03janqs</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1trqq6d</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1io4cl7</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:sequenceFlow id="SequenceFlow_03janqs" sourceRef="QueryNetworkAAI" targetRef="QueryVpnBindingAAI" /> <bpmn2:serviceTask id="QueryNetworkPolicyAAI" name="Query Network Policy (AAI)" camunda:expression="${AAIQueryTasks.queryNetworkPolicy(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn2:incoming>SequenceFlow_1io4cl7</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_16fm47t</bpmn2:outgoing> @@ -61,17 +56,6 @@ <bpmn2:incoming>SequenceFlow_0fhfitm</bpmn2:incoming> </bpmn2:endEvent> <bpmn2:sequenceFlow id="SequenceFlow_0fhfitm" sourceRef="UpdateNetworkAAI" targetRef="UpdateNetworkBB_End" /> - <bpmn2:subProcess id="SubProcess_1srp3f9" triggeredByEvent="true"> - <bpmn2:startEvent id="Error_start" name="Start"> - <bpmn2:outgoing>SequenceFlow_1vfwv05</bpmn2:outgoing> - <bpmn2:errorEventDefinition errorRef="Error_01yvdm8" camunda:errorCodeVariable="gBBErrorCode" camunda:errorMessageVariable="gBBErrorMessage" /> - </bpmn2:startEvent> - <bpmn2:endEvent id="Error_end" name="End"> - <bpmn2:incoming>SequenceFlow_1vfwv05</bpmn2:incoming> - <bpmn2:errorEventDefinition errorRef="Error_01yvdm8" /> - </bpmn2:endEvent> - <bpmn2:sequenceFlow id="SequenceFlow_1vfwv05" sourceRef="Error_start" targetRef="Error_end" /> - </bpmn2:subProcess> </bpmn2:process> <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> @@ -107,32 +91,22 @@ <dc:Bounds x="432.5" y="74" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_0d05e4a_di" bpmnElement="QueryNetworkAAI"> - <dc:Bounds x="104" y="193" width="100" height="80" /> - </bpmndi:BPMNShape> <bpmndi:BPMNShape id="IntermediateCatchEvent_1hbb3j8_di" bpmnElement="AAI_Start"> - <dc:Bounds x="-1" y="215" width="36" height="36" /> + <dc:Bounds x="144" y="215" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="2" y="255" width="33" height="12" /> + <dc:Bounds x="147" y="255" width="33" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1trqq6d_di" bpmnElement="SequenceFlow_1trqq6d"> - <di:waypoint xsi:type="dc:Point" x="35" y="233" /> - <di:waypoint xsi:type="dc:Point" x="104" y="233" /> + <di:waypoint xsi:type="dc:Point" x="180" y="233" /> + <di:waypoint xsi:type="dc:Point" x="280" y="233" /> <bpmndi:BPMNLabel> - <dc:Bounds x="69.5" y="212" width="0" height="12" /> + <dc:Bounds x="185" y="212" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_09dctlw_di" bpmnElement="QueryVpnBindingAAI"> <dc:Bounds x="280" y="193" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_03janqs_di" bpmnElement="SequenceFlow_03janqs"> - <di:waypoint xsi:type="dc:Point" x="204" y="233" /> - <di:waypoint xsi:type="dc:Point" x="280" y="233" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="242" y="212" width="0" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1slp95d_di" bpmnElement="QueryNetworkPolicyAAI"> <dc:Bounds x="455" y="193" width="100" height="80" /> </bpmndi:BPMNShape> @@ -167,64 +141,42 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="IntermediateCatchEvent_0sx0nb6_di" bpmnElement="AIC_Start"> - <dc:Bounds x="-1" y="332" width="36" height="36" /> + <dc:Bounds x="144" y="332" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1" y="372" width="34" height="12" /> + <dc:Bounds x="146" y="372" width="34" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_196cgux_di" bpmnElement="SequenceFlow_196cgux"> - <di:waypoint xsi:type="dc:Point" x="35" y="350" /> - <di:waypoint xsi:type="dc:Point" x="104" y="350" /> + <di:waypoint xsi:type="dc:Point" x="180" y="350" /> + <di:waypoint xsi:type="dc:Point" x="248" y="350" /> <bpmndi:BPMNLabel> - <dc:Bounds x="69.5" y="329" width="0" height="12" /> + <dc:Bounds x="169" y="329" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0i66n9g_di" bpmnElement="UpdateNetworkAdapter"> - <dc:Bounds x="104" y="310" width="100" height="80" /> + <dc:Bounds x="248" y="310" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0hsvgje_di" bpmnElement="SequenceFlow_0hsvgje"> - <di:waypoint xsi:type="dc:Point" x="204" y="350" /> - <di:waypoint xsi:type="dc:Point" x="278" y="350" /> + <di:waypoint xsi:type="dc:Point" x="348" y="350" /> + <di:waypoint xsi:type="dc:Point" x="422" y="350" /> <bpmndi:BPMNLabel> - <dc:Bounds x="241" y="329" width="0" height="12" /> + <dc:Bounds x="340" y="329" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1ydm5u9_di" bpmnElement="UpdateNetworkAAI"> - <dc:Bounds x="278" y="310" width="100" height="80" /> + <dc:Bounds x="422" y="310" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_0fsts2w_di" bpmnElement="UpdateNetworkBB_End"> - <dc:Bounds x="493" y="332" width="36" height="36" /> + <dc:Bounds x="637" y="332" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="502" y="372" width="19" height="12" /> + <dc:Bounds x="646" y="372" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0fhfitm_di" bpmnElement="SequenceFlow_0fhfitm"> - <di:waypoint xsi:type="dc:Point" x="378" y="350" /> - <di:waypoint xsi:type="dc:Point" x="493" y="350" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="435.5" y="329" width="0" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="SubProcess_11x1b8w_di" bpmnElement="SubProcess_1srp3f9" isExpanded="true"> - <dc:Bounds x="115" y="516" width="350" height="200" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="StartEvent_1uqy6gg_di" bpmnElement="Error_start"> - <dc:Bounds x="194" y="592" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="200" y="632" width="24" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_0oe6ngb_di" bpmnElement="Error_end"> - <dc:Bounds x="358" y="592" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="367" y="632" width="19" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1vfwv05_di" bpmnElement="SequenceFlow_1vfwv05"> - <di:waypoint xsi:type="dc:Point" x="230" y="610" /> - <di:waypoint xsi:type="dc:Point" x="358" y="610" /> + <di:waypoint xsi:type="dc:Point" x="522" y="350" /> + <di:waypoint xsi:type="dc:Point" x="637" y="350" /> <bpmndi:BPMNLabel> - <dc:Bounds x="294" y="589" width="0" height="12" /> + <dc:Bounds x="535" y="329" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn index 04f3684ee4..30a95eb81f 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn @@ -1,7 +1,7 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="VnfAdapter" name="Vnf Adapter" isExecutable="true"> - <bpmn:startEvent id="VnfAdapter_Start" name="Start"> + <bpmn:startEvent id="VnfAdapter_Start"> <bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing> </bpmn:startEvent> <bpmn:subProcess id="VnfAdapter_Error" name="Sub Process Error" triggeredByEvent="true"> @@ -15,7 +15,7 @@ <bpmn:sequenceFlow id="SequenceFlow_1abat8l" sourceRef="Error_Start" targetRef="Error_End" /> </bpmn:subProcess> <bpmn:sequenceFlow id="SequenceFlow_1xr6chl" sourceRef="VnfAdapter_Start" targetRef="PreProcessRequest" /> - <bpmn:endEvent id="VnfAdapter_End" name="End"> + <bpmn:endEvent id="VnfAdapter_End"> <bpmn:incoming>SequenceFlow_1ivhukd</bpmn:incoming> </bpmn:endEvent> <bpmn:serviceTask id="PreProcessRequest" name="Pre Process Request" camunda:expression="${VnfAdapterImpl.preProcessVnfAdapter(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn index 6544387775..13dad149cd 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.2"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0"> <bpmn:process id="WorkflowActionBB" name="WorkflowActionBB" isExecutable="true"> <bpmn:startEvent id="Start_WorkflowActionBB" name="start"> <bpmn:outgoing>SequenceFlow_15s0okp</bpmn:outgoing> @@ -18,10 +18,10 @@ <camunda:in source="retryCount" target="retryCount" /> <camunda:out source="WorkflowExceptionErrorMessage" target="WorkflowExceptionErrorMessage" /> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_0mqrkxv</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0mew9im</bpmn:incoming> <bpmn:outgoing>SequenceFlow_07h9d4y</bpmn:outgoing> </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_0mqrkxv" sourceRef="Task_SelectBB" targetRef="Call_ExecuteBB" /> + <bpmn:sequenceFlow id="SequenceFlow_0mqrkxv" sourceRef="Task_SelectBB" targetRef="ServiceTask_0e2p0xs" /> <bpmn:serviceTask id="Task_SelectBB" name="Select BB" camunda:expression="${WorkflowActionBBTasks.selectBB(execution)}"> <bpmn:incoming>SequenceFlow_1atzsgn</bpmn:incoming> <bpmn:incoming>SequenceFlow_1wb59ic</bpmn:incoming> @@ -185,14 +185,19 @@ <bpmn:sequenceFlow id="SequenceFlow_11d126w" sourceRef="StartEvent_runtimeError" targetRef="ServiceTask_HandleRuntimeError" /> <bpmn:sequenceFlow id="SequenceFlow_0w4sx88" sourceRef="ServiceTask_HandleRuntimeError" targetRef="EndEvent__runtimeError" /> </bpmn:subProcess> + <bpmn:serviceTask id="ServiceTask_0e2p0xs" name="Update Flow Statistics" camunda:expression="${WorkflowActionBBTasks.updateFlowStatistics(execution)}"> + <bpmn:incoming>SequenceFlow_0mqrkxv</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0mew9im</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_0mew9im" sourceRef="ServiceTask_0e2p0xs" targetRef="Call_ExecuteBB" /> </bpmn:process> <bpmn:error id="Error_0kd2o2a" name="java.lang.Exception" errorCode="java.lang.Exception" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="WorkflowActionBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="Start_WorkflowActionBB"> - <dc:Bounds x="-52" y="102" width="36" height="36" /> + <dc:Bounds x="-241" y="102" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-45" y="138" width="22" height="12" /> + <dc:Bounds x="-234" y="138" width="23" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1uv6erv_di" bpmnElement="End_WorkflowActionBB"> @@ -202,24 +207,24 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_15s0okp_di" bpmnElement="SequenceFlow_15s0okp"> - <di:waypoint xsi:type="dc:Point" x="-16" y="120" /> - <di:waypoint xsi:type="dc:Point" x="17" y="120" /> + <di:waypoint xsi:type="dc:Point" x="-205" y="120" /> + <di:waypoint xsi:type="dc:Point" x="-172" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="-44.5" y="98.5" width="90" height="13" /> + <dc:Bounds x="-233" y="99" width="90" height="13" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_03m7z4y_di" bpmnElement="Call_ExecuteBB"> <dc:Bounds x="560" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0mqrkxv_di" bpmnElement="SequenceFlow_0mqrkxv"> - <di:waypoint xsi:type="dc:Point" x="528" y="120" /> - <di:waypoint xsi:type="dc:Point" x="560" y="120" /> + <di:waypoint xsi:type="dc:Point" x="339" y="120" /> + <di:waypoint xsi:type="dc:Point" x="400" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="544" y="99" width="0" height="0" /> + <dc:Bounds x="324.5" y="105" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1snenqk_di" bpmnElement="Task_SelectBB"> - <dc:Bounds x="428" y="80" width="100" height="80" /> + <dc:Bounds x="239" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_0m1zt0q_di" bpmnElement="ExclusiveGateway_Finished" isMarkerVisible="true"> <dc:Bounds x="692" y="95" width="50" height="50" /> @@ -243,10 +248,10 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_0kn8jt8_di" bpmnElement="Task_RetrieveBBExectuionList"> - <dc:Bounds x="17" y="80" width="100" height="80" /> + <dc:Bounds x="-172" y="80" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0654g3m_di" bpmnElement="Task_SendSync"> - <dc:Bounds x="235" y="-7" width="100" height="80" /> + <dc:Bounds x="46" y="-7" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0wzh11j_di" bpmnElement="Task_SetupCompleteMsoProcess"> <dc:Bounds x="900" y="210" width="100" height="80" /> @@ -288,26 +293,26 @@ <bpmndi:BPMNEdge id="SequenceFlow_0v588sm_di" bpmnElement="SequenceFlow_0v588sm"> <di:waypoint xsi:type="dc:Point" x="717" y="145" /> <di:waypoint xsi:type="dc:Point" x="717" y="262" /> - <di:waypoint xsi:type="dc:Point" x="528" y="262" /> + <di:waypoint xsi:type="dc:Point" x="339" y="262" /> <bpmndi:BPMNLabel> - <dc:Bounds x="638.5121951219512" y="272" width="74" height="13" /> + <dc:Bounds x="597.5" y="272" width="73" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1atzsgn_di" bpmnElement="SequenceFlow_1atzsgn"> - <di:waypoint xsi:type="dc:Point" x="478" y="222" /> - <di:waypoint xsi:type="dc:Point" x="478" y="160" /> + <di:waypoint xsi:type="dc:Point" x="289" y="222" /> + <di:waypoint xsi:type="dc:Point" x="289" y="160" /> <bpmndi:BPMNLabel> - <dc:Bounds x="448" y="191" width="90" height="0" /> + <dc:Bounds x="259" y="191" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_19t1oyr_di" bpmnElement="Task_RollbackExecutionPath"> - <dc:Bounds x="428" y="222" width="100" height="80" /> + <dc:Bounds x="239" y="222" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0vc9go9_di" bpmnElement="SequenceFlow_0vc9go9"> - <di:waypoint xsi:type="dc:Point" x="117" y="120" /> - <di:waypoint xsi:type="dc:Point" x="150" y="120" /> + <di:waypoint xsi:type="dc:Point" x="-72" y="120" /> + <di:waypoint xsi:type="dc:Point" x="-39" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="134" y="105" width="0" height="0" /> + <dc:Bounds x="-100" y="105" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_11530ei_di" bpmnElement="SequenceFlow_11530ei"> @@ -337,12 +342,12 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1wb59ic_di" bpmnElement="SequenceFlow_1wb59ic"> - <di:waypoint xsi:type="dc:Point" x="335" y="33" /> - <di:waypoint xsi:type="dc:Point" x="382" y="33" /> - <di:waypoint xsi:type="dc:Point" x="382" y="120" /> - <di:waypoint xsi:type="dc:Point" x="428" y="120" /> + <di:waypoint xsi:type="dc:Point" x="146" y="33" /> + <di:waypoint xsi:type="dc:Point" x="193" y="33" /> + <di:waypoint xsi:type="dc:Point" x="193" y="120" /> + <di:waypoint xsi:type="dc:Point" x="239" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="397" y="76.5" width="0" height="0" /> + <dc:Bounds x="163" y="77" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_01j184u_di" bpmnElement="SequenceFlow_01j184u"> @@ -356,34 +361,34 @@ </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_005hi8o_di" bpmnElement="SequenceFlow_005hi8o"> <di:waypoint xsi:type="dc:Point" x="667" y="-36" /> - <di:waypoint xsi:type="dc:Point" x="478" y="-36" /> - <di:waypoint xsi:type="dc:Point" x="478" y="80" /> + <di:waypoint xsi:type="dc:Point" x="289" y="-36" /> + <di:waypoint xsi:type="dc:Point" x="289" y="80" /> <bpmndi:BPMNLabel> - <dc:Bounds x="573" y="-57" width="0" height="0" /> + <dc:Bounds x="433" y="-51" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1c1v3p1_di" bpmnElement="Task_0a31dkf"> <dc:Bounds x="667" y="-76" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_0ptb1yi_di" bpmnElement="ExclusiveGateway_isTopLevelFlow" isMarkerVisible="true"> - <dc:Bounds x="150" y="95" width="50" height="50" /> + <dc:Bounds x="-39" y="95" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="144" y="145" width="61" height="24" /> + <dc:Bounds x="-45" y="145" width="61" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0sckerv_di" bpmnElement="SequenceFlow_0sckerv"> - <di:waypoint xsi:type="dc:Point" x="176" y="96" /> - <di:waypoint xsi:type="dc:Point" x="176" y="33" /> - <di:waypoint xsi:type="dc:Point" x="235" y="33" /> + <di:waypoint xsi:type="dc:Point" x="-13" y="96" /> + <di:waypoint xsi:type="dc:Point" x="-13" y="33" /> + <di:waypoint xsi:type="dc:Point" x="46" y="33" /> <bpmndi:BPMNLabel> - <dc:Bounds x="182" y="54.5" width="18" height="12" /> + <dc:Bounds x="-7" y="55" width="19" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0unbew4_di" bpmnElement="SequenceFlow_0unbew4"> - <di:waypoint xsi:type="dc:Point" x="200" y="120" /> - <di:waypoint xsi:type="dc:Point" x="428" y="120" /> + <di:waypoint xsi:type="dc:Point" x="11" y="120" /> + <di:waypoint xsi:type="dc:Point" x="239" y="120" /> <bpmndi:BPMNLabel> - <dc:Bounds x="308" y="95" width="12" height="12" /> + <dc:Bounds x="119" y="95" width="12" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ExclusiveGateway_001g41v_di" bpmnElement="ExclusiveGateway_isTopLevelFlowAbort" isMarkerVisible="true"> @@ -435,11 +440,11 @@ </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_11dlyzt_di" bpmnElement="SequenceFlow_11dlyzt"> - <di:waypoint xsi:type="dc:Point" x="478" y="302" /> - <di:waypoint xsi:type="dc:Point" x="478" y="368" /> + <di:waypoint xsi:type="dc:Point" x="289" y="302" /> + <di:waypoint xsi:type="dc:Point" x="289" y="368" /> <di:waypoint xsi:type="dc:Point" x="741" y="368" /> <bpmndi:BPMNLabel> - <dc:Bounds x="495" y="324.65" width="62" height="24" /> + <dc:Bounds x="340.85361216730035" y="325" width="63" height="24" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ServiceTask_1h154rn_di" bpmnElement="Task_UpdateDb"> @@ -545,6 +550,16 @@ <dc:Bounds x="778" y="854" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_0e2p0xs_di" bpmnElement="ServiceTask_0e2p0xs"> + <dc:Bounds x="400" y="80" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0mew9im_di" bpmnElement="SequenceFlow_0mew9im"> + <di:waypoint xsi:type="dc:Point" x="500" y="120" /> + <di:waypoint xsi:type="dc:Point" x="560" y="120" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="530" y="99" width="0" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java index 314cc0b2de..d1559c2ed1 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java @@ -20,14 +20,8 @@ package org.onap.so; -import java.io.IOException; - -import javax.annotation.PreDestroy; - import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; -import org.onap.so.requestsdb.RequestsDBHelper; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; @@ -35,15 +29,11 @@ import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.Profile; -import ch.vorburger.mariadb4j.MariaDB4jService; - @SpringBootApplication @Profile("test") @EnableProcessApplication("MSO CommonBPMN Test Application") @ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { - @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)}) public class TestApplication { public static void main(String... args) { SpringApplication.run(TestApplication.class, args); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java index f6d81ba771..e8891eeb53 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java @@ -49,8 +49,10 @@ import org.onap.so.bpmn.infrastructure.adapter.vnf.tasks.VnfAdapterImpl; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignNetwork; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignNetworkBBUtils; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignVnf; +import org.onap.so.bpmn.infrastructure.flowspecific.tasks.ConfigurationScaleOut; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.CreateNetwork; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.CreateNetworkCollection; +import org.onap.so.bpmn.infrastructure.flowspecific.tasks.GenericVnfHealthCheck; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.UnassignNetworkBB; import org.onap.so.bpmn.infrastructure.flowspecific.tasks.UnassignVnf; import org.onap.so.bpmn.infrastructure.sdnc.tasks.SDNCActivateTasks; @@ -182,6 +184,12 @@ public abstract class BaseBPMNTest { @MockBean protected WorkflowActionBBTasks workflowActionBBTasks; + @MockBean + protected GenericVnfHealthCheck genericVnfHealthCheck; + + @MockBean + protected ConfigurationScaleOut configurationScaleOut; + @LocalServerPort private int port; diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2BBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2BBTest.java index c05d42c420..d4496d3a55 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2BBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2BBTest.java @@ -28,9 +28,9 @@ import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Ignore; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.bpmn.buildingblock.SniroHomingV2; import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.onap.so.BaseTest; import org.springframework.boot.test.mock.mockito.MockBean; diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2Test.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2Test.java index bed591500a..4626615e6f 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2Test.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/buildingblock/SniroHomingV2Test.java @@ -41,7 +41,6 @@ import org.json.JSONObject; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; -import org.onap.so.BaseTest; import org.onap.so.bpmn.mock.FileUtil; import org.onap.so.bpmn.servicedecomposition.bbobjects.AllottedResource; import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; @@ -55,7 +54,7 @@ import org.onap.so.bpmn.servicedecomposition.homingobjects.Candidate; import org.onap.so.bpmn.servicedecomposition.homingobjects.CandidateType; import org.onap.so.client.exception.BadResponseException; import org.onap.so.client.sniro.beans.SniroManagerRequest; - +import org.onap.so.BaseTest; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetwork1802BBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ConfigurationScaleOutBBTest.java index 2c5381de09..b22b90b0b4 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetwork1802BBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/ConfigurationScaleOutBBTest.java @@ -22,32 +22,38 @@ package org.onap.so.bpmn.infrastructure.bpmn.subprocess; import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat; import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doThrow; +import java.io.IOException; + import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; + import org.junit.Test; import org.onap.so.bpmn.BaseBPMNTest; import org.onap.so.bpmn.common.BuildingBlockExecution; -public class UnassignNetwork1802BBTest extends BaseBPMNTest { - @Test - public void sunnyDayAssignNetwork_Test() throws InterruptedException { - ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetwork1802BB",variables); - assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassedInOrder("Start_UnassignNetworkBB","Task_VfModuleRelatioship","Task_GetCloudRegionVersion","Task_SNDCUnAssign","End_UnassignNetworkBB"); - assertThat(pi).isEnded(); - } + + +public class ConfigurationScaleOutBBTest extends BaseBPMNTest { + + @Test + public void sunnyDayConfigurationScaleOutBBTest() throws InterruptedException, IOException { + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ConfigurationScaleOutBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_ConfigScaleOutBB", "QueryVfModule", "GetConfigScaleOutParams", + "Call-AppC-ConfigScaleOut", "End_ConfigScaleOutBB"); + assertThat(pi).isEnded(); + } @Test - public void rainyDayAssignNetwork_Test() throws Exception { - doThrow(new BpmnError("7000", "TESTING ERRORS")).when(unassignNetworkBB).checkRelationshipRelatedTo(any(BuildingBlockExecution.class), eq("vf-module")); - ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetwork1802BB", variables); + public void configurationScaleOutBBExceptionTest() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(sdncQueryTasks).queryVfModule(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("ConfigurationScaleOutBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted() - .hasPassedInOrder("Start_UnassignNetworkBB", "Task_VfModuleRelatioship") - .hasNotPassed("End_UnassignNetworkBB"); + .hasPassedInOrder("Start_ConfigScaleOutBB", "QueryVfModule") + .hasNotPassed("GetConfigScaleOutParams", "Call-AppC-ConfigScaleOut", "End_ConfigScaleOutBB"); assertThat(pi).isEnded(); } -}
\ No newline at end of file +} diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java index cb3ab32884..13f8a6f812 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateNetworkBBTest.java @@ -36,7 +36,7 @@ public class CreateNetworkBBTest extends BaseBPMNTest{ ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateNetworkBB",variables); assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassedInOrder("createNetwork_startEvent", "QueryNetworkById_ServiceTask", "ServiceTask_get_cloud_region", "QueryVpnBinding_ServiceTask", "QueryNetworkPolicy_ServiceTask", "QueryNetworkTableRef_ServiceTask", "Create_Network_ServiceTask", "Update_Network_AAI_ServiceTask", "createNetwork_EndEvent"); + assertThat(pi).isStarted().hasPassedInOrder("createNetwork_startEvent", "ServiceTask_get_cloud_region", "QueryVpnBinding_ServiceTask", "QueryNetworkPolicy_ServiceTask", "QueryNetworkTableRef_ServiceTask", "Create_Network_ServiceTask", "Update_Network_AAI_ServiceTask", "createNetwork_EndEvent"); assertThat(pi).isEnded(); } @@ -47,7 +47,7 @@ public class CreateNetworkBBTest extends BaseBPMNTest{ ProcessInstance pi = runtimeService.startProcessInstanceByKey("CreateNetworkBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted() - .hasPassedInOrder("createNetwork_startEvent","QueryNetworkById_ServiceTask") + .hasPassedInOrder("createNetwork_startEvent") .hasNotPassed("End Flow"); assertThat(pi).isEnded(); } diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java index eb372fb6a7..57388efc2e 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/CreateVolumeGroupBBTest.java @@ -61,8 +61,6 @@ public class CreateVolumeGroupBBTest extends BaseBPMNTest{ .hasPassedInOrder("CreateVolumeGroupBB_Start", "QueryVfModuleSDNC", "CreateVolumeGroupVnfAdapter", "Vnf_Adapter") .hasNotPassed("UpdateVolumeGroupAAI", "CreateVolumeGroupBB_End"); assertThat(pi).isEnded(); - assertThat(pi).hasPassedInOrder("CreateVolumeGroupBB_Start", "QueryVfModuleSDNC", "CreateVolumeGroupVnfAdapter") - .hasNotPassed("Vnf_Adapter", "UpdateVolumeGroupAAI", "CreateVolumeGroupBB_End"); } } diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java index d2f4db5d5c..b30ea41296 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/DeleteVolumeGroupBBTest.java @@ -35,7 +35,7 @@ public class DeleteVolumeGroupBBTest extends BaseBPMNTest { public void sunnyDayDeleteVolumeGroup_Test() throws InterruptedException { ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVolumeGroupBB", variables); assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassedInOrder("DeleteVolumeGroupBB_Start", "DeleteVolumeGroupVnfAdapter", "UpdateVolumeGroupAAI", "DeleteVolumeGroupBB_End"); + assertThat(pi).isStarted().hasPassedInOrder("DeleteVolumeGroupBB_Start", "DeleteVolumeGroupVnfAdapter", "VnfAdapter", "UpdateVolumeGroupAAI", "DeleteVolumeGroupBB_End"); assertThat(pi).isEnded(); } @@ -45,7 +45,7 @@ public class DeleteVolumeGroupBBTest extends BaseBPMNTest { ProcessInstance pi = runtimeService.startProcessInstanceByKey("DeleteVolumeGroupBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted() - .hasPassedInOrder("DeleteVolumeGroupBB_Start", "DeleteVolumeGroupVnfAdapter", "UpdateVolumeGroupAAI") + .hasPassedInOrder("DeleteVolumeGroupBB_Start", "DeleteVolumeGroupVnfAdapter", "VnfAdapter", "UpdateVolumeGroupAAI") .hasNotPassed("DeleteVolumeGroupBB_End"); assertThat(pi).isEnded(); } diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetwork1802BBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java index 14cac8343e..9553f72644 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignNetwork1802BBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/GenericVnfHealthCheckBBTest.java @@ -24,34 +24,38 @@ import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.as import static org.mockito.Matchers.any; import static org.mockito.Mockito.doThrow; +import java.io.IOException; + import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; -import org.camunda.bpm.engine.test.Deployment; import org.junit.Test; import org.onap.so.bpmn.BaseBPMNTest; import org.onap.so.bpmn.common.BuildingBlockExecution; -public class AssignNetwork1802BBTest extends BaseBPMNTest{ - @Test - @Deployment(resources = { "subprocess/AssignNetworkRollbackBB.bpmn"}) - public void sunnyDayAssignNetwork_Test() throws InterruptedException { - ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignNetwork1802BB",variables); - assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassedInOrder("AssignNetworkBB_start","ServiceTask_get_cloud_region","ServiceTask_assign_network_sdnc","ServiceTask_assign_network_aai","AssignNetworkBB_end"); - assertThat(pi).isEnded(); - } +public class GenericVnfHealthCheckBBTest extends BaseBPMNTest { + + @Test + public void sunnyDayGenericVnfHealthCheckBBTest() throws InterruptedException, IOException { + + ProcessInstance pi = runtimeService.startProcessInstanceByKey("GenericVnfHealthCheckBB", variables); + assertThat(pi).isNotNull(); + assertThat(pi).isStarted().hasPassedInOrder("Start_GenericVnfHealthChkBB", "SetParamsHealthCheck", + "Call-AppC-HealthCheck", "End_GenericVnfHealthChkBB"); + assertThat(pi).isEnded(); + } @Test - public void rainyDayAssignNetwork_Test() throws Exception { - - doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiUpdateTasks).updateOrchestrationStatusAssignedNetwork(any(BuildingBlockExecution.class)); - ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignNetwork1802BB", variables); + public void genericVnfHealthCheckBBExceptionTest() throws Exception { + doThrow(new BpmnError("7000", "TESTING ERRORS")).when(genericVnfHealthCheck).setParamsForGenericVnfHealthCheck(any(BuildingBlockExecution.class)); + ProcessInstance pi = runtimeService.startProcessInstanceByKey("GenericVnfHealthCheckBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted() - .hasPassedInOrder("AssignNetworkBB_start", "ServiceTask_get_cloud_region", "ServiceTask_assign_network_sdnc", "ServiceTask_assign_network_aai") - .hasNotPassed("AssignNetworkBB_end"); + .hasPassedInOrder("Start_GenericVnfHealthChkBB", "SetParamsHealthCheck") + .hasNotPassed("Call-AppC-HealthCheck", "End_GenericVnfHealthChkBB"); assertThat(pi).isEnded(); } } + + diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java index fd95e00031..b6f7cbeb48 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UnassignNetworkBBTest.java @@ -36,7 +36,7 @@ public class UnassignNetworkBBTest extends BaseBPMNTest { public void sunnyDayAssignNetwork_Test() throws InterruptedException { ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetworkBB",variables); assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassedInOrder("Start_UnassignNetworkBB","Task_GetL3NetworkById","Task_VfModuleRelatioship","Task_GetCloudRegionVersion","Task_SNDCUnAssign","Task_DeleteNetwork","End_UnassignNetworkBB"); + assertThat(pi).isStarted().hasPassedInOrder("Start_UnassignNetworkBB","Task_VfModuleRelatioship","Task_GetCloudRegionVersion","Task_SNDCUnAssign","Task_DeleteNetwork","End_UnassignNetworkBB"); assertThat(pi).isEnded(); } @@ -46,7 +46,7 @@ public class UnassignNetworkBBTest extends BaseBPMNTest { ProcessInstance pi = runtimeService.startProcessInstanceByKey("UnassignNetworkBB", variables); assertThat(pi).isNotNull(); assertThat(pi).isStarted() - .hasPassedInOrder("Start_UnassignNetworkBB", "Task_GetL3NetworkById", "Task_VfModuleRelatioship") + .hasPassedInOrder("Start_UnassignNetworkBB", "Task_VfModuleRelatioship") .hasNotPassed("End_UnassignNetworkBB"); assertThat(pi).isEnded(); } diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java index 853f713bd1..9fff0eb458 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/UpdateNetworkBBTest.java @@ -38,7 +38,7 @@ public class UpdateNetworkBBTest extends BaseBPMNTest { assertThat(processInstance).isNotNull(); assertThat(processInstance).isStarted().hasPassedInOrder( "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", - "QueryNetworkAAI", "QueryVpnBindingAAI", "QueryNetworkPolicyAAI", "QueryNetworkTableRefAAI", + "QueryVpnBindingAAI", "QueryNetworkPolicyAAI", "QueryNetworkTableRefAAI", "UpdateNetworkAdapter", "UpdateNetworkAAI", "UpdateNetworkBB_End"); assertThat(processInstance).isEnded(); } @@ -49,8 +49,8 @@ public class UpdateNetworkBBTest extends BaseBPMNTest { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("UpdateNetworkBB", variables); assertThat(processInstance).isStarted().hasPassedInOrder( - "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", - "QueryNetworkAAI", "QueryVpnBindingAAI") + "UpdateNetworkBB_Start", "SDNCChangeAssignNetwork", + "QueryVpnBindingAAI") .hasNotPassed("QueryNetworkPolicyAAI", "QueryNetworkTableRefAAI", "UpdateNetworkAdapter", "UpdateNetworkAAI", "UpdateNetworkBB_End"); assertThat(processInstance).isEnded(); diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml index 0b998c7268..2d102afe9f 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml +++ b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml @@ -67,6 +67,9 @@ mso: workflow: message: endpoint: http://localhost:28090/workflows/messages/message + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 async: core-pool-size: 50 @@ -183,12 +186,14 @@ policy: sniro: conductor: enabled: true - host: http://localhost:8446 + host: http://localhost:${wiremock.server.port} uri: /v1/release-orders headers.auth: Basic dGVzdDp0ZXN0cHdk manager: - host: http://localhost:8446 - uri: /sniro/api/placement/v2 + timeout: PT30M + host: http://localhost:${wiremock.server.port} + uri.v1: /sniro/api/v2/placement + uri.v2: /sniro/api/placement/v2 headers.auth: Basic dGVzdDp0ZXN0cHdk headers.patchVersion: 1 headers.minorVersion: 1 @@ -217,4 +222,4 @@ camunda: bpm: metrics: enabled: false - db-reporter-activate: false
\ No newline at end of file + db-reporter-activate: false diff --git a/bpmn/so-bpmn-infrastructure-common/pom.xml b/bpmn/so-bpmn-infrastructure-common/pom.xml index ab0ac25a99..ad51b3f69e 100644 --- a/bpmn/so-bpmn-infrastructure-common/pom.xml +++ b/bpmn/so-bpmn-infrastructure-common/pom.xml @@ -1,5 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<?xml version="1.0"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.onap.so</groupId> <artifactId>bpmn</artifactId> @@ -107,7 +107,7 @@ </goals> </pluginExecutionFilter> <action> - <ignore></ignore> + <ignore/> </action> </pluginExecution> </pluginExecutions> @@ -199,7 +199,7 @@ <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> - <version>22.0</version> + </dependency> <dependency> <groupId>com.fasterxml.uuid</groupId> @@ -317,5 +317,11 @@ <classifier>tests</classifier> <scope>test</scope> </dependency> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter-test</artifactId> + <version>2.3.0</version> + <scope>test</scope> + </dependency> </dependencies> </project> diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy index f11022dc08..ec8df3daa1 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy @@ -4,7 +4,7 @@ * ================================================================================ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License") + * 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 * diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy index 63fd20eb2d..37c7d4d29a 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy @@ -4,7 +4,7 @@ * ================================================================================ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License") + * 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 * diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy index 3702862a04..589bbe9c4f 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelofE2EServiceInstance.groovy @@ -140,9 +140,9 @@ public class DoCompareModelofE2EServiceInstance extends AbstractServiceTaskProce 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()) + Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class) + execution.setVariable("model-invariant-id-original", si.get().getModelInvariantId()) + execution.setVariable("model-version-id-original", si.get().getModelVersionId()) }catch(BpmnError e) { throw e; diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy index 5922ad10a0..26b0fea6a2 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy @@ -321,8 +321,8 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { 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()) + Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class) + execution.setVariable("serviceInstanceName", si.get().getServiceInstanceName()) }catch(BpmnError e) { throw e; diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy index a376e581fe..731d9c24de 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateNetworkInstance.groovy @@ -330,6 +330,10 @@ public class DoCreateNetworkInstance extends AbstractServiceTaskProcessor { if(!resourceClient.exists(uri)){ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai") + }else{ + Map<String, String> keys = uri.getURIKeys() + execution.setVariable("serviceType", keys.get("service-type")) + execution.setVariable("subscriberName", keys.get("global-customer-id")) } }catch(BpmnError e) { diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy index d571c00f47..17dbe50cc5 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy @@ -4,7 +4,7 @@ * ================================================================================ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License") + * 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 * @@ -20,7 +20,6 @@ package org.onap.so.bpmn.infrastructure.scripts -import org.codehaus.jackson.map.ObjectMapper import org.onap.so.bpmn.infrastructure.properties.BPMNProperties import java.util.ArrayList diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy index 7fa8b4409b..1585a7bb74 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy @@ -259,6 +259,9 @@ class DoCreateVnf extends AbstractServiceTaskProcessor { AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId) if(resourceClient.exists(uri)){ + Map<String, String> keys = uri.getURIKeys() + execution.setVariable("globalCustomerId", keys.get("global-customer-id")) + execution.setVariable("serviceType", keys.get("service-type")) execution.setVariable("GENGS_siResourceLink", uri.build().toString()) }else{ @@ -307,14 +310,9 @@ class DoCreateVnf extends AbstractServiceTaskProcessor { //Get Service Instance Info String serviceInstanceId = getVariableEnforced(execution, "DoCVNF_serviceInstanceId") - String siRelatedLink = getVariableEnforced(execution, "GENGS_siResourceLink") - int custStart = siRelatedLink.indexOf("customer/") - int custEnd = siRelatedLink.indexOf("/service-subscriptions") - String globalCustId = siRelatedLink.substring(custStart + 9, custEnd) - int serviceStart = siRelatedLink.indexOf("service-subscription/") - int serviceEnd = siRelatedLink.indexOf("/service-instances/") - String serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd) + String globalCustId = execution.getVariable("globalCustomerId") + String serviceType = execution.getVariable("serviceType") Map<String, String> payload = new LinkedHashMap<>(); payload.put("vnf-id", vnfId); @@ -339,7 +337,7 @@ class DoCreateVnf extends AbstractServiceTaskProcessor { resourceClient.connect(uri, siUri) }catch(Exception ex) { - msoLogger.debug("Error Occured in DoCreateVnf CreateGenericVnf Process " + ex.getMessage()) + msoLogger.debug("Error Occured in DoCreateVnf CreateGenericVnf Process ", ex) exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in DoCreateVnf CreateGenericVnf Process") } msoLogger.trace("COMPLETED DoCreateVnf CreateGenericVnf Process") diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy index c7e3eb437c..eb736f8ffe 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy @@ -305,45 +305,47 @@ public class DoDeleteServiceInstance extends AbstractServiceTaskProcessor { } 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", si.getServiceRole()) - - 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) + if(wrapper.getRelationships().isPresent()){ + 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()){ + Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class) + String orchestrationStatus = si.get().getOrchestrationStatus() + String serviceType = si.get().getServiceType() + execution.setVariable("serviceType", serviceType) + execution.setVariable("serviceRole", si.get().getServiceRole()) + + 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) + } } - } - String svcTypes = UrnPropertiesReader.getVariable("sdnc.si.svc.types",execution) ?: "" - List<String> svcList = Arrays.asList(svcTypes.split("\\s*,\\s*")); - boolean isSdncService= false - for(String listEntry : svcList){ - if(listEntry.equalsIgnoreCase(serviceType)){ - isSdncService = true - break; + String svcTypes = UrnPropertiesReader.getVariable("sdnc.si.svc.types",execution) ?: "" + List<String> svcList = Arrays.asList(svcTypes.split("\\s*,\\s*")); + boolean isSdncService= false + for(String listEntry : svcList){ + if(listEntry.equalsIgnoreCase(serviceType)){ + isSdncService = true + break; + } } - } - execution.setVariable("sendToSDNC", true) - if(execution.getVariable("sdncVersion").equals("1610")){ - if(!isSdncService){ - execution.setVariable("sendToSDNC", false) + execution.setVariable("sendToSDNC", true) + if(execution.getVariable("sdncVersion").equals("1610")){ + if(!isSdncService){ + execution.setVariable("sendToSDNC", false) + } } - } - }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{ + 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{ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "ServiceInstance not found in aai") diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy index 4f6fbf9966..d7f2087c05 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateNetworkInstance.groovy @@ -328,6 +328,10 @@ public class DoUpdateNetworkInstance extends AbstractServiceTaskProcessor { if(!resourceClient.exists(uri)){ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Service Instance not found in aai") + }else{ + Map<String, String> keys = uri.getURIKeys() + execution.setVariable("serviceType", keys.get("service-type")) + execution.setVariable("subscriberName", keys.get("global-customer-id")) } }catch(BpmnError e) { diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy index ac8e506e1f..20ced72002 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateCustomE2EServiceInstance.groovy @@ -177,10 +177,10 @@ public class UpdateCustomE2EServiceInstance extends AbstractServiceTaskProcessor 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()) + Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class) + execution.setVariable("serviceInstanceName", si.get().getServiceInstanceName()) + execution.setVariable("model-invariant-id-original", si.get().getModelInvariantId()) + execution.setVariable("model-version-id-original", si.get().getModelVersionId()) JSONObject ob = new JSONObject(wrapper.getJson()) JSONArray ar = ob.getJSONObject("relationship-list").getJSONArray("relationship") diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegate.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegate.java index 63db293a2e..12ddf8465e 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegate.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegate.java @@ -67,7 +67,6 @@ public class CheckAaiForCorrelationIdDelegate implements JavaDelegate { AaiResponse aaiResponse = implementation.check(correlationId, aaiConnection); execution.setVariableLocal(AAI_CONTAINS_INFO_ABOUT_PNF, aaiResponse.getContainsInfoAboutPnf()); - execution.setVariableLocal(AAI_CONTAINS_INFO_ABOUT_IP, aaiResponse.getContainsInfoAboutIp()); } catch (IOException e) { LOGGER.error("IOException",e); new ExceptionUtil().buildAndThrowWorkflowException(execution, 9999, e.getMessage()); diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java index e4866f5334..e4866f5334 100644 --- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java index 353b4e32c5..70323b726c 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java @@ -26,8 +26,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import javax.ws.rs.core.UriBuilder; @@ -49,10 +48,7 @@ public class PnfEventReadyDmaapClient implements DmaapClient { private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, PnfEventReadyDmaapClient.class); - private static final String JSON_PATH_CORRELATION_ID = "$.pnfRegistrationFields.correlationId"; - - @Autowired - private Environment env; + private final Environment env; private HttpClient httpClient; private String dmaapHost; private int dmaapPort; @@ -63,10 +59,15 @@ public class PnfEventReadyDmaapClient implements DmaapClient { private String consumerGroup; private Map<String, Runnable> pnfCorrelationIdToThreadMap; private HttpGet getRequest; - private ScheduledExecutorService executor; private int dmaapClientDelayInSeconds; + private volatile ScheduledThreadPoolExecutor executor; private volatile boolean dmaapThreadListenerIsRunning; + @Autowired + public PnfEventReadyDmaapClient(Environment env) { + this.env = env; + } + public void init() { httpClient = HttpClientBuilder.create().build(); pnfCorrelationIdToThreadMap = new ConcurrentHashMap<>(); @@ -97,7 +98,9 @@ public class PnfEventReadyDmaapClient implements DmaapClient { private synchronized void startDmaapThreadListener() { if (!dmaapThreadListenerIsRunning) { - executor = Executors.newScheduledThreadPool(1); + executor = new ScheduledThreadPoolExecutor(1); + executor.setContinueExistingPeriodicTasksAfterShutdownPolicy(false); + executor.setExecuteExistingDelayedTasksAfterShutdownPolicy(false); executor.scheduleWithFixedDelay(new DmaapTopicListenerThread(), 0, dmaapClientDelayInSeconds, TimeUnit.SECONDS); dmaapThreadListenerIsRunning = true; @@ -106,7 +109,7 @@ public class PnfEventReadyDmaapClient implements DmaapClient { private synchronized void stopDmaapThreadListener() { if (dmaapThreadListenerIsRunning) { - executor.shutdownNow(); + executor.shutdown(); dmaapThreadListenerIsRunning = false; executor = null; } @@ -166,7 +169,7 @@ public class PnfEventReadyDmaapClient implements DmaapClient { return Collections.emptyList(); } - private synchronized void informAboutPnfReadyIfCorrelationIdFound(String correlationId) { + private void informAboutPnfReadyIfCorrelationIdFound(String correlationId) { Runnable runnable = unregister(correlationId); if (runnable != null) { LOGGER.debug("pnf ready event got from dmaap for correlationId: " + correlationId); diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java index fd844648fa..b13d7fc419 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java @@ -29,13 +29,10 @@ import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.GenericResour import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.HeaderUtil; import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.NetworkRpcInputEntityBuilder; import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcNetworkTopologyOperationInputEntity; -import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcNetworkTopologyOperationOutputEntity; import org.onap.so.db.request.beans.ResourceOperationStatus; import org.onap.so.db.request.beans.ResourceOperationStatusId; -import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository; import org.onap.so.logger.MsoLogger; import org.onap.so.requestsdb.RequestsDbConstant; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java index 5bd3297c20..8bc9dce966 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java @@ -24,9 +24,6 @@ import org.apache.commons.lang3.StringUtils; import org.camunda.bpm.engine.delegate.DelegateExecution; import org.onap.so.bpmn.core.BaseTask; import org.onap.so.db.request.beans.ResourceOperationStatus; -import org.onap.so.db.request.beans.ResourceOperationStatusId; -import org.onap.so.db.request.data.repository.ResourceOperationStatusRepository; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java new file mode 100644 index 0000000000..201e791a24 --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java @@ -0,0 +1,60 @@ +/*- + * ============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.infrastructure.pnf.delegate; + +import org.onap.aai.domain.yang.Pnf; +import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +public class AaiConnectionTestImpl implements AaiConnection { + + public static final String ID_WITHOUT_ENTRY = "IdWithoutEntry"; + public static final String ID_WITH_ENTRY = "idWithEntryNoIp"; + + private Map<String, Pnf> created = new HashMap<>(); + + @Override + public Optional<Pnf> getEntryFor(String correlationId) throws IOException { + if (Objects.equals(correlationId, ID_WITH_ENTRY)) { + return Optional.of(new Pnf()); + } else { + return Optional.empty(); + } + } + + @Override + public void createEntry(String correlationId, Pnf entry) throws IOException { + created.put(correlationId, entry); + } + + public Map<String, Pnf> getCreated() { + return created; + } + + public void reset() { + created.clear(); + } +} diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionThrowingException.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionThrowingException.java index 7df6757817..7df6757817 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionThrowingException.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionThrowingException.java diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java index 4282b0f2bb..4282b0f2bb 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java index 627e57bfb8..3eb3bd8796 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java @@ -27,10 +27,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITHOUT_ENTRY; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY_AND_IP; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY_NO_IP; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_IP_V6; -import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.AAI_CONTAINS_INFO_ABOUT_IP; +import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY; import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.AAI_CONTAINS_INFO_ABOUT_PNF; import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID; @@ -41,9 +38,6 @@ import org.junit.Test; import org.junit.experimental.runners.Enclosed; import org.junit.runner.RunWith; import org.onap.so.bpmn.core.WorkflowException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; @RunWith(Enclosed.class) public class CheckAaiForCorrelationIdDelegateTest { @@ -81,36 +75,14 @@ public class CheckAaiForCorrelationIdDelegateTest { } @Test - public void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnf() throws Exception { - shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnf(ID_WITH_ENTRY_AND_IP); - } - - @Test - public void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnfWithIpV6() throws Exception { - shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnf(ID_WITH_IP_V6); - } - - private void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnf(String id) throws Exception { - // given - DelegateExecution execution = mock(DelegateExecution.class); - when(execution.getVariable(CORRELATION_ID)).thenReturn(id); - // when - delegate.execute(execution); - // then - verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_PNF, true); - verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_IP, true); - } - - @Test public void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnfWithoutIp() throws Exception { // given DelegateExecution execution = mock(DelegateExecution.class); - when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITH_ENTRY_NO_IP); + when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITH_ENTRY); // when delegate.execute(execution); // then verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_PNF, true); - verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_IP, false); } } @@ -128,7 +100,7 @@ public class CheckAaiForCorrelationIdDelegateTest { public void shouldThrowExceptionWhenIoExceptionOnConnectionToAai() { // given DelegateExecution execution = mock(DelegateExecution.class); - when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITH_ENTRY_NO_IP); + when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITH_ENTRY); when(execution.getVariable("testProcessKey")).thenReturn("testProcessKey"); // when, then assertThatThrownBy(() -> delegate.execute(execution)).isInstanceOf(BpmnError.class); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAaiEntryWithPnfIdDelegateTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAaiEntryWithPnfIdDelegateTest.java index 465dc085fc..465dc085fc 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAaiEntryWithPnfIdDelegateTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAaiEntryWithPnfIdDelegateTest.java diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java new file mode 100644 index 0000000000..f2a4205ebd --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java @@ -0,0 +1,63 @@ +/*- + * ============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.infrastructure.pnf.delegate; + +import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient; +import java.util.Objects; + +public class DmaapClientTestImpl implements DmaapClient { + + private String correlationId; + private Runnable informConsumer; + + @Override + public void registerForUpdate(String correlationId, Runnable informConsumer) { + this.correlationId = correlationId; + this.informConsumer = informConsumer; + } + + @Override + public Runnable unregister(String correlationId) { + if (Objects.equals(this.correlationId, correlationId)) { + this.correlationId = null; + Runnable informConsumer = this.informConsumer; + this.informConsumer = null; + return informConsumer; + } + return null; + } + + public String getCorrelationId() { + return correlationId; + } + + public Runnable getInformConsumer() { + return informConsumer; + } + + public void sendMessage() { + informConsumer.run(); + } + + public boolean haveRegisteredConsumer() { + return correlationId != null; + } +} diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java index ddf33a1d77..ddf33a1d77 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java index aab289fd90..aab289fd90 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java index 08ac9b6948..9ae7ad9bdc 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java @@ -34,6 +34,7 @@ import java.lang.reflect.Field; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledThreadPoolExecutor; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; @@ -82,16 +83,16 @@ public class PnfEventReadyDmaapClientTest { private static final String CONSUMER_GROUP = "consumerGroupTest"; @Mock private Environment env; - @InjectMocks - private PnfEventReadyDmaapClient testedObject = new PnfEventReadyDmaapClient(); -; + private PnfEventReadyDmaapClient testedObject; + private DmaapTopicListenerThread testedObjectInnerClassThread; private HttpClient httpClientMock; private Runnable threadMockToNotifyCamundaFlow; - private ScheduledExecutorService executorMock; + private ScheduledThreadPoolExecutor executorMock; @Before public void init() throws NoSuchFieldException, IllegalAccessException { + testedObject = new PnfEventReadyDmaapClient(env); when(env.getProperty(eq("pnf.dmaap.port"), eq(Integer.class))).thenReturn(PORT); when(env.getProperty(eq("pnf.dmaap.host"))).thenReturn(HOST); testedObject.setDmaapProtocol(PROTOCOL); @@ -104,7 +105,7 @@ public class PnfEventReadyDmaapClientTest { testedObjectInnerClassThread = testedObject.new DmaapTopicListenerThread(); httpClientMock = mock(HttpClient.class); threadMockToNotifyCamundaFlow = mock(Runnable.class); - executorMock = mock(ScheduledExecutorService.class); + executorMock = mock(ScheduledThreadPoolExecutor.class); setPrivateField(); } @@ -127,7 +128,7 @@ public class PnfEventReadyDmaapClientTest { .hasPath( "/" + URI_PATH_PREFIX + "/" + EVENT_TOPIC_TEST + "/" + CONSUMER_GROUP + "/" + CONSUMER_ID + ""); verify(threadMockToNotifyCamundaFlow).run(); - verify(executorMock).shutdownNow(); + verify(executorMock).shutdown(); } /** diff --git a/bpmn/so-bpmn-infrastructure-flows/pom.xml b/bpmn/so-bpmn-infrastructure-flows/pom.xml index 1a3a64bcc8..4db7b3ff66 100644 --- a/bpmn/so-bpmn-infrastructure-flows/pom.xml +++ b/bpmn/so-bpmn-infrastructure-flows/pom.xml @@ -1,5 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<?xml version="1.0"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.onap.so</groupId> <artifactId>bpmn</artifactId> @@ -62,7 +62,7 @@ </goals> </pluginExecutionFilter> <action> - <ignore></ignore> + <ignore/> </action> </pluginExecution> </pluginExecutions> @@ -170,7 +170,7 @@ <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> - <version>22.0</version> + </dependency> <dependency> <groupId>org.mockito</groupId> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn index 8f2bf67b71..89d66bfdb6 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateAndActivatePnfResource.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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.2"> <bpmn:collaboration id="Collaboration_1d0w8lf"> <bpmn:participant id="Participant_1egg397" name="SO Create and Activate Pnf Resource" processRef="CreateAndActivatePnfResource" /> <bpmn:participant id="Participant_0atuyq0" name="AAI" /> @@ -23,56 +23,50 @@ <bpmn:sequenceFlow id="SequenceFlow_1j4r3zt" sourceRef="CheckAiiForCorrelationId" targetRef="DoesAaiContainInfoAboutPnf" /> <bpmn:sequenceFlow id="SequenceFlow_0j5ksz1" sourceRef="CreateAndActivatePnf_StartEvent" targetRef="CheckInputs" /> <bpmn:sequenceFlow id="SequenceFlow_1miyzfe" sourceRef="CancelDmaapClientSubscription" targetRef="ThrowTimeoutException" /> - <bpmn:sequenceFlow id="SequenceFlow_1ls8pua" name="No" sourceRef="DoesAaiContainInfoAboutIp" targetRef="AaiEntryExists"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{!aaiContainsInfoAboutIp}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_1l1t6ak" name="Yes" sourceRef="DoesAaiContainInfoAboutPnf" targetRef="DoesAaiContainInfoAboutIp"> + <bpmn:sequenceFlow id="SequenceFlow_1l1t6ak" name="Yes" sourceRef="DoesAaiContainInfoAboutPnf" targetRef="AaiEntryExists"> <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{aaiContainsInfoAboutPnf}</bpmn:conditionExpression> </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_1h6yz62" name="Yes" sourceRef="DoesAaiContainInfoAboutIp" targetRef="AaiEntryAlreadyUpToDate"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{aaiContainsInfoAboutIp}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:endEvent id="AaiEntryUpdated" name="AAI entry updated"> - <bpmn:incoming>SequenceFlow_0p09qgm</bpmn:incoming> - </bpmn:endEvent> - <bpmn:endEvent id="ThrowTimeoutException" name="Throw timeout exception"> - <bpmn:incoming>SequenceFlow_1miyzfe</bpmn:incoming> - <bpmn:errorEventDefinition errorRef="Error_1" /> - </bpmn:endEvent> - <bpmn:endEvent id="AaiEntryAlreadyUpToDate" name="AAI entry already up-to-date"> - <bpmn:incoming>SequenceFlow_1h6yz62</bpmn:incoming> - </bpmn:endEvent> - <bpmn:startEvent id="CreateAndActivatePnf_StartEvent"> - <bpmn:outgoing>SequenceFlow_0j5ksz1</bpmn:outgoing> - </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_0967g8p" sourceRef="CheckInputs" targetRef="CheckAiiForCorrelationId" /> - <bpmn:serviceTask id="CheckAiiForCorrelationId" name="Check AAI for correlation_id" camunda:delegateExpression="${checkAaiForCorrelationIdDelegate}"> - <bpmn:incoming>SequenceFlow_0967g8p</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1j4r3zt</bpmn:outgoing> + <bpmn:serviceTask id="CheckInputs" name="Check inputs" camunda:delegateExpression="${pnfCheckInputs}"> + <bpmn:incoming>SequenceFlow_0j5ksz1</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0967g8p</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:exclusiveGateway id="DoesAaiContainInfoAboutPnf" name="Does AAI contain info about pnf?"> - <bpmn:incoming>SequenceFlow_1j4r3zt</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1l1t6ak</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0v5ffpe</bpmn:outgoing> - </bpmn:exclusiveGateway> + <bpmn:serviceTask id="CancelDmaapClientSubscription" name="Cancel DmaapClient subscription" camunda:delegateExpression="${cancelDmaapSubscription}"> + <bpmn:incoming>SequenceFlow_1kc34bc</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1miyzfe</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:serviceTask id="InformDmaapClient" name="Inform DmaapClient about business key and corresponding pnf-id" camunda:delegateExpression="${informDmaapClient}"> + <bpmn:incoming>SequenceFlow_17s9025</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1o8od8e</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:intermediateThrowEvent id="AaiEntryExists" name="AAI entry exists"> + <bpmn:incoming>SequenceFlow_1qr6cmf</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1l1t6ak</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_17s9025</bpmn:outgoing> + </bpmn:intermediateThrowEvent> <bpmn:serviceTask id="CreateAndActivatePnf_CreateAaiEntry" name="Create AAI entry with pnf-id = correlation_id" camunda:delegateExpression="${createAaiEntryWithPnfIdDelegate}"> <bpmn:incoming>SequenceFlow_0v5ffpe</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1qr6cmf</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:exclusiveGateway id="DoesAaiContainInfoAboutIp" name="Does AAI contain info about IPv4 or IPv6?"> - <bpmn:incoming>SequenceFlow_1l1t6ak</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1h6yz62</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_1ls8pua</bpmn:outgoing> + <bpmn:exclusiveGateway id="DoesAaiContainInfoAboutPnf" name="Does AAI contain info about pnf?"> + <bpmn:incoming>SequenceFlow_1j4r3zt</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1l1t6ak</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0v5ffpe</bpmn:outgoing> </bpmn:exclusiveGateway> - <bpmn:intermediateThrowEvent id="AaiEntryExists" name="AAI entry exists, lacking IP"> - <bpmn:incoming>SequenceFlow_1qr6cmf</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1ls8pua</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_17s9025</bpmn:outgoing> - </bpmn:intermediateThrowEvent> - <bpmn:serviceTask id="InformDmaapClient" name="Inform DmaapClient about business key and corresponding pnf-id" camunda:delegateExpression="${informDmaapClient}"> - <bpmn:incoming>SequenceFlow_17s9025</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1o8od8e</bpmn:outgoing> + <bpmn:serviceTask id="CheckAiiForCorrelationId" name="Check AAI for correlation_id" camunda:delegateExpression="${checkAaiForCorrelationIdDelegate}"> + <bpmn:incoming>SequenceFlow_0967g8p</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1j4r3zt</bpmn:outgoing> </bpmn:serviceTask> + <bpmn:startEvent id="CreateAndActivatePnf_StartEvent"> + <bpmn:outgoing>SequenceFlow_0j5ksz1</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:endEvent id="ThrowTimeoutException" name="Throw timeout exception"> + <bpmn:incoming>SequenceFlow_1miyzfe</bpmn:incoming> + <bpmn:errorEventDefinition errorRef="Error_1" /> + </bpmn:endEvent> + <bpmn:endEvent id="AaiEntryUpdated" name="AAI entry updated"> + <bpmn:incoming>SequenceFlow_0p09qgm</bpmn:incoming> + </bpmn:endEvent> <bpmn:receiveTask id="WaitForDmaapPnfReadyNotification" name="Wait for DMAAP pnf-ready notification" messageRef="Message_13h1tlo"> <bpmn:incoming>SequenceFlow_1o8od8e</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0p09qgm</bpmn:outgoing> @@ -83,21 +77,13 @@ <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">#{timeoutForPnfEntryNotification}</bpmn:timeDuration> </bpmn:timerEventDefinition> </bpmn:boundaryEvent> - <bpmn:serviceTask id="CancelDmaapClientSubscription" name="Cancel DmaapClient subscription" camunda:delegateExpression="${cancelDmaapSubscription}"> - <bpmn:incoming>SequenceFlow_1kc34bc</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1miyzfe</bpmn:outgoing> - </bpmn:serviceTask> - <bpmn:serviceTask id="CheckInputs" name="Check inputs" camunda:delegateExpression="${pnfCheckInputs}"> - <bpmn:incoming>SequenceFlow_0j5ksz1</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0967g8p</bpmn:outgoing> - </bpmn:serviceTask> + <bpmn:association id="Association_0d7oxnz" sourceRef="CreateAndActivatePnf_StartEvent" targetRef="TextAnnotation_1eyzes8" /> <bpmn:textAnnotation id="TextAnnotation_1eyzes8"> - <bpmn:text><![CDATA[Inputs: + <bpmn:text>Inputs: Â -Â timeoutForPnfEntryNotification - String - correlationId - String -]]></bpmn:text> +</bpmn:text> </bpmn:textAnnotation> - <bpmn:association id="Association_0d7oxnz" sourceRef="CreateAndActivatePnf_StartEvent" targetRef="TextAnnotation_1eyzes8" /> </bpmn:process> <bpmn:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" /> <bpmn:message id="Message_13h1tlo" name="WorkflowMessage" /> @@ -109,19 +95,13 @@ <bpmndi:BPMNShape id="ExclusiveGateway_1cttgdo_di" bpmnElement="DoesAaiContainInfoAboutPnf" isMarkerVisible="true"> <dc:Bounds x="390" y="182" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="372" y="283" width="85" height="20" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ExclusiveGateway_0yamdfm_di" bpmnElement="DoesAaiContainInfoAboutIp" isMarkerVisible="true"> - <dc:Bounds x="682" y="41" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="663" y="5" width="87" height="30" /> + <dc:Bounds x="372" y="283" width="85" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_0k52gr7_di" bpmnElement="AaiEntryUpdated"> <dc:Bounds x="1312" y="189" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1286" y="230" width="89" height="10" /> + <dc:Bounds x="1287" y="230" width="88" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="StartEvent_0j5ok9h_di" bpmnElement="CreateAndActivatePnf_StartEvent"> @@ -137,51 +117,38 @@ <dc:Bounds x="511" y="167" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1j4r3zt_di" bpmnElement="SequenceFlow_1j4r3zt"> - <di:waypoint xsi:type="dc:Point" x="319" y="207" /> - <di:waypoint xsi:type="dc:Point" x="390" y="207" /> + <di:waypoint x="319" y="207" /> + <di:waypoint x="390" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="309.5" y="187" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1l1t6ak_di" bpmnElement="SequenceFlow_1l1t6ak"> - <di:waypoint xsi:type="dc:Point" x="415" y="207" /> - <di:waypoint xsi:type="dc:Point" x="415" y="66" /> - <di:waypoint xsi:type="dc:Point" x="682" y="66" /> + <di:waypoint x="415" y="207" /> + <di:waypoint x="415" y="66" /> + <di:waypoint x="707" y="66" /> + <di:waypoint x="707" y="189" /> <bpmndi:BPMNLabel> - <dc:Bounds x="430" y="180.1206896551724" width="19" height="10" /> + <dc:Bounds x="430" y="180" width="19" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0v5ffpe_di" bpmnElement="SequenceFlow_0v5ffpe"> - <di:waypoint xsi:type="dc:Point" x="440" y="207" /> - <di:waypoint xsi:type="dc:Point" x="511" y="207" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="447.32911392405055" y="210" width="15" height="10" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1h6yz62_di" bpmnElement="SequenceFlow_1h6yz62"> - <di:waypoint xsi:type="dc:Point" x="732" y="66" /> - <di:waypoint xsi:type="dc:Point" x="1312" y="66" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="742.7435064935065" y="51" width="19" height="10" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1ls8pua_di" bpmnElement="SequenceFlow_1ls8pua"> - <di:waypoint xsi:type="dc:Point" x="707" y="91" /> - <di:waypoint xsi:type="dc:Point" x="707" y="189" /> + <di:waypoint x="440" y="207" /> + <di:waypoint x="511" y="207" /> <bpmndi:BPMNLabel> - <dc:Bounds x="717" y="116.1917808219178" width="15" height="10" /> + <dc:Bounds x="448" y="210" width="14" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1qr6cmf_di" bpmnElement="SequenceFlow_1qr6cmf"> - <di:waypoint xsi:type="dc:Point" x="611" y="207" /> - <di:waypoint xsi:type="dc:Point" x="689" y="207" /> + <di:waypoint x="611" y="207" /> + <di:waypoint x="689" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="605" y="187" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0j5ksz1_di" bpmnElement="SequenceFlow_0j5ksz1"> - <di:waypoint xsi:type="dc:Point" x="-18" y="207" /> - <di:waypoint xsi:type="dc:Point" x="48" y="207" /> + <di:waypoint x="-18" y="207" /> + <di:waypoint x="48" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="-30" y="187" width="90" height="10" /> </bpmndi:BPMNLabel> @@ -190,22 +157,22 @@ <dc:Bounds x="123" y="523" width="502" height="60" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="MessageFlow_1h3xu88_di" bpmnElement="MessageFlow_1h3xu88"> - <di:waypoint xsi:type="dc:Point" x="561" y="247" /> - <di:waypoint xsi:type="dc:Point" x="561" y="523" /> + <di:waypoint x="561" y="247" /> + <di:waypoint x="561" y="523" /> <bpmndi:BPMNLabel> <dc:Bounds x="531" y="380" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="MessageFlow_09ibv5a_di" bpmnElement="MessageFlow_09ibv5a"> - <di:waypoint xsi:type="dc:Point" x="250" y="247" /> - <di:waypoint xsi:type="dc:Point" x="250" y="523" /> + <di:waypoint x="250" y="247" /> + <di:waypoint x="250" y="523" /> <bpmndi:BPMNLabel> <dc:Bounds x="220" y="380" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="MessageFlow_0vjul4t_di" bpmnElement="MessageFlow_0vjul4t"> - <di:waypoint xsi:type="dc:Point" x="289" y="523" /> - <di:waypoint xsi:type="dc:Point" x="289" y="247" /> + <di:waypoint x="289" y="523" /> + <di:waypoint x="289" y="247" /> <bpmndi:BPMNLabel> <dc:Bounds x="259" y="380" width="90" height="10" /> </bpmndi:BPMNLabel> @@ -216,76 +183,70 @@ <bpmndi:BPMNShape id="EndEvent_0wbx6tt_di" bpmnElement="ThrowTimeoutException"> <dc:Bounds x="1312" y="345" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1305" y="382" width="70" height="20" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_00cy7r0_di" bpmnElement="AaiEntryAlreadyUpToDate"> - <dc:Bounds x="1312" y="48" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1288" y="89" width="85" height="20" /> + <dc:Bounds x="1305" y="382" width="70" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="IntermediateThrowEvent_0fjcdy4_di" bpmnElement="AaiEntryExists"> <dc:Bounds x="689" y="189" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="670" y="235" width="80" height="20" /> + <dc:Bounds x="672" y="235" width="77" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="TextAnnotation_1eyzes8_di" bpmnElement="TextAnnotation_1eyzes8"> <dc:Bounds x="-37" y="70" width="243" height="54" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="Association_0d7oxnz_di" bpmnElement="Association_0d7oxnz"> - <di:waypoint xsi:type="dc:Point" x="-36" y="189" /> - <di:waypoint xsi:type="dc:Point" x="-36" y="124" /> + <di:waypoint x="-36" y="189" /> + <di:waypoint x="-36" y="124" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="MessageFlow_1vrcp2d_di" bpmnElement="MessageFlow_1vrcp2d"> - <di:waypoint xsi:type="dc:Point" x="1026" y="523" /> - <di:waypoint xsi:type="dc:Point" x="1026" y="247" /> + <di:waypoint x="1060" y="523" /> + <di:waypoint x="1060" y="247" /> <bpmndi:BPMNLabel> <dc:Bounds x="996" y="380" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_17s9025_di" bpmnElement="SequenceFlow_17s9025"> - <di:waypoint xsi:type="dc:Point" x="725" y="207" /> - <di:waypoint xsi:type="dc:Point" x="803" y="207" /> + <di:waypoint x="725" y="207" /> + <di:waypoint x="803" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="719" y="187" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="BoundaryEvent_15eo1k9_di" bpmnElement="WaitForDmaapTimeout"> - <dc:Bounds x="1040" y="229" width="36" height="36" /> + <dc:Bounds x="1074" y="229" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1071" y="260" width="40" height="10" /> + <dc:Bounds x="1117" y="240" width="40" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1kc34bc_di" bpmnElement="SequenceFlow_1kc34bc"> - <di:waypoint xsi:type="dc:Point" x="1058" y="265" /> - <di:waypoint xsi:type="dc:Point" x="1058" y="363" /> - <di:waypoint xsi:type="dc:Point" x="1145" y="363" /> + <di:waypoint x="1092" y="265" /> + <di:waypoint x="1092" y="363" /> + <di:waypoint x="1145" y="363" /> <bpmndi:BPMNLabel> <dc:Bounds x="1028" y="309" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ReceiveTask_1sfysua_di" bpmnElement="WaitForDmaapPnfReadyNotification"> - <dc:Bounds x="974" y="167" width="100" height="80" /> + <dc:Bounds x="1008" y="167" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0p09qgm_di" bpmnElement="SequenceFlow_0p09qgm"> - <di:waypoint xsi:type="dc:Point" x="1074" y="207" /> - <di:waypoint xsi:type="dc:Point" x="1312" y="207" /> + <di:waypoint x="1108" y="207" /> + <di:waypoint x="1312" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="1148" y="187" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1o8od8e_di" bpmnElement="SequenceFlow_1o8od8e"> - <di:waypoint xsi:type="dc:Point" x="903" y="207" /> - <di:waypoint xsi:type="dc:Point" x="974" y="207" /> + <di:waypoint x="903" y="207" /> + <di:waypoint x="1008" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="893.5" y="187" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="MessageFlow_0tg4hw9_di" bpmnElement="MessageFlow_0tg4hw9"> - <di:waypoint xsi:type="dc:Point" x="853" y="247" /> - <di:waypoint xsi:type="dc:Point" x="853" y="523" /> + <di:waypoint x="853" y="247" /> + <di:waypoint x="853" y="523" /> <bpmndi:BPMNLabel> <dc:Bounds x="823" y="380" width="90" height="10" /> </bpmndi:BPMNLabel> @@ -294,15 +255,15 @@ <dc:Bounds x="803" y="167" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1miyzfe_di" bpmnElement="SequenceFlow_1miyzfe"> - <di:waypoint xsi:type="dc:Point" x="1245" y="363" /> - <di:waypoint xsi:type="dc:Point" x="1312" y="363" /> + <di:waypoint x="1245" y="363" /> + <di:waypoint x="1312" y="363" /> <bpmndi:BPMNLabel> <dc:Bounds x="1233.5" y="343" width="90" height="10" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="MessageFlow_1py54jr_di" bpmnElement="MessageFlow_1py54jr"> - <di:waypoint xsi:type="dc:Point" x="1195" y="403" /> - <di:waypoint xsi:type="dc:Point" x="1195" y="523" /> + <di:waypoint x="1195" y="403" /> + <di:waypoint x="1195" y="523" /> <bpmndi:BPMNLabel> <dc:Bounds x="1165" y="458" width="90" height="10" /> </bpmndi:BPMNLabel> @@ -311,8 +272,8 @@ <dc:Bounds x="1145" y="323" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_0967g8p_di" bpmnElement="SequenceFlow_0967g8p"> - <di:waypoint xsi:type="dc:Point" x="148" y="207" /> - <di:waypoint xsi:type="dc:Point" x="219" y="207" /> + <di:waypoint x="148" y="207" /> + <di:waypoint x="219" y="207" /> <bpmndi:BPMNLabel> <dc:Bounds x="183.5" y="187" width="0" height="10" /> </bpmndi:BPMNLabel> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn index 9ea6a9b5c4..3b49011c3e 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn @@ -98,7 +98,6 @@ ex.processJavaException(execution)]]></bpmn2:script> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:out source="serviceInstanceName" target="serviceInstanceName" /> <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> <camunda:in source="productFamilyId" target="productFamilyId" /> <camunda:in source="sdncVersion" target="sdncVersion" /> <camunda:in source="bpmnRequest" target="requestJson" /> @@ -454,6 +453,7 @@ CreateVcpeResCustService.prepareCreateAllottedResourceTXC(execution)]]></bpmn2:s <camunda:in source="cloudRegionId" target="cloudRegionId" /> <camunda:in source="serviceInstanceName" target="serviceInstanceName" /> <camunda:in source="homingModelIds" target="homingModelIds" /> + <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> </bpmn2:extensionElements> <bpmn2:incoming>SequenceFlow_11efpvh</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1jbuf1t</bpmn2:outgoing> @@ -517,7 +517,6 @@ CreateVcpeResCustService.prepareCreateAllottedResourceBRG(execution)]]></bpmn2:s <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> <camunda:in source="serviceDecomposition" target="serviceDecomposition" /> - <camunda:in source="RegionOne_flavorList" target="RegionOne_flavorList" /> </bpmn2:extensionElements> <bpmn2:incoming>SequenceFlow_0ws7fjn</bpmn2:incoming> <bpmn2:outgoing>SequenceFlow_1mkdhw9</bpmn2:outgoing> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService_simplified.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService_simplified.bpmn new file mode 100644 index 0000000000..f975ffbcd6 --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService_simplified.bpmn @@ -0,0 +1,975 @@ +<?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:process id="CreateVcpeResCustService_simplified" name="CreateVcpeResCustService_simplified" isExecutable="true"> + <bpmn2:scriptTask id="sendSyncAckResponse_ScriptTask" name="Send Sync Ack Response" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService = new CreateVcpeResCustService() +CreateVcpeResCustService.sendSyncResponse(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="sendSyncAckResponse_ScriptTask" targetRef="IntermediateThrowEvent_2" /> + <bpmn2:startEvent id="createVCPE_startEvent" name="Start Flow"> + <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing> + </bpmn2:startEvent> + <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createVCPE_startEvent" targetRef="preProcessRequest_ScriptTask" /> + <bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService = new CreateVcpeResCustService() +CreateVcpeResCustService.preProcessRequest(execution) +]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="sendSyncAckResponse_ScriptTask" /> + <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_3" name="vCPE-RESCUST"> + <bpmn2:outgoing>SequenceFlow_1eu60rt</bpmn2:outgoing> + <bpmn2:linkEventDefinition id="_LinkEventDefinition_37" name="vCPE-RESCUST" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:scriptTask id="postProcessAndCompletionRequest_ScriptTask" name="Post Process & Completion Request" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0afe2pg</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService = new CreateVcpeResCustService() +CreateVcpeResCustService.postProcessResponse(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_29" name="" sourceRef="postProcessAndCompletionRequest_ScriptTask" targetRef="callCompleteMsoProcess_CallActivity" /> + <bpmn2:callActivity id="callCompleteMsoProcess_CallActivity" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess"> + <bpmn2:extensionElements> + <camunda:in variables="all" /> + <camunda:out variables="all" /> + <camunda:in source="CVRCS_CompleteMsoProcessRequest" target="CompleteMsoProcessRequest" /> + <camunda:in source="mso-request-id" target="requestId" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" /> + <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" /> + <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_29</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="callCompleteMsoProcess_CallActivity" targetRef="ScriptTask_2" /> + <bpmn2:scriptTask id="ScriptTask_2" name="Set Success Indicator" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing> + <bpmn2:script><![CDATA[// The following variable is checked by the unit test +execution.setVariable("CreateVcpeResCustServiceSuccessIndicator", true)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="ScriptTask_2" targetRef="CreateVCPE_EndEvent" /> + <bpmn2:endEvent id="CreateVCPE_EndEvent" name="End"> + <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming> + <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_13" /> + </bpmn2:endEvent> + <bpmn2:subProcess id="UnexpectedError_SubProcess_1" name="Sub-process for UnexpectedErrors" triggeredByEvent="true"> + <bpmn2:startEvent id="StartEvent_1"> + <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing> + <bpmn2:errorEventDefinition id="_ErrorEventDefinition_92" errorRef="Error_1" /> + </bpmn2:startEvent> + <bpmn2:endEvent id="EndEvent_1"> + <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="StartEvent_1" targetRef="ScriptTask_1" /> + <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.* +ExceptionUtil ex = new ExceptionUtil() +ex.processJavaException(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" /> + </bpmn2:subProcess> + <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_4" name="FinishProcess"> + <bpmn2:outgoing>SequenceFlow_12ilko1</bpmn2:outgoing> + <bpmn2:linkEventDefinition id="_LinkEventDefinition_39" name="FinishProcess" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_2" name="GoTovCPE-RESCUST"> + <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming> + <bpmn2:linkEventDefinition id="_LinkEventDefinition_38" name="vCPE-RESCUST" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:subProcess id="SubProcess_0s6hpty" name="Subprocess For Exception / FalloutHandler" triggeredByEvent="true"> + <bpmn2:exclusiveGateway id="ExclusiveGateway_1vwgs6p" name="Is Rollback On?" default="SequenceFlow_0dhf2js"> + <bpmn2:incoming>SequenceFlow_0zq7i3q</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0zpbskl</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0dhf2js</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:startEvent id="StartEvent_1bwmffk" name="Fault Start"> + <bpmn2:outgoing>SequenceFlow_0zq7i3q</bpmn2:outgoing> + <bpmn2:errorEventDefinition /> + </bpmn2:startEvent> + <bpmn2:exclusiveGateway id="ExclusiveGateway_0ydrtdx" name="isPONR?" default="SequenceFlow_02o4yqx"> + <bpmn2:incoming>SequenceFlow_0zpbskl</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1sx5llu</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_02o4yqx</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:exclusiveGateway id="ExclusiveGateway_1kvn1pz" name="is AR_TXC Ok?" default="SequenceFlow_19mxskt"> + <bpmn2:incoming>SequenceFlow_0t3mtod</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_19mxskt</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1sl79hn</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:callActivity id="CallActivity_0jw5tqa" name="Call FalloutHandlerV1" calledElement="FalloutHandler"> + <bpmn2:extensionElements> + <camunda:in source="CVRCS_falloutRequest" target="FalloutHandlerRequest" /> + <camunda:in source="msoRequestId" target="mso-request-id" /> + <camunda:in source="serviceInstanceId" target="mso-service-instance-id" /> + <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" /> + <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" /> + <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0807ukc</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_19yywk8</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:endEvent id="EndEvent_04xute7"> + <bpmn2:incoming>SequenceFlow_19yywk8</bpmn2:incoming> + </bpmn2:endEvent> + <bpmn2:scriptTask id="ScriptTask_0yk02h3" name="Prepare FalloutHandler" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0jg47xm</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0807ukc</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService = new CreateVcpeResCustService() +CreateVcpeResCustService.prepareFalloutRequest(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_0zpbskl" name="Yes" sourceRef="ExclusiveGateway_1vwgs6p" targetRef="ExclusiveGateway_0ydrtdx"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("disableRollback") != true}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_0dhf2js" name="No" sourceRef="ExclusiveGateway_1vwgs6p" targetRef="InclusiveGateway_0foywso" /> + <bpmn2:sequenceFlow id="SequenceFlow_1sx5llu" name="Yes" sourceRef="ExclusiveGateway_0ydrtdx" targetRef="InclusiveGateway_0foywso"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("PONR") == true}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_02o4yqx" name="No" sourceRef="ExclusiveGateway_0ydrtdx" targetRef="ScriptTask_17doerz" /> + <bpmn2:sequenceFlow id="SequenceFlow_19mxskt" name="No" sourceRef="ExclusiveGateway_1kvn1pz" targetRef="ExclusiveGateway_05indeh" /> + <bpmn2:callActivity id="DoRollbackService_CallActivity" name="DoRollback Service " calledElement="DoCreateServiceInstanceRollback"> + <bpmn2:extensionElements> + <camunda:in source="DCRESI_rollbackData" target="rollbackData" /> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:out source="rolledBack" target="DCRESI_rolledBack" /> + <camunda:out source="rollbackError" target="DCRESI_rollbackError" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1a7e8l1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1f1hd3l</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:inclusiveGateway id="InclusiveGateway_0foywso"> + <bpmn2:incoming>SequenceFlow_1sx5llu</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0dhf2js</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1rabks0</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0jg47xm</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1f1hd3l" sourceRef="DoRollbackService_CallActivity" targetRef="InclusiveGateway_0m9f5ka" /> + <bpmn2:sequenceFlow id="SequenceFlow_0jg47xm" sourceRef="InclusiveGateway_0foywso" targetRef="ScriptTask_0yk02h3" /> + <bpmn2:sequenceFlow id="SequenceFlow_0807ukc" sourceRef="ScriptTask_0yk02h3" targetRef="CallActivity_0jw5tqa" /> + <bpmn2:sequenceFlow id="SequenceFlow_19yywk8" sourceRef="CallActivity_0jw5tqa" targetRef="EndEvent_04xute7" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_05indeh" name="Service Rollback present?" default="SequenceFlow_0sezboq"> + <bpmn2:incoming>SequenceFlow_19mxskt</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_17cz98f</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0sezboq</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1a7e8l1</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0sezboq" name="No" sourceRef="ExclusiveGateway_05indeh" targetRef="InclusiveGateway_0m9f5ka" /> + <bpmn2:sequenceFlow id="SequenceFlow_0zq7i3q" name="" sourceRef="StartEvent_1bwmffk" targetRef="ExclusiveGateway_1vwgs6p" /> + <bpmn2:inclusiveGateway id="InclusiveGateway_0m9f5ka"> + <bpmn2:incoming>SequenceFlow_1f1hd3l</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0sezboq</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1mbymcu</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_00by7l7</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1lv5ld6</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:scriptTask id="ScriptTask_17doerz" name="Pre Process Rollback" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_02o4yqx</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0ftzjjm</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService= new CreateVcpeResCustService() +CreateVcpeResCustService.preProcessRollback(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:scriptTask id="ScriptTask_0wyub4x" name="Post Process Rollback" scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_0dvsqpp</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1rabks0</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService= new CreateVcpeResCustService() +CreateVcpeResCustService.postProcessRollback(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_1rabks0" sourceRef="ScriptTask_0wyub4x" targetRef="InclusiveGateway_0foywso" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_06gq6em" name="is AR_BRG Ok?" default="SequenceFlow_0ya1cr3"> + <bpmn2:incoming>SequenceFlow_12dakwh</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0orpdrl</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0ya1cr3</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:callActivity id="CallActivity_1bpuf2p" name="DoRollback BRG Allotted Resources " calledElement="DoCreateAllottedResourceBRGRollback"> + <bpmn2:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="DCARBRG_rollbackData" target="rollbackData" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> + <camunda:out source="rolledBack" target="DCARBRG_rolledBack" /> + <camunda:out source="rollbackError" target="DCARBRG_rollbackError" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0orpdrl</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1t3cnnx</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:inclusiveGateway id="InclusiveGateway_131ozdf"> + <bpmn2:incoming>SequenceFlow_0ya1cr3</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1sim44y</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_027lz43</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0orpdrl" name="Yes" sourceRef="ExclusiveGateway_06gq6em" targetRef="CallActivity_1bpuf2p"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCARBRG_rollbackData") != null }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_1t3cnnx" sourceRef="CallActivity_1bpuf2p" targetRef="ExclusiveGateway_1mjdcct" /> + <bpmn2:sequenceFlow id="SequenceFlow_0ya1cr3" name="No" sourceRef="ExclusiveGateway_06gq6em" targetRef="InclusiveGateway_131ozdf" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_14tl857" name="is VNF Ok?" default="SequenceFlow_1kpdu1j"> + <bpmn2:incoming>SequenceFlow_027lz43</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1kpdu1j</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_007p8k3</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:inclusiveGateway id="InclusiveGateway_142br6v"> + <bpmn2:incoming>SequenceFlow_1kpdu1j</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_1quvahv</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0t3mtod</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1kpdu1j" name="No" sourceRef="ExclusiveGateway_14tl857" targetRef="InclusiveGateway_142br6v" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_1mjdcct" name="Rollback success?" default="SequenceFlow_0dr2fem"> + <bpmn2:incoming>SequenceFlow_1t3cnnx</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1sim44y</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0dr2fem</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1sim44y" name="Yes" sourceRef="ExclusiveGateway_1mjdcct" targetRef="InclusiveGateway_131ozdf"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCARBRG_rolledBack") == true }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_0dr2fem" name="No" sourceRef="ExclusiveGateway_1mjdcct" targetRef="InclusiveGateway_1xenadu" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_05dg1m1" name="Rollback success?" default="SequenceFlow_1mbymcu"> + <bpmn2:incoming>SequenceFlow_1mpsdaj</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1quvahv</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_1mbymcu</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1quvahv" name="Yes" sourceRef="ExclusiveGateway_05dg1m1" targetRef="InclusiveGateway_142br6v"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCVAM_rolledBack") ==true }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_1mbymcu" name="No" sourceRef="ExclusiveGateway_05dg1m1" targetRef="InclusiveGateway_0m9f5ka" /> + <bpmn2:exclusiveGateway id="ExclusiveGateway_0y7gtd9" name="rollback failed?" default="SequenceFlow_12dakwh"> + <bpmn2:incoming>SequenceFlow_0ftzjjm</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_12dakwh</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_09nn9a9</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0ftzjjm" sourceRef="ScriptTask_17doerz" targetRef="ExclusiveGateway_0y7gtd9" /> + <bpmn2:sequenceFlow id="SequenceFlow_12dakwh" name="No" sourceRef="ExclusiveGateway_0y7gtd9" targetRef="ExclusiveGateway_06gq6em" /> + <bpmn2:inclusiveGateway id="InclusiveGateway_1xenadu"> + <bpmn2:incoming>SequenceFlow_1lv5ld6</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_09nn9a9</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_0dr2fem</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0dvsqpp</bpmn2:outgoing> + </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_1lv5ld6" sourceRef="InclusiveGateway_0m9f5ka" targetRef="InclusiveGateway_1xenadu" /> + <bpmn2:sequenceFlow id="SequenceFlow_0dvsqpp" sourceRef="InclusiveGateway_1xenadu" targetRef="ScriptTask_0wyub4x" /> + <bpmn2:sequenceFlow id="SequenceFlow_09nn9a9" name="Yes" sourceRef="ExclusiveGateway_0y7gtd9" targetRef="InclusiveGateway_1xenadu"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("rolledBack") != null && execution.getVariable("rolledBack") == false}]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_027lz43" sourceRef="InclusiveGateway_131ozdf" targetRef="ExclusiveGateway_14tl857" /> + <bpmn2:sequenceFlow id="SequenceFlow_0t3mtod" sourceRef="InclusiveGateway_142br6v" targetRef="ExclusiveGateway_1kvn1pz" /> + <bpmn2:callActivity id="CallActivity_071yaf8" name="DoRollback TXC Allotted Resources " calledElement="DoCreateAllottedResourceTXCRollback"> + <bpmn2:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="DCARTXC_rollbackData" target="rollbackData" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> + <camunda:out source="rolledBack" target="DCARTXC_rolledBack" /> + <camunda:out source="rollbackError" target="DCARTXC_rollbackError" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_1sl79hn</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0ne9n0g</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_1sl79hn" name="Yes" sourceRef="ExclusiveGateway_1kvn1pz" targetRef="CallActivity_071yaf8"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCARTXC_rollbackData") != null }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:exclusiveGateway id="ExclusiveGateway_0y158bb" name="Rollback success?" default="SequenceFlow_00by7l7"> + <bpmn2:incoming>SequenceFlow_0ne9n0g</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_00by7l7</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_17cz98f</bpmn2:outgoing> + </bpmn2:exclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0ne9n0g" sourceRef="CallActivity_071yaf8" targetRef="ExclusiveGateway_0y158bb" /> + <bpmn2:sequenceFlow id="SequenceFlow_1a7e8l1" name="Yes" sourceRef="ExclusiveGateway_05indeh" targetRef="DoRollbackService_CallActivity"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCRESI_rollbackData") != null }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:sequenceFlow id="SequenceFlow_00by7l7" name="No" sourceRef="ExclusiveGateway_0y158bb" targetRef="InclusiveGateway_0m9f5ka" /> + <bpmn2:sequenceFlow id="SequenceFlow_17cz98f" name="Yes" sourceRef="ExclusiveGateway_0y158bb" targetRef="ExclusiveGateway_05indeh"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{ execution.getVariable("DCARTXC_rolledBack") == true }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + <bpmn2:callActivity id="CallActivity_1cl4iu4" name="DoRollback VNF and Modules " calledElement="DoCreateVnfAndModulesRollback"> + <bpmn2:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="DCVAM_rollbackData" target="rollbackData" /> + <camunda:out source="rolledBack" target="DCVAM_rolledBack" /> + <camunda:out source="rollbackError" target="DCVAM_rollbackError" /> + <camunda:in source="sdncVersion" target="sdncVersion" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_007p8k3</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_1mpsdaj</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:sequenceFlow id="SequenceFlow_1mpsdaj" sourceRef="CallActivity_1cl4iu4" targetRef="ExclusiveGateway_05dg1m1" /> + <bpmn2:sequenceFlow id="SequenceFlow_007p8k3" name="Yes" sourceRef="ExclusiveGateway_14tl857" targetRef="CallActivity_1cl4iu4"> + <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("DCVAM_rollbackData") != null }]]></bpmn2:conditionExpression> + </bpmn2:sequenceFlow> + </bpmn2:subProcess> + <bpmn2:scriptTask id="setPONR_ScriptTask" name="set PONR"> + <bpmn2:incoming>SequenceFlow_12ilko1</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0afe2pg</bpmn2:outgoing> + <bpmn2:script><![CDATA[#{execution.setVariable("PONR", true)}]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_12ilko1" sourceRef="IntermediateCatchEvent_4" targetRef="setPONR_ScriptTask" /> + <bpmn2:sequenceFlow id="SequenceFlow_0afe2pg" sourceRef="setPONR_ScriptTask" targetRef="postProcessAndCompletionRequest_ScriptTask" /> + <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0prlju0" name="GoTo StartService"> + <bpmn2:incoming>SequenceFlow_11efpvh</bpmn2:incoming> + <bpmn2:linkEventDefinition name="CreateAllottedResourcesBRG" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:callActivity id="DecomposeService" name="Call Decompose Service" calledElement="DecomposeService"> + <bpmn2:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_00h6hmd</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_17g05fd</bpmn2:outgoing> + </bpmn2:callActivity> + <bpmn2:scriptTask id="ScriptTask_0cdtchu" name="Prepare Decompose Service " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_1eu60rt</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_00h6hmd</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService = new CreateVcpeResCustService() +CreateVcpeResCustService.prepareDecomposeService(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_1eu60rt" sourceRef="IntermediateCatchEvent_3" targetRef="ScriptTask_0cdtchu" /> + <bpmn2:sequenceFlow id="SequenceFlow_00h6hmd" sourceRef="ScriptTask_0cdtchu" targetRef="DecomposeService" /> + <bpmn2:sequenceFlow id="SequenceFlow_17g05fd" sourceRef="DecomposeService" targetRef="ScriptTask_0lpv2da" /> + <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_17pzn7m" name="CreateAllottedResourcesBRG"> + <bpmn2:outgoing>SequenceFlow_0gj4vud</bpmn2:outgoing> + <bpmn2:linkEventDefinition name="CreateAllottedResourcesBRG" /> + </bpmn2:intermediateCatchEvent> + <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0lt5ltv" name="GoToFinishProcess"> + <bpmn2:incoming>SequenceFlow_0clhseq</bpmn2:incoming> + <bpmn2:linkEventDefinition name="FinishProcess" /> + </bpmn2:intermediateThrowEvent> + <bpmn2:scriptTask id="ScriptTask_0lpv2da" name="PostProcess Decompose Service " scriptFormat="groovy"> + <bpmn2:incoming>SequenceFlow_17g05fd</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_11efpvh</bpmn2:outgoing> + <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.vcpe.scripts.* +def CreateVcpeResCustService = new CreateVcpeResCustService() +CreateVcpeResCustService.processDecomposition(execution)]]></bpmn2:script> + </bpmn2:scriptTask> + <bpmn2:sequenceFlow id="SequenceFlow_11efpvh" sourceRef="ScriptTask_0lpv2da" targetRef="IntermediateThrowEvent_0prlju0" /> + <bpmn2:sequenceFlow id="SequenceFlow_0gj4vud" sourceRef="IntermediateCatchEvent_17pzn7m" targetRef="Task_14l19kv" /> + <bpmn2:sequenceFlow id="SequenceFlow_0clhseq" sourceRef="Task_14l19kv" targetRef="IntermediateThrowEvent_0lt5ltv" /> + <bpmn2:callActivity id="Task_14l19kv" name="Create And Activate Pnf Resource" calledElement="CreateAndActivatePnfResource"> + <bpmn2:extensionElements> + <camunda:in source="timeoutForPnfEntryNotification" target="timeoutForPnfEntryNotification" /> + <camunda:in source="correlationId" target="correlationId" /> + <camunda:in businessKey="#{execution.processBusinessKey}" /> + </bpmn2:extensionElements> + <bpmn2:incoming>SequenceFlow_0gj4vud</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0clhseq</bpmn2:outgoing> + </bpmn2:callActivity> + </bpmn2:process> + <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> + <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" /> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateVcpeResCustService_simplified"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createVCPE_startEvent"> + <dc:Bounds x="67" y="920" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="61" y="961" width="50" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask"> + <dc:Bounds x="256" y="898" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61"> + <di:waypoint xsi:type="dc:Point" x="103" y="938" /> + <di:waypoint xsi:type="dc:Point" x="256" y="938" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="100" y="938" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_CallActivity_4" bpmnElement="callCompleteMsoProcess_CallActivity"> + <dc:Bounds x="763" y="1432" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_80" bpmnElement="postProcessAndCompletionRequest_ScriptTask"> + <dc:Bounds x="490" y="1432" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_ScriptTask_61" targetElement="_BPMNShape_ScriptTask_127"> + <di:waypoint xsi:type="dc:Point" x="356" y="938" /> + <di:waypoint xsi:type="dc:Point" x="447" y="938" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="200" y="899" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_127" bpmnElement="sendSyncAckResponse_ScriptTask"> + <dc:Bounds x="447" y="898" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_42" bpmnElement="SequenceFlow_29" sourceElement="_BPMNShape_ScriptTask_80" targetElement="_BPMNShape_CallActivity_4"> + <di:waypoint xsi:type="dc:Point" x="590" y="1472" /> + <di:waypoint xsi:type="dc:Point" x="763" y="1472" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="632" y="1457" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_177" bpmnElement="CreateVCPE_EndEvent"> + <dc:Bounds x="1262" y="1452" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1270" y="1493" width="20" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_CallActivity_4" targetElement="_BPMNShape_ScriptTask_337"> + <di:waypoint xsi:type="dc:Point" x="863" y="1472" /> + <di:waypoint xsi:type="dc:Point" x="1071" y="1471" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="922" y="1457" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_SubProcess_27" bpmnElement="UnexpectedError_SubProcess_1" isExpanded="true"> + <dc:Bounds x="1257" y="1702" width="409" height="232" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_1"> + <dc:Bounds x="1325" y="1807" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1298" y="1848" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_269" bpmnElement="ScriptTask_1"> + <dc:Bounds x="1400" y="1785" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_EndEvent_219" bpmnElement="EndEvent_1"> + <dc:Bounds x="1553" y="1807" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1526" y="1848" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_269"> + <di:waypoint xsi:type="dc:Point" x="1361" y="1825" /> + <di:waypoint xsi:type="dc:Point" x="1400" y="1825" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1344" y="1825" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_269" targetElement="_BPMNShape_EndEvent_219"> + <di:waypoint xsi:type="dc:Point" x="1500" y="1825" /> + <di:waypoint xsi:type="dc:Point" x="1533" y="1825" /> + <di:waypoint xsi:type="dc:Point" x="1533" y="1825" /> + <di:waypoint xsi:type="dc:Point" x="1553" y="1825" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1503" y="1825" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_127"> + <di:waypoint xsi:type="dc:Point" x="547" y="938" /> + <di:waypoint xsi:type="dc:Point" x="699" y="938" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="578" y="923" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_337" bpmnElement="ScriptTask_2"> + <dc:Bounds x="1071" y="1431" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_337" targetElement="_BPMNShape_EndEvent_177"> + <di:waypoint xsi:type="dc:Point" x="1171" y="1470" /> + <di:waypoint xsi:type="dc:Point" x="1262" y="1470" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1172" y="1455" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_35" bpmnElement="IntermediateCatchEvent_3"> + <dc:Bounds x="67" y="1075" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="43" y="1111" width="85" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_IntermediateCatchEvent_36" bpmnElement="IntermediateCatchEvent_4"> + <dc:Bounds x="60" y="1454" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="43" y="1490" width="70" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="_BPMNShape_IntermediateThrowEvent_49" bpmnElement="IntermediateThrowEvent_2"> + <dc:Bounds x="699" y="920" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="687" y="961" width="59" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="SubProcess_0s6hpty_di" bpmnElement="SubProcess_0s6hpty" isExpanded="true"> + <dc:Bounds x="-266" y="1649" width="1482" height="1528" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_1vwgs6p_di" bpmnElement="ExclusiveGateway_1vwgs6p" isMarkerVisible="true"> + <dc:Bounds x="50" y="2971" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="38" y="3031" width="78" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_1bwmffk_di" bpmnElement="StartEvent_1bwmffk"> + <dc:Bounds x="-63" y="2979" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-69" y="3020" width="51" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_0ydrtdx_di" bpmnElement="ExclusiveGateway_0ydrtdx" isMarkerVisible="true"> + <dc:Bounds x="50" y="2888" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-15" y="2903" width="46" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_1kvn1pz_di" bpmnElement="ExclusiveGateway_1kvn1pz" isMarkerVisible="true"> + <dc:Bounds x="177" y="1821" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="110" y="1815" width="78" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0jw5tqa_di" bpmnElement="CallActivity_0jw5tqa"> + <dc:Bounds x="1023" y="2945" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_04xute7_di" bpmnElement="EndEvent_04xute7"> + <dc:Bounds x="1160" y="2967" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1133" y="3008" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0yk02h3_di" bpmnElement="ScriptTask_0yk02h3"> + <dc:Bounds x="891" y="2945" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0zpbskl_di" bpmnElement="SequenceFlow_0zpbskl"> + <di:waypoint xsi:type="dc:Point" x="75" y="2971" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2938" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="81" y="2958" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0dhf2js_di" bpmnElement="SequenceFlow_0dhf2js"> + <di:waypoint xsi:type="dc:Point" x="100" y="2996" /> + <di:waypoint xsi:type="dc:Point" x="734" y="2996" /> + <di:waypoint xsi:type="dc:Point" x="734" y="2938" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="140" y="3001" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1sx5llu_di" bpmnElement="SequenceFlow_1sx5llu"> + <di:waypoint xsi:type="dc:Point" x="100" y="2913" /> + <di:waypoint xsi:type="dc:Point" x="405" y="2913" /> + <di:waypoint xsi:type="dc:Point" x="405" y="2913" /> + <di:waypoint xsi:type="dc:Point" x="709" y="2913" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="419" y="2917" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_02o4yqx_di" bpmnElement="SequenceFlow_02o4yqx"> + <di:waypoint xsi:type="dc:Point" x="75" y="2888" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2866" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="86" y="2871" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_19mxskt_di" bpmnElement="SequenceFlow_19mxskt"> + <di:waypoint xsi:type="dc:Point" x="202" y="1821" /> + <di:waypoint xsi:type="dc:Point" x="202" y="1725" /> + <di:waypoint xsi:type="dc:Point" x="681" y="1725" /> + <di:waypoint xsi:type="dc:Point" x="681" y="1941" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="392" y="1704" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_11b4gmn_di" bpmnElement="setPONR_ScriptTask"> + <dc:Bounds x="204" y="1432" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_12ilko1_di" bpmnElement="SequenceFlow_12ilko1"> + <di:waypoint xsi:type="dc:Point" x="96" y="1472" /> + <di:waypoint xsi:type="dc:Point" x="204" y="1472" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="105" y="1447" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0afe2pg_di" bpmnElement="SequenceFlow_0afe2pg"> + <di:waypoint xsi:type="dc:Point" x="304" y="1472" /> + <di:waypoint xsi:type="dc:Point" x="447" y="1472" /> + <di:waypoint xsi:type="dc:Point" x="490" y="1472" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="331" y="1457" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0oh7wzu_di" bpmnElement="DoRollbackService_CallActivity"> + <dc:Bounds x="976" y="1926" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="InclusiveGateway_0foywso_di" bpmnElement="InclusiveGateway_0foywso"> + <dc:Bounds x="709" y="2888" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="689" y="2943" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1f1hd3l_di" bpmnElement="SequenceFlow_1f1hd3l"> + <di:waypoint xsi:type="dc:Point" x="1026" y="2006" /> + <di:waypoint xsi:type="dc:Point" x="1026" y="2103" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="996" y="2055" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0jg47xm_di" bpmnElement="SequenceFlow_0jg47xm"> + <di:waypoint xsi:type="dc:Point" x="759" y="2913" /> + <di:waypoint xsi:type="dc:Point" x="941" y="2913" /> + <di:waypoint xsi:type="dc:Point" x="941" y="2945" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="805" y="2898" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0807ukc_di" bpmnElement="SequenceFlow_0807ukc"> + <di:waypoint xsi:type="dc:Point" x="991" y="2985" /> + <di:waypoint xsi:type="dc:Point" x="1023" y="2985" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="962" y="2970" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_19yywk8_di" bpmnElement="SequenceFlow_19yywk8"> + <di:waypoint xsi:type="dc:Point" x="1123" y="2985" /> + <di:waypoint xsi:type="dc:Point" x="1160" y="2985" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1097" y="2970" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateThrowEvent_0prlju0_di" bpmnElement="IntermediateThrowEvent_0prlju0"> + <dc:Bounds x="1036" y="1075" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1009" y="1116" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_05indeh_di" bpmnElement="ExclusiveGateway_05indeh" isMarkerVisible="true"> + <dc:Bounds x="656" y="1941" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="718" y="1923" width="83" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0sezboq_di" bpmnElement="SequenceFlow_0sezboq"> + <di:waypoint xsi:type="dc:Point" x="681" y="1991" /> + <di:waypoint xsi:type="dc:Point" x="681" y="2128" /> + <di:waypoint xsi:type="dc:Point" x="1001" y="2128" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="689" y="2045" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_17doerz_di" bpmnElement="ScriptTask_17doerz"> + <dc:Bounds x="25" y="2786" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0zq7i3q_di" bpmnElement="SequenceFlow_0zq7i3q"> + <di:waypoint xsi:type="dc:Point" x="-27" y="2997" /> + <di:waypoint xsi:type="dc:Point" x="20" y="2997" /> + <di:waypoint xsi:type="dc:Point" x="20" y="2996" /> + <di:waypoint xsi:type="dc:Point" x="50" y="2996" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-56" y="2998" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="InclusiveGateway_0m9f5ka_di" bpmnElement="InclusiveGateway_0m9f5ka"> + <dc:Bounds x="1001" y="2103" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="981" y="2158" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0wyub4x_di" bpmnElement="ScriptTask_0wyub4x"> + <dc:Bounds x="684" y="2786" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1rabks0_di" bpmnElement="SequenceFlow_1rabks0"> + <di:waypoint xsi:type="dc:Point" x="734" y="2866" /> + <di:waypoint xsi:type="dc:Point" x="734" y="2888" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="704" y="2877" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0w2alah_di" bpmnElement="DecomposeService"> + <dc:Bounds x="447" y="1053" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0cdtchu_di" bpmnElement="ScriptTask_0cdtchu"> + <dc:Bounds x="256" y="1053" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1eu60rt_di" bpmnElement="SequenceFlow_1eu60rt"> + <di:waypoint xsi:type="dc:Point" x="103" y="1093" /> + <di:waypoint xsi:type="dc:Point" x="256" y="1093" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="135" y="1078" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_00h6hmd_di" bpmnElement="SequenceFlow_00h6hmd"> + <di:waypoint xsi:type="dc:Point" x="356" y="1093" /> + <di:waypoint xsi:type="dc:Point" x="447" y="1093" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="357" y="1078" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_06gq6em_di" bpmnElement="ExclusiveGateway_06gq6em" isMarkerVisible="true"> + <dc:Bounds x="50" y="2603" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-37" y="2618" width="80" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_1bpuf2p_di" bpmnElement="CallActivity_1bpuf2p"> + <dc:Bounds x="152" y="2518" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="InclusiveGateway_131ozdf_di" bpmnElement="InclusiveGateway_131ozdf"> + <dc:Bounds x="50" y="2431" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="30" y="2486" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0orpdrl_di" bpmnElement="SequenceFlow_0orpdrl"> + <di:waypoint xsi:type="dc:Point" x="100" y="2628" /> + <di:waypoint xsi:type="dc:Point" x="202" y="2628" /> + <di:waypoint xsi:type="dc:Point" x="202" y="2598" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="141" y="2613" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1t3cnnx_di" bpmnElement="SequenceFlow_1t3cnnx"> + <di:waypoint xsi:type="dc:Point" x="202" y="2518" /> + <di:waypoint xsi:type="dc:Point" x="202" y="2481" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="172" y="2500" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0ya1cr3_di" bpmnElement="SequenceFlow_0ya1cr3"> + <di:waypoint xsi:type="dc:Point" x="75" y="2603" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2542" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2542" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2481" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="88" y="2508" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_14tl857_di" bpmnElement="ExclusiveGateway_14tl857" isMarkerVisible="true"> + <dc:Bounds x="50" y="2282" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-24" y="2297" width="57" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="InclusiveGateway_142br6v_di" bpmnElement="InclusiveGateway_142br6v"> + <dc:Bounds x="50" y="2103" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="30" y="2158" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1kpdu1j_di" bpmnElement="SequenceFlow_1kpdu1j"> + <di:waypoint xsi:type="dc:Point" x="75" y="2282" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2153" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="83" y="2218" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_1mjdcct_di" bpmnElement="ExclusiveGateway_1mjdcct" isMarkerVisible="true"> + <dc:Bounds x="177" y="2431" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="2393" width="46" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1sim44y_di" bpmnElement="SequenceFlow_1sim44y"> + <di:waypoint xsi:type="dc:Point" x="177" y="2456" /> + <di:waypoint xsi:type="dc:Point" x="100" y="2456" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="107" y="2431" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0dr2fem_di" bpmnElement="SequenceFlow_0dr2fem"> + <di:waypoint xsi:type="dc:Point" x="226" y="2457" /> + <di:waypoint xsi:type="dc:Point" x="734" y="2457" /> + <di:waypoint xsi:type="dc:Point" x="734" y="2695" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="316" y="2436" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_05dg1m1_di" bpmnElement="ExclusiveGateway_05dg1m1" isMarkerVisible="true"> + <dc:Bounds x="177" y="2103" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="179" y="2064" width="46" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1quvahv_di" bpmnElement="SequenceFlow_1quvahv"> + <di:waypoint xsi:type="dc:Point" x="177" y="2128" /> + <di:waypoint xsi:type="dc:Point" x="100" y="2128" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="129" y="2103" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1mbymcu_di" bpmnElement="SequenceFlow_1mbymcu"> + <di:waypoint xsi:type="dc:Point" x="227" y="2128" /> + <di:waypoint xsi:type="dc:Point" x="1001" y="2128" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="290" y="2097" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_17g05fd_di" bpmnElement="SequenceFlow_17g05fd"> + <di:waypoint xsi:type="dc:Point" x="547" y="1093" /> + <di:waypoint xsi:type="dc:Point" x="638" y="1093" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="548" y="1078" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_0y7gtd9_di" bpmnElement="ExclusiveGateway_0y7gtd9" isMarkerVisible="true"> + <dc:Bounds x="50" y="2695" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-40" y="2708" width="74" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ftzjjm_di" bpmnElement="SequenceFlow_0ftzjjm"> + <di:waypoint xsi:type="dc:Point" x="75" y="2786" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2745" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="45" y="2766" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_12dakwh_di" bpmnElement="SequenceFlow_12dakwh"> + <di:waypoint xsi:type="dc:Point" x="75" y="2695" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2653" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="83" y="2666" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="InclusiveGateway_1xenadu_di" bpmnElement="InclusiveGateway_1xenadu"> + <dc:Bounds x="709" y="2695" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="689" y="2750" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1lv5ld6_di" bpmnElement="SequenceFlow_1lv5ld6"> + <di:waypoint xsi:type="dc:Point" x="1026" y="2153" /> + <di:waypoint xsi:type="dc:Point" x="1026" y="2720" /> + <di:waypoint xsi:type="dc:Point" x="759" y="2720" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="996" y="2437" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0dvsqpp_di" bpmnElement="SequenceFlow_0dvsqpp"> + <di:waypoint xsi:type="dc:Point" x="734" y="2745" /> + <di:waypoint xsi:type="dc:Point" x="734" y="2786" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="704" y="2766" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_09nn9a9_di" bpmnElement="SequenceFlow_09nn9a9"> + <di:waypoint xsi:type="dc:Point" x="100" y="2720" /> + <di:waypoint xsi:type="dc:Point" x="423" y="2720" /> + <di:waypoint xsi:type="dc:Point" x="423" y="2720" /> + <di:waypoint xsi:type="dc:Point" x="709" y="2720" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="144" y="2693" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_027lz43_di" bpmnElement="SequenceFlow_027lz43"> + <di:waypoint xsi:type="dc:Point" x="75" y="2431" /> + <di:waypoint xsi:type="dc:Point" x="75" y="2332" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="45" y="2372" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0t3mtod_di" bpmnElement="SequenceFlow_0t3mtod"> + <di:waypoint xsi:type="dc:Point" x="75" y="2103" /> + <di:waypoint xsi:type="dc:Point" x="75" y="1846" /> + <di:waypoint xsi:type="dc:Point" x="177" y="1846" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="45" y="1965" width="90" height="0" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateCatchEvent_17pzn7m_di" bpmnElement="IntermediateCatchEvent_17pzn7m"> + <dc:Bounds x="83" y="1259" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="58" y="1295" width="78" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="IntermediateThrowEvent_0lt5ltv_di" bpmnElement="IntermediateThrowEvent_0lt5ltv"> + <dc:Bounds x="670" y="1259" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="645" y="1306" width="85" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_071yaf8_di" bpmnElement="CallActivity_071yaf8"> + <dc:Bounds x="321" y="1806" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1sl79hn_di" bpmnElement="SequenceFlow_1sl79hn"> + <di:waypoint xsi:type="dc:Point" x="227" y="1846" /> + <di:waypoint xsi:type="dc:Point" x="256" y="1846" /> + <di:waypoint xsi:type="dc:Point" x="256" y="1846" /> + <di:waypoint xsi:type="dc:Point" x="321" y="1846" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="271" y="1826" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_0y158bb_di" bpmnElement="ExclusiveGateway_0y158bb" isMarkerVisible="true"> + <dc:Bounds x="521" y="1821" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="523" y="1782" width="46" height="24" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ne9n0g_di" bpmnElement="SequenceFlow_0ne9n0g"> + <di:waypoint xsi:type="dc:Point" x="421" y="1846" /> + <di:waypoint xsi:type="dc:Point" x="521" y="1846" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="426" y="1825" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1a7e8l1_di" bpmnElement="SequenceFlow_1a7e8l1"> + <di:waypoint xsi:type="dc:Point" x="706" y="1966" /> + <di:waypoint xsi:type="dc:Point" x="976" y="1966" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="832" y="1945" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_00by7l7_di" bpmnElement="SequenceFlow_00by7l7"> + <di:waypoint xsi:type="dc:Point" x="546" y="1871" /> + <di:waypoint xsi:type="dc:Point" x="546" y="2128" /> + <di:waypoint xsi:type="dc:Point" x="1001" y="2128" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="554" y="1994" width="15" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_17cz98f_di" bpmnElement="SequenceFlow_17cz98f"> + <di:waypoint xsi:type="dc:Point" x="559" y="1858" /> + <di:waypoint xsi:type="dc:Point" x="668" y="1954" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="615" y="1889" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1cl4iu4_di" bpmnElement="CallActivity_1cl4iu4"> + <dc:Bounds x="152" y="2193" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1mpsdaj_di" bpmnElement="SequenceFlow_1mpsdaj"> + <di:waypoint xsi:type="dc:Point" x="202" y="2193" /> + <di:waypoint xsi:type="dc:Point" x="202" y="2153" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="172" y="2167" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_007p8k3_di" bpmnElement="SequenceFlow_007p8k3"> + <di:waypoint xsi:type="dc:Point" x="100" y="2307" /> + <di:waypoint xsi:type="dc:Point" x="202" y="2307" /> + <di:waypoint xsi:type="dc:Point" x="202" y="2273" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="142" y="2286" width="19" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0lpv2da_di" bpmnElement="ScriptTask_0lpv2da"> + <dc:Bounds x="638" y="1053" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_11efpvh_di" bpmnElement="SequenceFlow_11efpvh"> + <di:waypoint xsi:type="dc:Point" x="738" y="1093" /> + <di:waypoint xsi:type="dc:Point" x="1036" y="1093" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="842" y="1072" width="90" height="12" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0gj4vud_di" bpmnElement="SequenceFlow_0gj4vud"> + <di:waypoint xsi:type="dc:Point" x="119" y="1277" /> + <di:waypoint xsi:type="dc:Point" x="345" y="1277" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="187" y="1257" width="90" height="10" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0clhseq_di" bpmnElement="SequenceFlow_0clhseq"> + <di:waypoint xsi:type="dc:Point" x="445" y="1277" /> + <di:waypoint xsi:type="dc:Point" x="670" y="1277" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="513" y="1257" width="90" height="10" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1totpg4_di" bpmnElement="Task_14l19kv"> + <dc:Bounds x="345" y="1237" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn2:definitions> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn index d817f5703b..0d48719c6b 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateVnfAndModules.bpmn @@ -40,7 +40,6 @@ doCreateVnfAndModules.preProcessRequest(execution)]]></bpmn:script> <camunda:in source="tenantId" target="tenantId" /> <camunda:in source="false" target="usePreload" /> <camunda:in source="aLaCarte" target="aLaCarte" /> - <camunda:in source="RegionOne_flavorList" target="RegionOne_flavorList" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1hf7k7q</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1ixcnb6</bpmn:outgoing> @@ -128,7 +127,6 @@ doCreateVnfAndModules.validateAddOnModule(execution)]]></bpmn:script> <camunda:in source="tenantId" target="tenantId" /> <camunda:in source="rollbackData" target="rollbackData" /> <camunda:in source="vnfResourceDecomposition" target="vnfResourceDecomposition" /> - <camunda:in source="RegionOne_flavorList" target="RegionOne_flavorList" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_19ohb1a</bpmn:incoming> <bpmn:outgoing>SequenceFlow_07u8e3l</bpmn:outgoing> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java index 314cc0b2de..f9962c2630 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java +++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java @@ -20,14 +20,8 @@ package org.onap.so; -import java.io.IOException; - -import javax.annotation.PreDestroy; - import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; -import org.onap.so.requestsdb.RequestsDBHelper; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; @@ -35,15 +29,11 @@ import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.Profile; -import ch.vorburger.mariadb4j.MariaDB4jService; - @SpringBootApplication @Profile("test") @EnableProcessApplication("MSO CommonBPMN Test Application") @ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { - @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class) }) public class TestApplication { public static void main(String... args) { SpringApplication.run(TestApplication.class, args); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java index b7f45c05b5..7bc48519b0 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java @@ -75,6 +75,7 @@ import org.springframework.web.util.UriUtils; */ @Component("SniroHoming") public class SniroHomingV2 { + private static final MsoLogger log = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SniroHomingV2.class); private JsonUtils jsonUtils = new JsonUtils(); @Autowired @@ -135,8 +136,11 @@ public class SniroHomingV2 { placementInfo.put("placementDemands", placementDemands); request.setPlacementInformation(placementInfo.toString()); + JSONObject licenseInfo = new JSONObject(); + JSONArray licenseDemands = buildLicenseDemands(serviceInstance); - request.setLicenseInformation(licenseDemands.toString()); + licenseInfo.put("licenseDemands", licenseDemands); + request.setLicenseInformation(licenseInfo.toString()); if(placementDemands.length() > 0 || licenseDemands.length() > 0){ client.postDemands(request); @@ -240,8 +244,8 @@ public class SniroHomingV2 { ModelInfoServiceInstance modelInfo = serviceInstance.getModelInfoServiceInstance(); if(isNotBlank(modelInfo.getModelInvariantUuid()) && isNotBlank(modelInfo.getModelUuid())){ info.put("serviceInstanceId", serviceInstance.getServiceInstanceId()); - if(modelInfo.getServiceType() != null){ //temp solution - info.put("serviceName", serviceInstance.getModelInfoServiceInstance().getServiceType()); + if(modelInfo.getServiceType() != null && modelInfo.getServiceType().length() > 0){ //temp solution + info.put("serviceName", modelInfo.getServiceType()); } info.put("modelInfo", buildModelInfo(serviceInstance.getModelInfoServiceInstance())); }else{ diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java index 79613047e5..887c51e179 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java @@ -24,6 +24,7 @@ import org.camunda.bpm.engine.delegate.BpmnError; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup; @@ -40,6 +41,7 @@ import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; import org.onap.so.client.exception.BBObjectNotFoundException; import org.onap.so.client.exception.ExceptionBuilder; +import org.onap.so.client.orchestration.AAIConfigurationResources; import org.onap.so.client.orchestration.AAINetworkResources; import org.onap.so.client.orchestration.AAIServiceInstanceResources; import org.onap.so.client.orchestration.AAIVfModuleResources; @@ -74,6 +76,8 @@ public class AAICreateTasks { private AAINetworkResources aaiNetworkResources; @Autowired private AAIVpnBindingResources aaiVpnBindingResources; + @Autowired + private AAIConfigurationResources aaiConfigurationResources; public void createServiceInstance(BuildingBlockExecution execution) { try { @@ -162,7 +166,7 @@ public class AAICreateTasks { try { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); - execution.setVariable("callHoming", vnf.isCallHoming()); + execution.setVariable("callHoming", Boolean.TRUE.equals(vnf.isCallHoming())); aaiVnfResources.createVnfandConnectServiceInstance(vnf, serviceInstance); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); @@ -376,4 +380,13 @@ public class AAICreateTasks { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + + public void createConfiguration(BuildingBlockExecution execution){ + try{ + Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID, execution.getLookupMap().get(ResourceKey.CONFIGURATION_ID)); + aaiConfigurationResources.createConfiguration(configuration); + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java index cb265b6e41..a00806a19c 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java @@ -23,6 +23,7 @@ package org.onap.so.bpmn.infrastructure.aai.tasks; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; @@ -31,6 +32,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; import org.onap.so.client.exception.ExceptionBuilder; +import org.onap.so.client.orchestration.AAIConfigurationResources; import org.onap.so.client.orchestration.AAINetworkResources; import org.onap.so.client.orchestration.AAIServiceInstanceResources; import org.onap.so.client.orchestration.AAIVfModuleResources; @@ -56,6 +58,8 @@ public class AAIDeleteTasks { private AAINetworkResources aaiNetworkResources; @Autowired private AAIVolumeGroupResources aaiVolumeGroupResources; + @Autowired + private AAIConfigurationResources aaiConfigurationResources; public void deleteVfModule(BuildingBlockExecution execution) throws Exception { GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); @@ -133,4 +137,12 @@ public class AAIDeleteTasks { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + public void deleteConfiguration(BuildingBlockExecution execution) { + try { + Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID, execution.getLookupMap().get(ResourceKey.CONFIGURATION_ID)); + aaiConfigurationResources.deleteConfiguration(configuration); + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java index beffa25249..0079b351f2 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java @@ -49,7 +49,6 @@ import org.springframework.stereotype.Component; public class AAIQueryTasks { private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAIQueryTasks.class); - private static final String NETWORK_RESULT_WRAPPER_KEY = "l3NetworkAAIResultWrapper"; private static final String ERROR_MSG = "No relationships were returned from AAIResultWrapper.getRelationships()"; @Autowired private ExtractPojosForBB extractPojosForBB; @@ -58,23 +57,6 @@ public class AAIQueryTasks { @Autowired private AAINetworkResources aaiNetworkResources; private static final ModelMapper modelMapper = new ModelMapper(); - - /** - * BPMN access method to query L3Network object in AAI by it's Id - * - * @param execution - * @throws Exception - */ - public void getNetworkWrapperById(BuildingBlockExecution execution) { - try { - L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, - execution.getLookupMap().get(ResourceKey.NETWORK_ID)); - AAIResultWrapper aaiResultWrapper = aaiNetworkResources.queryNetworkWrapperById(l3network); - execution.setVariable(NETWORK_RESULT_WRAPPER_KEY, aaiResultWrapper); - } catch (Exception ex) { - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); - } - } /** * BPMN access method to query data for VPN bindings from the AAI result wrapper. @@ -85,9 +67,9 @@ public class AAIQueryTasks { public void queryNetworkVpnBinding(BuildingBlockExecution execution) { try { - org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); - - AAIResultWrapper aaiResultWrapper = execution.getVariable(NETWORK_RESULT_WRAPPER_KEY); + L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, + execution.getLookupMap().get(ResourceKey.NETWORK_ID)); + AAIResultWrapper aaiResultWrapper = aaiNetworkResources.queryNetworkWrapperById(l3network); Optional<Relationships> networkRelationships = aaiResultWrapper.getRelationships(); if (!networkRelationships.isPresent()) { throw (new Exception(ERROR_MSG)); @@ -120,7 +102,9 @@ public class AAIQueryTasks { public void getNetworkVpnBinding(BuildingBlockExecution execution) { try { - AAIResultWrapper aaiResultWrapper = execution.getVariable(NETWORK_RESULT_WRAPPER_KEY); + L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, + execution.getLookupMap().get(ResourceKey.NETWORK_ID)); + AAIResultWrapper aaiResultWrapper = aaiNetworkResources.queryNetworkWrapperById(l3network); CreateNetworkRequest createNetworkRequest = execution.getVariable("createNetworkRequest"); Optional<Relationships> networkRelationships = aaiResultWrapper.getRelationships(); @@ -174,9 +158,9 @@ public class AAIQueryTasks { */ public void queryNetworkPolicy(BuildingBlockExecution execution) { try { - L3Network l3Network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, execution.getLookupMap().get(ResourceKey.NETWORK_ID)); - - AAIResultWrapper aaiResultWrapper = execution.getVariable(NETWORK_RESULT_WRAPPER_KEY); + L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, + execution.getLookupMap().get(ResourceKey.NETWORK_ID)); + AAIResultWrapper aaiResultWrapper = aaiNetworkResources.queryNetworkWrapperById(l3network); Optional<Relationships> networkRelationships = aaiResultWrapper.getRelationships(); if (!networkRelationships.isPresent()) { throw (new Exception(ERROR_MSG)); @@ -187,7 +171,7 @@ public class AAIQueryTasks { for(AAIResourceUri netPolicyUri : netPoliciesUriList) { Optional<NetworkPolicy> oNetPolicy = aaiNetworkResources.getNetworkPolicy(netPolicyUri); if(oNetPolicy.isPresent()) { - l3Network.getNetworkPolicies().add(modelMapper.map(oNetPolicy.get(), org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy.class)); + l3network.getNetworkPolicies().add(modelMapper.map(oNetPolicy.get(), org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy.class)); } } } @@ -205,9 +189,9 @@ public class AAIQueryTasks { */ public void queryNetworkTableRef(BuildingBlockExecution execution) { try { - L3Network l3Network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, execution.getLookupMap().get(ResourceKey.NETWORK_ID)); - - AAIResultWrapper aaiResultWrapper = execution.getVariable(NETWORK_RESULT_WRAPPER_KEY); + L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID, + execution.getLookupMap().get(ResourceKey.NETWORK_ID)); + AAIResultWrapper aaiResultWrapper = aaiNetworkResources.queryNetworkWrapperById(l3network); Optional<Relationships> networkRelationships = aaiResultWrapper.getRelationships(); if (!networkRelationships.isPresent()) { throw (new Exception(ERROR_MSG)); @@ -219,7 +203,7 @@ public class AAIQueryTasks { Optional<RouteTableReference> oRouteTableReference = aaiNetworkResources.getRouteTable(routeTableUri); if(oRouteTableReference.isPresent()) { org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTableReference mappedRouteTableReference = modelMapper.map(oRouteTableReference.get(), org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTableReference.class); - l3Network.getContrailNetworkRouteTableReferences().add(mappedRouteTableReference); + l3network.getContrailNetworkRouteTableReferences().add(mappedRouteTableReference); } } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java index 9c1fba62e9..58c51f6223 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java @@ -24,6 +24,7 @@ import org.onap.so.adapters.nwrest.CreateNetworkResponse; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; @@ -35,6 +36,7 @@ import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; import org.onap.so.client.exception.BBObjectNotFoundException; import org.onap.so.client.exception.ExceptionBuilder; import org.onap.so.client.orchestration.AAICollectionResources; +import org.onap.so.client.orchestration.AAIConfigurationResources; import org.onap.so.client.orchestration.AAINetworkResources; import org.onap.so.client.orchestration.AAIServiceInstanceResources; import org.onap.so.client.orchestration.AAIVfModuleResources; @@ -64,6 +66,8 @@ public class AAIUpdateTasks { private AAINetworkResources aaiNetworkResources; @Autowired private AAICollectionResources aaiCollectionResources; + @Autowired + private AAIConfigurationResources aaiConfigurationResources; public void updateOrchestrationStatusAssignedService(BuildingBlockExecution execution) { try { @@ -144,9 +148,11 @@ public class AAIUpdateTasks { public void updateHeatStackIdVolumeGroup(BuildingBlockExecution execution) { try { GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); + String heatStackId = execution.getVariable("heatStackId"); VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID, execution.getLookupMap().get(ResourceKey.VOLUME_GROUP_ID)); CloudRegion cloudRegion = gBBInput.getCloudRegion(); + volumeGroup.setHeatStackId(heatStackId); aaiVolumeGroupResources.updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion); } catch (Exception ex) { @@ -296,8 +302,10 @@ public class AAIUpdateTasks { public void updateHeatStackIdVfModule(BuildingBlockExecution execution) { try { + String heatStackId = execution.getVariable("heatStackId"); VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID, execution.getLookupMap().get(ResourceKey.VF_MODULE_ID)); GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); + vfModule.setHeatStackId(heatStackId); aaiVfModuleResources.updateHeatStackIdVfModule(vfModule, vnf); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); @@ -390,4 +398,21 @@ public class AAIUpdateTasks { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } + public void updateOrchestrationStatusActivateFabricConfiguration(BuildingBlockExecution execution) { + try { + Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID, execution.getLookupMap().get(ResourceKey.CONFIGURATION_ID)); + aaiConfigurationResources.updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ACTIVE); + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } + + public void updateOrchestrationStatusDeactivateFabricConfiguration(BuildingBlockExecution execution) { + try { + Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID, execution.getLookupMap().get(ResourceKey.CONFIGURATION_ID)); + aaiConfigurationResources.updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ASSIGNED); + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } }
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java index 6ec9007cd0..48b4ebb982 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java @@ -21,6 +21,7 @@ package org.onap.so.bpmn.infrastructure.adapter.vnf.tasks; import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest; +import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; @@ -57,7 +58,9 @@ public class VnfAdapterDeleteTasks { ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID, execution.getLookupMap().get(ResourceKey.VOLUME_GROUP_ID)); - vnfAdapterVolumeGroupResources.deleteVolumeGroup(gBBInput.getRequestContext(), gBBInput.getCloudRegion(), serviceInstance, volumeGroup); + DeleteVolumeGroupRequest deleteVolumeGroupRequest = vnfAdapterVolumeGroupResources.deleteVolumeGroupRequest(gBBInput.getRequestContext(), gBBInput.getCloudRegion(), serviceInstance, volumeGroup); + execution.setVariable(VNFREST_REQUEST, deleteVolumeGroupRequest.toXmlString()); + execution.setVariable("deleteVolumeGroupRequest", "true"); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java index aa865f0340..db54b219a9 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java @@ -24,6 +24,7 @@ import org.apache.commons.lang3.StringUtils; import org.onap.so.adapters.vnfrest.CreateVfModuleResponse; import org.onap.so.adapters.vnfrest.CreateVolumeGroupResponse; import org.onap.so.adapters.vnfrest.DeleteVfModuleResponse; +import org.onap.so.adapters.vnfrest.DeleteVolumeGroupResponse; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; @@ -65,14 +66,15 @@ public class VnfAdapterImpl { execution.setVariable("isDebugLogEnabled", "true"); execution.setVariable("mso-request-id", gBBInput.getRequestContext().getMsoRequestId()); execution.setVariable("mso-service-instance-id", serviceInstance.getServiceInstanceId()); + execution.setVariable("heatStackId", null); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } } public void postProcessVnfAdapter(BuildingBlockExecution execution) { - try { - String vnfAdapterResponse = execution.getVariable("vnfAdapterRestV1Response"); + try { + String vnfAdapterResponse = execution.getVariable("vnfAdapterRestV1Response"); if (!StringUtils.isEmpty( vnfAdapterResponse)) { Object vnfRestResponse = unMarshal(vnfAdapterResponse); if(vnfRestResponse instanceof CreateVfModuleResponse) { @@ -80,21 +82,31 @@ public class VnfAdapterImpl { String heatStackId = ((CreateVfModuleResponse) vnfRestResponse).getVfModuleStackId(); if(!StringUtils.isEmpty(heatStackId)) { vfModule.setHeatStackId(heatStackId); + execution.setVariable("heatStackId", heatStackId); } } else if(vnfRestResponse instanceof DeleteVfModuleResponse) { VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID, execution.getLookupMap().get(ResourceKey.VF_MODULE_ID)); Boolean vfModuleDelete = ((DeleteVfModuleResponse) vnfRestResponse).getVfModuleDeleted(); if(null!= vfModuleDelete && vfModuleDelete) { vfModule.setHeatStackId(null); + execution.setVariable("heatStackId", null); } } else if(vnfRestResponse instanceof CreateVolumeGroupResponse) { VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID, execution.getLookupMap().get(ResourceKey.VOLUME_GROUP_ID)); String heatStackId = ((CreateVolumeGroupResponse) vnfRestResponse).getVolumeGroupStackId(); if(!StringUtils.isEmpty(heatStackId)) { volumeGroup.setHeatStackId(heatStackId); + execution.setVariable("heatStackId", heatStackId); }else{ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "HeatStackId is missing from create VolumeGroup Vnf Adapter response."); - } + } + } else if(vnfRestResponse instanceof DeleteVolumeGroupResponse) { + VolumeGroup volumeGroup = extractPojosForBB.extractByKey(execution, ResourceKey.VOLUME_GROUP_ID, execution.getLookupMap().get(ResourceKey.VOLUME_GROUP_ID)); + Boolean volumeGroupDelete = ((DeleteVolumeGroupResponse) vnfRestResponse).getVolumeGroupDeleted(); + if(null!= volumeGroupDelete && volumeGroupDelete) { + volumeGroup.setHeatStackId(null); + execution.setVariable("heatStackId", null); + } } } } catch (Exception ex) { @@ -112,7 +124,7 @@ public class VnfAdapterImpl { XMLReader xmlReader = spf.newSAXParser().getXMLReader(); JAXBContext jaxbContext = JAXBContext.newInstance(CreateVfModuleResponse.class, - CreateVolumeGroupResponse.class,DeleteVfModuleResponse.class); + CreateVolumeGroupResponse.class,DeleteVfModuleResponse.class,DeleteVolumeGroupResponse.class); Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); InputSource inputSource = new InputSource(new StringReader(input)); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java index 06c65020f5..7c9e000a44 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetwork.java @@ -21,10 +21,8 @@ package org.onap.so.bpmn.infrastructure.flowspecific.tasks; import org.onap.so.bpmn.common.BuildingBlockExecution; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; -import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; -import org.onap.so.client.exception.ExceptionBuilder; import org.onap.so.db.catalog.beans.OrchestrationStatus; import org.onap.so.logger.MsoLogger; import org.springframework.beans.factory.annotation.Autowired; @@ -35,30 +33,9 @@ public class AssignNetwork { private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AssignNetwork.class); - @Autowired - private ExceptionBuilder exceptionUtil; + @Autowired private ExtractPojosForBB extractPojosForBB; - - /** - * Check if there are collection(s) - * @param execution - * @return boolean - */ - public boolean hasCollection(BuildingBlockExecution execution) { - boolean hasCollection = false; - try { - ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, - execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); - if (serviceInstance.getCollection() != null){ - hasCollection = true; - msoLogger.debug("there are collections to create"); - } - } catch (Exception ex) { - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); - } - return hasCollection; - } /** * Check if network was found by name @@ -80,14 +57,4 @@ public class AssignNetwork { } return networkFound; } - - /** - * BPMN access method. Return flag if BPMN flow should skip AAI interaction - * @param execution - * @return TRUE if network collection was NOT present OR network WAS found by name - */ - public boolean skipNetworkCreationInAAI(BuildingBlockExecution execution) { - - return !hasCollection(execution) || networkFoundByName(execution); - } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java new file mode 100644 index 0000000000..d13c5db871 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java @@ -0,0 +1,144 @@ +/*- + * ============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.infrastructure.flowspecific.tasks; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +import org.onap.appc.client.lcm.model.Action; +import org.onap.so.bpmn.appc.payload.beans.ConfigScaleOutPayload; +import org.onap.so.bpmn.appc.payload.beans.RequestParametersConfigScaleOut; +import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; +import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock; +import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; +import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; +import org.onap.so.client.appc.ApplicationControllerAction; +import org.onap.so.client.exception.ExceptionBuilder; +import org.onap.so.db.catalog.beans.ControllerSelectionReference; +import org.onap.so.db.catalog.client.CatalogDbClient; +import org.onap.so.logger.MsoLogger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.jayway.jsonpath.JsonPath; + +@Component +public class ConfigurationScaleOut { + + private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ConfigurationScaleOut.class); + @Autowired + private ExceptionBuilder exceptionUtil; + @Autowired + private ExtractPojosForBB extractPojosForBB; + @Autowired + private CatalogDbClient catalogDbClient; + @Autowired + private ApplicationControllerAction appCClient; + private static final String ACTION = "action"; + private static final String MSO_REQUEST_ID = "msoRequestId"; + private static final String VNF_ID = "vnfId"; + private static final String VNF_NAME = "vnfName"; + private static final String VFMODULE_ID = "vfModuleId"; + private static final String CONTROLLER_TYPE = "controllerType"; + private static final String PAYLOAD = "payload"; + + public void setParamsForConfigurationScaleOut(BuildingBlockExecution execution) { + + GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); + + try { + List<Map<String, String>> jsonPathForCfgParams = gBBInput.getRequestContext().getConfigurationParameters(); + String key = null; + String paramValue = null; + ObjectMapper mapper = new ObjectMapper(); + String configScaleOutPayloadString = null; + ControllerSelectionReference controllerSelectionReference; + ConfigScaleOutPayload configPayload = new ConfigScaleOutPayload(); + GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); + String vnfId = vnf.getVnfId(); + String vnfName = vnf.getVnfName(); + String vnfType = vnf.getVnfType(); + String actionCategory = Action.ConfigScaleOut.toString(); + controllerSelectionReference = catalogDbClient.getControllerSelectionReferenceByVnfTypeAndActionCategory(vnfType, actionCategory); + String controllerName = controllerSelectionReference.getControllerName(); + + VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID, execution.getLookupMap().get(ResourceKey.VF_MODULE_ID)); + String sdncVfModuleQueryResponse = execution.getVariable("SDNCQueryResponse_" + vfModule.getVfModuleId()); + + Map<String, String> paramsMap = new HashMap<>(); + RequestParametersConfigScaleOut requestParameters = new RequestParametersConfigScaleOut(); + String configScaleOutParam = null; + if (jsonPathForCfgParams != null) { + for (Map<String, String> param : jsonPathForCfgParams) { + for (Map.Entry<String,String> entry : param.entrySet()) { + key = entry.getKey(); + paramValue = entry.getValue(); + configScaleOutParam = JsonPath.parse(sdncVfModuleQueryResponse).read(paramValue); + if(configScaleOutParam != null){ + paramsMap.put(key, configScaleOutParam); + } + } + } + } + requestParameters.setVfModuleId(vfModule.getVfModuleId()); + requestParameters.setVnfHostIpAddress(vnf.getIpv4OamAddress()); + configPayload.setConfigurationParameters(paramsMap); + configPayload.setRequestParameters(requestParameters); + configScaleOutPayloadString = mapper.writeValueAsString(configPayload); + configScaleOutPayloadString = configScaleOutPayloadString.replaceAll("\"", "\\\\\""); + + execution.setVariable(ACTION, actionCategory); + execution.setVariable(MSO_REQUEST_ID, gBBInput.getRequestContext().getMsoRequestId()); + execution.setVariable(VNF_ID, vnfId); + execution.setVariable(VNF_NAME, vnfName); + execution.setVariable(VFMODULE_ID, vfModule.getVfModuleId()); + execution.setVariable(CONTROLLER_TYPE, controllerName); + execution.setVariable(PAYLOAD, configScaleOutPayloadString); + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } + + public void callAppcClient(BuildingBlockExecution execution) { + try{ + Action commandAction = Action.valueOf(execution.getVariable(ACTION)); + String msoRequestId = execution.getVariable(MSO_REQUEST_ID); + String vnfId = execution.getVariable(VNF_ID); + Optional<String> payloadString = null; + if(execution.getVariable(PAYLOAD) != null){ + String pay = execution.getVariable(PAYLOAD); + payloadString = Optional.of(pay); + } + String controllerType = execution.getVariable(CONTROLLER_TYPE); + HashMap<String, String> payloadInfo = new HashMap<>(); + payloadInfo.put(VNF_NAME, execution.getVariable(VNF_NAME)); + payloadInfo.put(VFMODULE_ID,execution.getVariable(VFMODULE_ID)); + //PayloadInfo contains extra information that adds on to payload before making request to appc + appCClient.runAppCCommand(commandAction, msoRequestId, vnfId, payloadString, payloadInfo, controllerType); + }catch(Exception ex){ + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } +} diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java new file mode 100644 index 0000000000..61162f4d85 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java @@ -0,0 +1,105 @@ +/*- + * ============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.infrastructure.flowspecific.tasks; + +import java.util.HashMap; +import java.util.Optional; + +import org.onap.appc.client.lcm.model.Action; +import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; +import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock; +import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; +import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB; +import org.onap.so.client.appc.ApplicationControllerAction; +import org.onap.so.client.exception.ExceptionBuilder; +import org.onap.so.db.catalog.client.CatalogDbClient; +import org.onap.so.db.catalog.beans.ControllerSelectionReference; +import org.onap.so.logger.MsoLogger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class GenericVnfHealthCheck { + + private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, GenericVnfHealthCheck.class); + @Autowired + private ExceptionBuilder exceptionUtil; + @Autowired + private ExtractPojosForBB extractPojosForBB; + @Autowired + private CatalogDbClient catalogDbClient; + @Autowired + private ApplicationControllerAction appCClient; + + public void setParamsForGenericVnfHealthCheck(BuildingBlockExecution execution) { + + GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock(); + + try { + ControllerSelectionReference controllerSelectionReference; + GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); + String vnfId = vnf.getVnfId(); + String vnfName = vnf.getVnfName(); + String vnfType = vnf.getVnfType(); + String oamIpAddress = vnf.getIpv4OamAddress(); + String actionCategory = Action.HealthCheck.toString(); + controllerSelectionReference = catalogDbClient.getControllerSelectionReferenceByVnfTypeAndActionCategory(vnfType, actionCategory); + String controllerName = controllerSelectionReference.getControllerName(); + + execution.setVariable("vnfId", vnfId); + execution.setVariable("vnfName", vnfName); + execution.setVariable("oamIpAddress", oamIpAddress); + execution.setVariable("vnfHostIpAddress", oamIpAddress); + execution.setVariable("msoRequestId", gBBInput.getRequestContext().getMsoRequestId()); + execution.setVariable("action", actionCategory); + execution.setVariable("controllerType", controllerName); + + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } + + public void callAppcClient(BuildingBlockExecution execution) { + + try { + Action action = null; + action = Action.valueOf(execution.getVariable("action")); + String msoRequestId = execution.getVariable("msoRequestId"); + String vnfId = execution.getVariable("vnfId"); + Optional<String> payload = null; + if(execution.getVariable("payload") != null){ + String pay = execution.getVariable("payload"); + payload = Optional.of(pay); + } + String controllerType = execution.getVariable("controllerType"); + HashMap<String, String> payloadInfo = new HashMap<String, String>(); + payloadInfo.put("vnfName", execution.getVariable("vnfName")); + payloadInfo.put("vfModuleId",execution.getVariable("vfModuleId")); + payloadInfo.put("oamIpAddress",execution.getVariable("oamIpAddress")); + payloadInfo.put("vnfHostIpAddress",execution.getVariable("vnfHostIpAddress")); + //PayloadInfo contains extra information that adds on to payload before making request to appc + appCClient.runAppCCommand(action, msoRequestId, vnfId, payload, payloadInfo, controllerType); + + } catch (Exception ex) { + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); + } + } +} diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java index 95d52d6f2a..39f4c7822a 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java @@ -79,7 +79,7 @@ public class SDNCAssignTasks { GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID)); Customer customer = gBBInput.getCustomer(); CloudRegion cloudRegion = gBBInput.getCloudRegion(); - String response = sdncVnfResources.assignVnf(vnf, serviceInstance, customer, cloudRegion, requestContext, vnf.isCallHoming()); + String response = sdncVnfResources.assignVnf(vnf, serviceInstance, customer, cloudRegion, requestContext, Boolean.TRUE.equals(vnf.isCallHoming())); execution.setVariable("SDNCResponse", response); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java index 6fcad95144..03559afb33 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/Resource.java @@ -27,6 +27,9 @@ public class Resource { private boolean generated; private boolean baseVfModule; private String virtualLinkKey; + private String vnfCustomizationId; + private String vfModuleCustomizationId; + private String cvnfModuleCustomizationId; public Resource(WorkflowType resourceType, String resourceId, boolean generated){ this.resourceId = resourceId; @@ -64,4 +67,22 @@ public class Resource { public void setVirtualLinkKey(String virtualLinkKey) { this.virtualLinkKey = virtualLinkKey; } + public String getVnfCustomizationId() { + return vnfCustomizationId; + } + public void setVnfCustomizationId(String vnfCustomizationId) { + this.vnfCustomizationId = vnfCustomizationId; + } + public String getVfModuleCustomizationId() { + return vfModuleCustomizationId; + } + public void setVfModuleCustomizationId(String vfModuleCustomizationId) { + this.vfModuleCustomizationId = vfModuleCustomizationId; + } + public String getCvnfModuleCustomizationId() { + return cvnfModuleCustomizationId; + } + public void setCvnfModuleCustomizationId(String cvnfModuleCustomizationId) { + this.cvnfModuleCustomizationId = cvnfModuleCustomizationId; + } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java index c6a63e1431..a998f6934f 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java @@ -27,6 +27,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.Set; import java.util.UUID; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -36,21 +37,27 @@ import org.camunda.bpm.engine.delegate.DelegateExecution; import org.javatuples.Pair; import org.onap.aai.domain.yang.GenericVnf; import org.onap.aai.domain.yang.L3Network; +import org.onap.aai.domain.yang.Relationship; import org.onap.aai.domain.yang.ServiceInstance; import org.onap.aai.domain.yang.VolumeGroup; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock; +import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds; import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup; import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils; +import org.onap.so.bpmn.infrastructure.workflow.tasks.Resource; import org.onap.so.client.exception.ExceptionBuilder; +import org.onap.so.client.orchestration.AAIConfigurationResources; import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization; import org.onap.so.db.catalog.beans.CollectionResourceCustomization; import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; -import org.onap.so.db.catalog.beans.InstanceGroup; +import org.onap.so.db.catalog.beans.CvnfcCustomization; import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization; import org.onap.so.db.catalog.beans.VfModuleCustomization; +import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization; import org.onap.so.db.catalog.beans.macro.NorthBoundRequest; import org.onap.so.db.catalog.beans.macro.OrchestrationFlow; import org.onap.so.db.catalog.client.CatalogDbClient; @@ -88,6 +95,7 @@ public class WorkflowAction { private static final String VOLUMEGROUP = "VolumeGroup"; private static final String NETWORK = "Network"; private static final String NETWORKCOLLECTION = "NetworkCollection"; + private static final String CONFIGURATION = "Configuration"; private static final String ASSIGNINSTANCE = "assignInstance"; private static final String CREATEINSTANCE = "createInstance"; private static final String USERPARAMSERVICE = "service"; @@ -102,6 +110,8 @@ public class WorkflowAction { private ExceptionBuilder exceptionBuilder; @Autowired private CatalogDbClient catalogDbClient; + @Autowired + private AAIConfigurationResources aaiConfigurationResources; public void setBbInputSetupUtils(BBInputSetupUtils bbInputSetupUtils) { this.bbInputSetupUtils = bbInputSetupUtils; @@ -124,7 +134,6 @@ public class WorkflowAction { WorkflowResourceIds workflowResourceIds = populateResourceIdsFromApiHandler(execution); List<Pair<WorkflowType, String>> aaiResourceIds = new ArrayList<>(); List<Resource> resourceCounter = new ArrayList<>(); - execution.setVariable("sentSyncResponse", false); execution.setVariable("homing", false); execution.setVariable("calledHoming", false); @@ -136,6 +145,7 @@ public class WorkflowAction { RequestDetails requestDetails = sIRequest.getRequestDetails(); Resource resource = extractResourceIdAndTypeFromUri(uri); WorkflowType resourceType = resource.getResourceType(); + execution.setVariable("resourceName", resourceType.toString()); String resourceId = ""; if (resource.isGenerated()) { resourceId = validateResourceIdInAAI(resource.getResourceId(), resourceType, @@ -158,9 +168,10 @@ public class WorkflowAction { } else { key = modelInfo.getModelCustomizationId(); } + Resource resourceKey = new Resource(resourceType, key, aLaCarte); for (OrchestrationFlow orchFlow : orchFlows) { - ExecuteBuildingBlock ebb = buildExecuteBuildingBlock(orchFlow, requestId, key, apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null); + ExecuteBuildingBlock ebb = buildExecuteBuildingBlock(orchFlow, requestId, resourceKey, apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false); flowsToExecute.add(ebb); } } else { @@ -210,7 +221,8 @@ public class WorkflowAction { } else if (resourceType == WorkflowType.SERVICE && (requestAction.equalsIgnoreCase("activateInstance") || requestAction.equalsIgnoreCase("unassignInstance") - || requestAction.equalsIgnoreCase("deleteInstance"))) { + || requestAction.equalsIgnoreCase("deleteInstance") + || requestAction.equalsIgnoreCase("activateFabricConfiguration"))) { // SERVICE-MACRO-ACTIVATE, SERVICE-MACRO-UNASSIGN, and // SERVICE-MACRO-DELETE // Will never get user params with service, macro will have @@ -228,7 +240,7 @@ public class WorkflowAction { foundObjects = foundObjects + type + " - " + resourceCounter.stream().filter(x -> type.equals(x.getResourceType())).collect(Collectors.toList()).size() + " "; } msoLogger.info("Found " + foundObjects); - + if (orchFlows == null || orchFlows.isEmpty()) { orchFlows = queryNorthBoundRequestCatalogDb(execution, requestAction, resourceType, aLaCarte); } @@ -240,7 +252,7 @@ public class WorkflowAction { } if (resourceType == WorkflowType.SERVICE && (requestAction.equals(CREATEINSTANCE) || requestAction.equals(ASSIGNINSTANCE)) - && !resourceCounter.stream().filter(x -> VNF.equals(x.getResourceType())).collect(Collectors.toList()).isEmpty()) { + && !resourceCounter.stream().filter(x -> WorkflowType.VNF.equals(x.getResourceType())).collect(Collectors.toList()).isEmpty()) { execution.setVariable("homing", true); execution.setVariable("calledHoming", false); } @@ -265,7 +277,6 @@ public class WorkflowAction { execution.setVariable("flowsToExecute", flowsToExecute); } catch (Exception ex) { - msoLogger.error(ex); buildAndThrowException(execution, "Exception in create execution list " + ex.getMessage(), ex); } } @@ -276,7 +287,7 @@ public class WorkflowAction { if(resource.isBaseVfModule()){ Collections.swap(vfModuleResources, 0, count); break; - } + } count++; } return vfModuleResources; @@ -292,7 +303,7 @@ public class WorkflowAction { List<Resource> resources = resourceCounter.stream().filter(x -> type.equals(x.getResourceType())).collect(Collectors.toList()); for(int i = 0; i < resources.size(); i++){ updateWorkflowResourceIds(flowsToExecute, type, resources.get(i).getResourceId(), retrieveAAIResourceId(aaiResourceIds,type), null); - } + } }); } @@ -315,7 +326,7 @@ public class WorkflowAction { .collect(Collectors.toList()).get(i); updateWorkflowResourceIds(flowsToExecute, type, resource.getResourceId(), null, resource.getVirtualLinkKey()); } }); - } + } protected void updateWorkflowResourceIds(List<ExecuteBuildingBlock> flowsToExecute, WorkflowType resource, String key, String id, String virtualLinkKey){ String resourceId = id; @@ -335,6 +346,8 @@ public class WorkflowAction { workflowResourceIds.setNetworkId(resourceId); }else if(resource == WorkflowType.NETWORKCOLLECTION){ workflowResourceIds.setNetworkCollectionId(resourceId); + }else if(resource == WorkflowType.CONFIGURATION){ + workflowResourceIds.setConfigurationId(resourceId); } ebb.setWorkflowResourceIds(workflowResourceIds); } @@ -387,7 +400,7 @@ public class WorkflowAction { String toscaNodeType = collectionResourceCustomization.getCollectionResource().getInstanceGroup().getToscaNodeType(); if (toscaNodeType != null && toscaNodeType.contains("NetworkCollection")) { int minNetworks = 0; - InstanceGroup instanceGroup = collectionResourceCustomization.getCollectionResource().getInstanceGroup(); + org.onap.so.db.catalog.beans.InstanceGroup instanceGroup = collectionResourceCustomization.getCollectionResource().getInstanceGroup(); CollectionResourceInstanceGroupCustomization collectionInstCust = null; if(!instanceGroup.getCollectionInstanceGroupCustomizations().isEmpty()) { for(CollectionResourceInstanceGroupCustomization collectionInstanceGroupTemp : instanceGroup.getCollectionInstanceGroupCustomizations()) { @@ -416,14 +429,14 @@ public class WorkflowAction { } } } else { - msoLogger.debug("Instance Group tosca node type does not contain NetworkCollection: " + toscaNodeType); + msoLogger.debug("Instance Group tosca node type does not contain NetworkCollection: " + toscaNodeType); + } + }else{ + msoLogger.debug("No Instance Group found for network collection."); } }else{ - msoLogger.debug("No Instance Group found for network collection."); + msoLogger.debug("No Network Collection found. collectionResource is null"); } - }else{ - msoLogger.debug("No Network Collection found. collectionResource is null"); - } } else { msoLogger.debug("No Network Collection Customization found"); } @@ -482,6 +495,20 @@ public class WorkflowAction { aaiResourceIds.add(new Pair<WorkflowType, String>(WorkflowType.NETWORKCOLLECTION, serviceInstanceMSO.getCollection().getId())); resourceCounter.add(new Resource(WorkflowType.NETWORKCOLLECTION,serviceInstanceMSO.getCollection().getId(),false)); } + if (serviceInstanceMSO.getConfigurations() !=null) { + for(Configuration config : serviceInstanceMSO.getConfigurations()){ + Optional<org.onap.aai.domain.yang.Configuration> aaiConfig = aaiConfigurationResources.getConfiguration(config.getConfigurationId()); + if(aaiConfig.isPresent() && aaiConfig.get().getRelationshipList()!=null){ + for(Relationship relationship : aaiConfig.get().getRelationshipList().getRelationship()){ + if(relationship.getRelatedTo().contains("vnfc")){ + aaiResourceIds.add(new Pair<WorkflowType, String>(WorkflowType.CONFIGURATION, config.getConfigurationId())); + resourceCounter.add(new Resource(WorkflowType.CONFIGURATION,config.getConfigurationId(),false)); + break; + } + } + } + } + } } catch (Exception ex) { buildAndThrowException(execution, "Could not find existing Service Instance or related Instances to execute the request on."); @@ -493,6 +520,8 @@ public class WorkflowAction { throws IOException { boolean foundRelated = false; boolean foundVfModuleOrVG = false; + String vnfCustomizationUUID = ""; + String vfModuleCustomizationUUID = ""; if (sIRequest.getRequestDetails().getRequestParameters().getUserParams() != null) { List<Map<String, Object>> userParams = sIRequest.getRequestDetails().getRequestParameters().getUserParams(); for (Map<String, Object> params : userParams) { @@ -505,18 +534,23 @@ public class WorkflowAction { for (Vnfs vnf : validate.getResources().getVnfs()) { resourceCounter.add(new Resource(WorkflowType.VNF,vnf.getModelInfo().getModelCustomizationId(),false)); foundRelated = true; + if(vnf.getModelInfo()!=null && vnf.getModelInfo().getModelCustomizationUuid()!=null){ + vnfCustomizationUUID = vnf.getModelInfo().getModelCustomizationUuid(); + } if (vnf.getVfModules() != null) { for (VfModules vfModule : vnf.getVfModules()) { VfModuleCustomization vfModuleCustomization = catalogDbClient .getVfModuleCustomizationByModelCuztomizationUUID( vfModule.getModelInfo().getModelCustomizationUuid()); if (vfModuleCustomization != null) { - if(vfModuleCustomization.getVfModule()!=null && vfModuleCustomization.getVfModule().getVolumeHeatTemplate()!=null &&vfModuleCustomization.getVolumeHeatEnv() != null) { + + if(vfModuleCustomization.getVfModule() != null && vfModuleCustomization.getVfModule().getVolumeHeatTemplate() != null && vfModuleCustomization.getVolumeHeatEnv() != null) { resourceCounter.add(new Resource(WorkflowType.VOLUMEGROUP,vfModuleCustomization.getModelCustomizationUUID(),false)); foundRelated = true; foundVfModuleOrVG = true; } - if(vfModuleCustomization.getVfModule()!=null && vfModuleCustomization.getVfModule().getModuleHeatTemplate()!=null && vfModuleCustomization.getHeatEnvironment()!=null){ + + if(vfModuleCustomization.getVfModule() != null && vfModuleCustomization.getVfModule().getModuleHeatTemplate() != null && vfModuleCustomization.getHeatEnvironment() != null){ foundRelated = true; foundVfModuleOrVG = true; Resource resource = new Resource(WorkflowType.VFMODULE,vfModuleCustomization.getModelCustomizationUUID(),false); @@ -526,6 +560,18 @@ public class WorkflowAction { resource.setBaseVfModule(false); } resourceCounter.add(resource); + if(vfModule.getModelInfo()!=null && vfModule.getModelInfo().getModelCustomizationUuid()!=null){ + vfModuleCustomizationUUID = vfModule.getModelInfo().getModelCustomizationUuid(); + } + if(!vnfCustomizationUUID.equals("")&&!vfModuleCustomizationUUID.equals("")){ + List<String> configs = traverseCatalogDbForConfiguration(vnfCustomizationUUID,vfModuleCustomizationUUID); + for(String config : configs){ + Resource configResource = new Resource(WorkflowType.CONFIGURATION,config,false); + resource.setVnfCustomizationId(vnf.getModelInfo().getModelCustomizationId()); + resource.setVfModuleCustomizationId(vfModule.getModelInfo().getModelCustomizationId()); + resourceCounter.add(configResource); + } + } } if(!foundVfModuleOrVG){ buildAndThrowException(execution, "Could not determine if vfModule was a vfModule or volume group. Heat template and Heat env are null"); @@ -554,6 +600,25 @@ public class WorkflowAction { } return foundRelated; } + + + private List<String> traverseCatalogDbForConfiguration(String vnfCustomizationUUID, String vfModuleCustomizationUUID) { + List<String> configurations = new ArrayList<>(); + try{ + List<CvnfcCustomization> cvnfcCustomizations = catalogDbClient.getCvnfcCustomizationByVnfCustomizationUUIDAndVfModuleCustomizationUUID(vnfCustomizationUUID, vfModuleCustomizationUUID); + for(CvnfcCustomization cvnfc : cvnfcCustomizations){ + for(VnfVfmoduleCvnfcConfigurationCustomization customization : cvnfc.getVnfVfmoduleCvnfcConfigurationCustomization()){ + if(customization.getConfigurationResource().getToscaNodeType().contains("FabricConfiguration")){ + configurations.add(customization.getConfigurationResource().getModelUUID()); + } + } + } + msoLogger.debug("found " + configurations.size() + " configurations"); + return configurations; + } catch (Exception ex){ + return configurations; + } + } protected String queryCatalogDBforNetworkCollection(DelegateExecution execution, ServiceInstancesRequest sIRequest) { org.onap.so.db.catalog.beans.Service service = catalogDbClient @@ -687,7 +752,7 @@ public class WorkflowAction { for (ExecuteBuildingBlock ebb : orchFlows) { if (ebb.getBuildingBlock().getBpmnFlowName().equals("AssignNetworkBB")) { String key = ebb.getBuildingBlock().getKey(); - boolean isVirtualLink = ebb.getBuildingBlock().getIsVirtualLink(); + boolean isVirtualLink = Boolean.TRUE.equals(ebb.getBuildingBlock().getIsVirtualLink()); String virtualLinkKey = ebb.getBuildingBlock().getVirtualLinkKey(); sortedOrchFlows.add(ebb); for (ExecuteBuildingBlock ebb2 : orchFlows) { @@ -761,63 +826,73 @@ public class WorkflowAction { for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.SERVICE == x.getResourceType()).collect(Collectors.toList()).size(); i++) { workflowResourceIds.setServiceInstanceId(resourceId); flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.SERVICE == x.getResourceType()) - .collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); + .collect(Collectors.toList()).get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); } } else if (orchFlow.getFlowName().contains(VNF)) { for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.VNF == x.getResourceType()).collect(Collectors.toList()).size(); i++) { flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.VNF == x.getResourceType()) - .collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); + .collect(Collectors.toList()).get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); } } else if (orchFlow.getFlowName().contains(NETWORK) && !orchFlow.getFlowName().contains(NETWORKCOLLECTION)) { for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.NETWORK == x.getResourceType()).collect(Collectors.toList()).size(); i++) { flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.NETWORK == x.getResourceType()) - .collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); + .collect(Collectors.toList()).get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); } for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.VIRTUAL_LINK == x.getResourceType()).collect(Collectors.toList()).size(); i++) { Resource resource = resourceCounter.stream().filter(x -> WorkflowType.VIRTUAL_LINK == x.getResourceType()) .collect(Collectors.toList()).get(i); - flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resource.getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, true, resource.getVirtualLinkKey())); + flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resource, apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, true, resource.getVirtualLinkKey(), false)); } } else if (orchFlow.getFlowName().contains(VFMODULE)) { List<Resource> vfModuleResourcesSorted = sortVfModulesByBaseFirst(resourceCounter.stream().filter(x -> WorkflowType.VFMODULE == x.getResourceType()) .collect(Collectors.toList())); for (int i = 0; i < vfModuleResourcesSorted.size(); i++) { - flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, vfModuleResourcesSorted.get(i).getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); + flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, vfModuleResourcesSorted.get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); } } else if (orchFlow.getFlowName().contains(VOLUMEGROUP)) { for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.VOLUMEGROUP == x.getResourceType()).collect(Collectors.toList()).size(); i++) { flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.VOLUMEGROUP == x.getResourceType()) - .collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); + .collect(Collectors.toList()).get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); } } else if (orchFlow.getFlowName().contains(NETWORKCOLLECTION)) { for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.NETWORKCOLLECTION == x.getResourceType()).collect(Collectors.toList()).size(); i++) { flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.NETWORKCOLLECTION == x.getResourceType()) - .collect(Collectors.toList()).get(i).getResourceId(), apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); - } - } else { - flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, "", apiVersion, resourceId, - requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null)); + .collect(Collectors.toList()).get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); + } + } else if (orchFlow.getFlowName().contains(CONFIGURATION)) { + for (int i = 0; i < resourceCounter.stream().filter(x -> WorkflowType.CONFIGURATION == x.getResourceType()).collect(Collectors.toList()).size(); i++) { + flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, resourceCounter.stream().filter(x -> WorkflowType.CONFIGURATION == x.getResourceType()) + .collect(Collectors.toList()).get(i), apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, true)); + } + }else { + flowsToExecute.add(buildExecuteBuildingBlock(orchFlow, requestId, null, apiVersion, resourceId, + requestAction, aLaCarte, vnfType, workflowResourceIds, requestDetails, false, null, false)); } } return flowsToExecute; } - protected ExecuteBuildingBlock buildExecuteBuildingBlock(OrchestrationFlow orchFlow, String requestId, String key, + protected ExecuteBuildingBlock buildExecuteBuildingBlock(OrchestrationFlow orchFlow, String requestId, Resource resource, String apiVersion, String resourceId, String requestAction, boolean aLaCarte, String vnfType, - WorkflowResourceIds workflowResourceIds, RequestDetails requestDetails, boolean isVirtualLink, String virtualLinkKey) { + WorkflowResourceIds workflowResourceIds, RequestDetails requestDetails, boolean isVirtualLink, String virtualLinkKey, boolean isConfiguration) { ExecuteBuildingBlock executeBuildingBlock = new ExecuteBuildingBlock(); BuildingBlock buildingBlock = new BuildingBlock(); buildingBlock.setBpmnFlowName(orchFlow.getFlowName()); buildingBlock.setMsoId(UUID.randomUUID().toString()); - buildingBlock.setKey(key); + if(resource == null){ + buildingBlock.setKey(""); + }else{ + buildingBlock.setKey(resource.getResourceId()); + } buildingBlock.setIsVirtualLink(isVirtualLink); buildingBlock.setVirtualLinkKey(virtualLinkKey); executeBuildingBlock.setApiVersion(apiVersion); @@ -829,6 +904,13 @@ public class WorkflowAction { executeBuildingBlock.setRequestId(requestId); executeBuildingBlock.setBuildingBlock(buildingBlock); executeBuildingBlock.setRequestDetails(requestDetails); + if(isConfiguration){ + ConfigurationResourceKeys configurationResourceKeys = new ConfigurationResourceKeys(); + configurationResourceKeys.setCvnfcCustomizationUUID(resource.getCvnfModuleCustomizationId()); + configurationResourceKeys.setVfModuleCustomizationUUID(resource.getVfModuleCustomizationId()); + configurationResourceKeys.setVnfResourceCustomizationUUID(resource.getVnfCustomizationId()); + executeBuildingBlock.setConfigurationResourceKeys(configurationResourceKeys); + } return executeBuildingBlock; } @@ -844,24 +926,24 @@ public class WorkflowAction { buildAndThrowException(execution,"The request: Macro " + resourceName + " " + requestAction + " is not supported by GR_API."); } } else { - if(northBoundRequest.getIsToplevelflow()!=null){ - execution.setVariable(G_ISTOPLEVELFLOW, northBoundRequest.getIsToplevelflow()); - } - List<OrchestrationFlow> flows = northBoundRequest.getOrchestrationFlowList(); - if (flows == null) - flows = new ArrayList<>(); - for (OrchestrationFlow flow : flows) { - if (!flow.getFlowName().contains("BB")) { - List<OrchestrationFlow> macroQueryFlows = catalogDbClient - .getOrchestrationFlowByAction(flow.getFlowName()); - for (OrchestrationFlow macroFlow : macroQueryFlows) { - listToExecute.add(macroFlow); - } - } else { - listToExecute.add(flow); + if(northBoundRequest.getIsToplevelflow()!=null){ + execution.setVariable(G_ISTOPLEVELFLOW, northBoundRequest.getIsToplevelflow()); + } + List<OrchestrationFlow> flows = northBoundRequest.getOrchestrationFlowList(); + if (flows == null) + flows = new ArrayList<>(); + for (OrchestrationFlow flow : flows) { + if (!flow.getFlowName().contains("BB")) { + List<OrchestrationFlow> macroQueryFlows = catalogDbClient + .getOrchestrationFlowByAction(flow.getFlowName()); + for (OrchestrationFlow macroFlow : macroQueryFlows) { + listToExecute.add(macroFlow); } + } else { + listToExecute.add(flow); } } + } return listToExecute; } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java index ee6af61d0f..9e4b01eea5 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java @@ -30,12 +30,13 @@ import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder; import org.onap.so.bpmn.core.WorkflowException; import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; -import org.onap.so.client.db.request.RequestsDbClient; import org.onap.so.client.exception.ExceptionBuilder; import org.onap.so.db.request.beans.InfraActiveRequests; -import org.onap.so.logger.MsoLogger; +import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.serviceinstancebeans.RequestReferences; import org.onap.so.serviceinstancebeans.ServiceInstancesResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -49,7 +50,7 @@ public class WorkflowActionBBTasks { private static final String G_REQUEST_ID = "mso-request-id"; private static final String G_ALACARTE = "aLaCarte"; private static final String G_ACTION = "requestAction"; - private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, WorkflowActionBBTasks.class); + private static final Logger logger = LoggerFactory.getLogger(WorkflowActionBBTasks.class); @Autowired private RequestsDbClient requestDbclient; @@ -81,6 +82,49 @@ public class WorkflowActionBBTasks { execution.setVariable(G_CURRENT_SEQUENCE, currentSequence); } } + + public void updateFlowStatistics(DelegateExecution execution) { + try{ + int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE); + if(currentSequence > 1) { + InfraActiveRequests request = this.getUpdatedRequest(execution, currentSequence); + requestDbclient.updateInfraActiveRequests(request); + } + }catch (Exception ex){ + logger.warn("Bpmn Flow Statistics was unable to update Request Db with the new completion percentage. Competion percentage may be invalid."); + } + } + + protected InfraActiveRequests getUpdatedRequest(DelegateExecution execution, int currentSequence) { + List<ExecuteBuildingBlock> flowsToExecute = (List<ExecuteBuildingBlock>) execution + .getVariable("flowsToExecute"); + String requestId = (String) execution.getVariable(G_REQUEST_ID); + InfraActiveRequests request = requestDbclient.getInfraActiveRequestbyRequestId(requestId); + ExecuteBuildingBlock completedBB = flowsToExecute.get(currentSequence - 2); + ExecuteBuildingBlock nextBB = flowsToExecute.get(currentSequence - 1); + int completedBBs = currentSequence - 1; + int totalBBs = flowsToExecute.size(); + int remainingBBs = totalBBs - completedBBs; + String statusMessage = this.getStatusMessage(completedBB.getBuildingBlock().getBpmnFlowName(), + nextBB.getBuildingBlock().getBpmnFlowName(), completedBBs, remainingBBs); + Long percentProgress = this.getPercentProgress(completedBBs, totalBBs); + request.setStatusMessage(statusMessage); + request.setProgress(percentProgress); + request.setLastModifiedBy("CamundaBPMN"); + return request; + } + + protected Long getPercentProgress(int completedBBs, int totalBBs) { + double ratio = (completedBBs / (totalBBs * 1.0)); + int percentProgress = (int) (ratio * 95); + return new Long(percentProgress + 5); + } + + protected String getStatusMessage(String completedBB, String nextBB, int completedBBs, int remainingBBs) { + return "Execution of " + completedBB + " has completed successfully, next invoking " + nextBB + + " (Execution Path progress: BBs completed = " + completedBBs + "; BBs remaining = " + remainingBBs + + ")."; + } public void sendSyncAck(DelegateExecution execution) { final String requestId = (String) execution.getVariable(G_REQUEST_ID); @@ -106,7 +150,7 @@ public class WorkflowActionBBTasks { .getProcessDefinition(execution.getProcessDefinitionId()).getKey(); WorkflowContextHolder.getInstance().processCallback(processKey, execution.getProcessInstanceId(), requestId, callbackResponse); - msoLogger.info("Successfully sent sync ack."); + logger.info("Successfully sent sync ack."); } public void sendErrorSyncAck(DelegateExecution execution) { @@ -129,7 +173,7 @@ public class WorkflowActionBBTasks { callbackResponse); execution.setVariable("sentSyncResponse", true); } catch (Exception ex) { - msoLogger.debug(" Sending Sync Error Activity Failed. " + "\n" + ex.getMessage()); + logger.error(" Sending Sync Error Activity Failed. {}" , ex.getMessage(), ex); } } @@ -225,8 +269,7 @@ public class WorkflowActionBBTasks { public void abortCallErrorHandling(DelegateExecution execution) { String msg = "Flow has failed. Rainy day handler has decided to abort the process."; - Exception exception = new Exception(msg); - msoLogger.error(exception); + logger.error(msg); throw new BpmnError(msg); } @@ -240,14 +283,14 @@ public class WorkflowActionBBTasks { request.setStatusMessage(exception.getErrorMessage()); } catch (Exception ex) { //log error and attempt to extact WorkflowExceptionMessage - msoLogger.error(ex); + logger.error("Failed to extract workflow exception from execution.",ex); } if (errorMsg == null){ try { errorMsg = (String) execution.getVariable("WorkflowExceptionErrorMessage"); request.setStatusMessage(errorMsg); } catch (Exception ex) { - msoLogger.error(ex); + logger.error("Failed to extract workflow exception message from WorkflowException",ex); request.setStatusMessage("Unexpected Error in BPMN"); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java index 94dfdcc747..4a1c3f512c 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java @@ -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. @@ -96,6 +96,7 @@ public class AAIObjectMapper { map().setModelInvariantId(source.getModelInfoVfModule().getModelInvariantUUID()); map().setModelVersionId(source.getModelInfoVfModule().getModelUUID()); map().setPersonaModelVersion(source.getModelInfoVfModule().getModelInvariantUUID()); + map().setIsBaseVfModule(source.getModelInfoVfModule().getIsBaseBoolean()); } }); @@ -158,19 +159,19 @@ public class AAIObjectMapper { return modelMapper.map(customer, org.onap.aai.domain.yang.Customer.class); } - public Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets> convertSubnets = new Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets>() { + private Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets> convertSubnets = new Converter<List<Subnet>, org.onap.aai.domain.yang.Subnets>() { public org.onap.aai.domain.yang.Subnets convert(MappingContext<List<Subnet>, org.onap.aai.domain.yang.Subnets> context) { return mapToAAISubNets(context.getSource()); } }; - public Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments> convertCtagAssignments = new Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments>() { + private Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments> convertCtagAssignments = new Converter<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments>() { public org.onap.aai.domain.yang.CtagAssignments convert(MappingContext<List<CtagAssignment>, org.onap.aai.domain.yang.CtagAssignments> context) { return mapToAAICtagAssignmentList(context.getSource()); } }; - public Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments> convertSegmentationAssignments = new Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments>() { + private Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments> convertSegmentationAssignments = new Converter<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments>() { public org.onap.aai.domain.yang.SegmentationAssignments convert(MappingContext<List<SegmentationAssignment>, org.onap.aai.domain.yang.SegmentationAssignments> context) { return mapToAAISegmentationAssignmentList(context.getSource()); } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java index ee8f503e42..056ac3f6e5 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java @@ -24,6 +24,7 @@ import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.UUID; import org.modelmapper.ModelMapper; @@ -36,7 +37,13 @@ import org.onap.so.adapters.nwrest.ProviderVlanNetwork; import org.onap.so.adapters.nwrest.RollbackNetworkRequest; import org.onap.so.adapters.nwrest.UpdateNetworkRequest; import org.onap.so.bpmn.core.UrnPropertiesReader; -import org.onap.so.bpmn.servicedecomposition.bbobjects.*; +import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; +import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; +import org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy; +import org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTableReference; +import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding; import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext; import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoNetwork; @@ -273,8 +280,8 @@ public class NetworkAdapterObjectMapper { private ContrailNetwork buildContrailNetwork(L3Network l3Network, Customer customer){ ContrailNetwork contrailNetwork = new ContrailNetwork(); - contrailNetwork.setExternal(Boolean.toString(l3Network.isExternalNetwork())); - contrailNetwork.setShared(Boolean.toString(l3Network.isSharedNetwork())); + contrailNetwork.setExternal(Optional.ofNullable(l3Network.isIsExternalNetwork()).orElse(false).toString()); + contrailNetwork.setShared(Optional.ofNullable(l3Network.isIsSharedNetwork()).orElse(false).toString()); contrailNetwork.setPolicyFqdns(buildPolicyFqdns(l3Network.getNetworkPolicies())); contrailNetwork.setRouteTableFqdns(buildRouteTableFqdns(l3Network.getContrailNetworkRouteTableReferences())); if(customer!= null) @@ -335,7 +342,7 @@ public class NetworkAdapterObjectMapper { private void setFlowFlags(UpdateNetworkRequest updateNetworkRequest, OrchestrationContext orchestrationContext){ updateNetworkRequest.setSkipAAI(true); //revert suppressRollabck=TRUE into backout=FALSE and vice versa - updateNetworkRequest.setBackout(!Boolean.valueOf(orchestrationContext.getIsRollbackEnabled())); + updateNetworkRequest.setBackout(!Boolean.TRUE.equals(orchestrationContext.getIsRollbackEnabled())); //NetworkTechnology(NetworkTechnology.NEUTRON); NOOP - default } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java index 67e7afb599..ec202b8a3f 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java @@ -31,6 +31,7 @@ import javax.annotation.PostConstruct; import org.onap.sdnc.northbound.client.model.GenericResourceApiParam; import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam; +import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleTopology; import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduletopologyVfModuleTopology; import org.onap.so.adapters.vnfrest.CreateVolumeGroupRequest; import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest; @@ -108,8 +109,9 @@ public class VnfAdapterObjectMapper { final String USER_PARAM_NAME_KEY = "name"; final String USER_PARAM_VALUE_KEY = "value"; // sdncVfModuleQueryResponse will not be available in aLaCarte case - if (sdncVfModuleQueryResponse != null) { - GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfmoduletopologyVfModuleTopology.class); + if (sdncVfModuleQueryResponse != null) { + GenericResourceApiVfModuleTopology vfModuleTop = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfModuleTopology.class); + GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology = vfModuleTop.getVfModuleTopology(); buildParamsMapFromSdncParams(volumeGroupParams, vfModuleTopology.getVfModuleParameters()); } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java index 1d87b70754..2b58b7bdd7 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java @@ -31,11 +31,13 @@ import java.util.Map; import java.util.Optional; import javax.annotation.PostConstruct; +import javax.validation.Valid; import org.onap.sdnc.northbound.client.model.GenericResourceApiParam; import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam; import org.onap.sdnc.northbound.client.model.GenericResourceApiSubInterfaceNetworkData; import org.onap.sdnc.northbound.client.model.GenericResourceApiSubinterfacenetworkdataSubInterfaceNetworkData; +import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleTopology; import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduleassignmentsVfModuleAssignments; import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduleassignmentsVfmoduleassignmentsVms; import org.onap.sdnc.northbound.client.model.GenericResourceApiVfmoduletopologyVfModuleTopology; @@ -52,6 +54,7 @@ import org.onap.sdnc.northbound.client.model.GenericResourceApiVmtopologydataVmN import org.onap.sdnc.northbound.client.model.GenericResourceApiVmtopologydataVmNetworks; import org.onap.sdnc.northbound.client.model.GenericResourceApiVmtopologydataVmnamesVnfcNames; import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfNetworkData; +import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfTopology; import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfcNetworkData; import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfcnetworkdataVnfcNetworkData; import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcPorts; @@ -157,11 +160,14 @@ public class VnfAdapterVfModuleObjectMapper { private Map<String,String> buildVfModuleParamsMap(RequestContext requestContext, ServiceInstance serviceInstance, GenericVnf genericVnf, VfModule vfModule, String sdncVnfQueryResponse, String sdncVfModuleQueryResponse) throws JsonParseException, JsonMappingException, IOException { - GenericResourceApiVnftopologyVnfTopology vnfTopology = mapper.readValue(sdncVnfQueryResponse, GenericResourceApiVnftopologyVnfTopology.class); - GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfmoduletopologyVfModuleTopology.class); + + GenericResourceApiVnfTopology vnfTop= mapper.readValue(sdncVnfQueryResponse, GenericResourceApiVnfTopology.class); + GenericResourceApiVfModuleTopology vfModuleTop = mapper.readValue(sdncVfModuleQueryResponse, GenericResourceApiVfModuleTopology.class); + GenericResourceApiVnftopologyVnfTopology vnfTopology = vnfTop.getVnfTopology(); + GenericResourceApiVfmoduletopologyVfModuleTopology vfModuleTopology = vfModuleTop.getVfModuleTopology(); Map<String,String> paramsMap = new HashMap<>(); - if(vnfTopology.getSdncGeneratedCloudResources() && vfModuleTopology.getSdncGeneratedCloudResources()) { + if( vfModuleTopology.getSdncGeneratedCloudResources()) { buildParamsMapFromVfModuleSdncResponse(paramsMap, vfModuleTopology, true); buildParamsMapFromVnfSdncResponse(paramsMap, vnfTopology, null, true); } @@ -178,6 +184,9 @@ public class VnfAdapterVfModuleObjectMapper { if (requestContext.getUserParams() != null) { paramsMap.putAll(requestContext.getUserParams()); } + if (vfModule.getCloudParams() != null) { + paramsMap.putAll(vfModule.getCloudParams()); + } return paramsMap; } @@ -503,33 +512,35 @@ public class VnfAdapterVfModuleObjectMapper { String vmTypeKey = vnfcNetworkdata.getVnfcType(); GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcPorts vnfcPorts = vnfcNetworkdata.getVnfcPorts(); - List<GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort> vnfcPortList = vnfcPorts.getVnfcPort(); - if (vnfcPortList != null) { - for(int portIdx = 0; portIdx < vnfcPortList.size(); portIdx++){ - - GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort vnfcPort = vnfcPortList.get(portIdx); - GenericResourceApiSubInterfaceNetworkData vnicSubInterfaces = vnfcPort.getVnicSubInterfaces(); - - String vnicSubInterfacesString = convertToString(vnicSubInterfaces); - String networkRoleKey = vnfcPort.getCommonSubInterfaceRole(); - String subInterfaceKey = createVnfcSubInterfaceKey(vmTypeKey, networkDataIdx, networkRoleKey, portIdx); - String globalSubInterfaceKey = createGlobalVnfcSubInterfaceKey(vmTypeKey, networkRoleKey, portIdx); + if (vnfcPorts != null) { + List<GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort> vnfcPortList = vnfcPorts.getVnfcPort(); + if (vnfcPortList != null) { + for(int portIdx = 0; portIdx < vnfcPortList.size(); portIdx++){ - buildVfModuleSubInterfacesCount(paramsMap, globalSubInterfaceKey, vnicSubInterfaces); - - buildVfModuleVlanTag(paramsMap, subInterfaceKey, vnicSubInterfacesString); - - buildVfModuleNetworkName(paramsMap, subInterfaceKey, vnicSubInterfacesString); - - buildVfModuleNetworkId(paramsMap, subInterfaceKey, vnicSubInterfacesString); - - buildVfModuleIpV4AddressHeatTemplate(paramsMap, subInterfaceKey, vnicSubInterfacesString); - - buildVfModuleIpV6AddressHeatTemplate(paramsMap, subInterfaceKey, vnicSubInterfacesString); - - buildVfModuleFloatingIpV4HeatTemplate(paramsMap, globalSubInterfaceKey, vnicSubInterfacesString); - - buildVfModuleFloatingIpV6HeatTemplate(paramsMap, globalSubInterfaceKey, vnicSubInterfacesString); + GenericResourceApiVnfcnetworkdataVnfcnetworkdataVnfcportsVnfcPort vnfcPort = vnfcPortList.get(portIdx); + GenericResourceApiSubInterfaceNetworkData vnicSubInterfaces = vnfcPort.getVnicSubInterfaces(); + + String vnicSubInterfacesString = convertToString(vnicSubInterfaces); + String networkRoleKey = vnfcPort.getCommonSubInterfaceRole(); + String subInterfaceKey = createVnfcSubInterfaceKey(vmTypeKey, networkDataIdx, networkRoleKey, portIdx); + String globalSubInterfaceKey = createGlobalVnfcSubInterfaceKey(vmTypeKey, networkRoleKey, portIdx); + + buildVfModuleSubInterfacesCount(paramsMap, globalSubInterfaceKey, vnicSubInterfaces); + + buildVfModuleVlanTag(paramsMap, subInterfaceKey, vnicSubInterfacesString); + + buildVfModuleNetworkName(paramsMap, subInterfaceKey, vnicSubInterfacesString); + + buildVfModuleNetworkId(paramsMap, subInterfaceKey, vnicSubInterfacesString); + + buildVfModuleIpV4AddressHeatTemplate(paramsMap, subInterfaceKey, vnicSubInterfacesString); + + buildVfModuleIpV6AddressHeatTemplate(paramsMap, subInterfaceKey, vnicSubInterfacesString); + + buildVfModuleFloatingIpV4HeatTemplate(paramsMap, globalSubInterfaceKey, vnicSubInterfacesString); + + buildVfModuleFloatingIpV6HeatTemplate(paramsMap, globalSubInterfaceKey, vnicSubInterfacesString); + } } } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java index b84f8b6459..e13a765cf2 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java @@ -148,6 +148,18 @@ public class AAIConfigurationResources { AAIResourceUri vpnBindingURI = AAIUriFactory.createResourceUri(AAIObjectType.VPN_BINDING, vpnId); injectionHelper.getAaiClient().connect(configurationURI, vpnBindingURI); } + + public void connectConfigurationToVfModule(String configurationId, String vfModuleId, String vnfId){ + AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId); + AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId); + injectionHelper.getAaiClient().connect(configurationURI, vfModuleURI); + } + + public void connectConfigurationToVnfc(String configurationId, String vnfcName){ + AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId); + AAIResourceUri vnfcURI = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, vnfcName); + injectionHelper.getAaiClient().connect(configurationURI, vnfcURI); + } /** * method to delete Configuration details in A&AI * @@ -157,6 +169,15 @@ public class AAIConfigurationResources { AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId); injectionHelper.getAaiClient().delete(aaiResourceUri); } + /** + * method to delete Configuration details in A&AI + * + * @param configuration + */ + public void deleteConfiguration(Configuration configuration) { + AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configuration.getConfigurationId()); + injectionHelper.getAaiClient().delete(aaiResourceUri); + } /** * Get Configuration from AAI using related Link @@ -167,4 +188,11 @@ public class AAIConfigurationResources { return injectionHelper.getAaiClient() .get(org.onap.aai.domain.yang.Configuration.class, AAIUriFactory.createResourceFromExistingURI(AAIObjectType.CONFIGURATION, UriBuilder.fromPath(relatedLink).build())); } + + public void updateOrchestrationStatusConfiguration(Configuration configuration, OrchestrationStatus orchestrationStatus) { + AAIResourceUri aaiResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configuration.getConfigurationId()); + configuration.setOrchestrationStatus(orchestrationStatus); + org.onap.aai.domain.yang.Configuration aaiConfiguration = aaiObjectMapper.mapConfiguration(configuration); + injectionHelper.getAaiClient().update(aaiResourceUri, aaiConfiguration); + } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java index 8655104830..efbbeae737 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResources.java @@ -22,7 +22,6 @@ package org.onap.so.client.orchestration; import org.onap.so.adapters.vnfrest.CreateVolumeGroupRequest; import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest; -import org.onap.so.adapters.vnfrest.DeleteVolumeGroupResponse; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; @@ -49,9 +48,7 @@ public class VnfAdapterVolumeGroupResources { return vnfAdapterObjectMapper.createVolumeGroupRequestMapper(requestContext, cloudRegion, orchestrationContext, serviceInstance, genericVnf, volumeGroup, sdncVfModuleQueryResponse); } - public DeleteVolumeGroupResponse deleteVolumeGroup(RequestContext requestContext, CloudRegion cloudRegion, ServiceInstance serviceInstance, VolumeGroup volumeGroup) throws Exception { - DeleteVolumeGroupRequest deleteVolumeGroupRequest = vnfAdapterObjectMapper.deleteVolumeGroupRequestMapper(requestContext, cloudRegion, serviceInstance, volumeGroup); - msoLogger.debug(deleteVolumeGroupRequest.toString()); - return vnfVolumeAdapterClient.deleteVNFVolumes(volumeGroup.getVolumeGroupId(), deleteVolumeGroupRequest); + public DeleteVolumeGroupRequest deleteVolumeGroupRequest(RequestContext requestContext, CloudRegion cloudRegion, ServiceInstance serviceInstance, VolumeGroup volumeGroup) throws Exception { + return vnfAdapterObjectMapper.deleteVolumeGroupRequestMapper(requestContext, cloudRegion, serviceInstance, volumeGroup); } } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java index 9e60196426..a4b40393a3 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java @@ -21,9 +21,11 @@ package org.onap.so.client.sdnc; import java.util.LinkedHashMap; +import java.util.Optional; import javax.ws.rs.core.UriBuilder; +import org.onap.so.bpmn.common.baseclient.BaseClient; import org.onap.so.client.exception.BadResponseException; import org.onap.so.client.exception.MapperException; import org.onap.so.client.sdnc.beans.SDNCProperties; @@ -34,6 +36,9 @@ import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpHeaders; import org.springframework.stereotype.Component; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + @Component public class SDNCClient { @@ -61,10 +66,25 @@ public class SDNCClient { STOClient.setHttpHeader(httpHeader); msoLogger.info("Running SDNC CLIENT for TargetUrl: " + targetUrl); LinkedHashMap<?, ?> output = STOClient.post(jsonRequest, new ParameterizedTypeReference<LinkedHashMap<? ,?>>() {}); + Optional<String> sdncResponse = logSDNCResponse(output); + if(sdncResponse.isPresent()){ + msoLogger.info(sdncResponse.get()); + } msoLogger.info("Validating output..."); return sdnCommonTasks.validateSDNResponse(output); } + protected Optional<String> logSDNCResponse(LinkedHashMap<?, ?> output) { + ObjectMapper mapper = new ObjectMapper(); + String sdncOutput = ""; + try { + sdncOutput = mapper.writeValueAsString(output); + return Optional.of(sdncOutput); + } catch (JsonProcessingException e) { + msoLogger.debug("Failed to map response from sdnc to json string for logging purposes."); + } + return Optional.empty(); + } /** * diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java index d35296af9b..aefb84c606 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java @@ -20,7 +20,9 @@ package org.onap.so.client.sdnc; +import java.util.ArrayList; import java.util.LinkedHashMap; +import java.util.List; import org.apache.commons.lang.StringUtils; import org.apache.http.HttpStatus; @@ -29,10 +31,16 @@ import org.onap.so.client.exception.BadResponseException; import org.onap.so.client.exception.MapperException; import org.onap.so.logger.MessageEnum; import org.onap.so.logger.MsoLogger; +import org.onap.so.logging.jaxrs.filter.SpringClientFilter; +import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.http.client.BufferingClientHttpRequestFactory; +import org.springframework.http.client.SimpleClientHttpRequestFactory; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import org.springframework.web.client.RestTemplate; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; @@ -79,6 +87,9 @@ public class SdnCommonTasks { HttpHeaders httpHeader = new HttpHeaders(); httpHeader.set("Authorization", auth); httpHeader.setContentType(MediaType.APPLICATION_JSON); + List<MediaType> acceptMediaTypes = new ArrayList<MediaType>(); + acceptMediaTypes.add(MediaType.APPLICATION_JSON); + httpHeader.setAccept(acceptMediaTypes); return httpHeader; } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java index 53e7dc4536..432399b1b8 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/GeneralTopologyObjectMapper.java @@ -25,6 +25,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.*; import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; import org.onap.so.client.sdnc.beans.SDNCSvcAction; import org.springframework.stereotype.Component; +import org.onap.so.client.exception.MapperException; @Component public class GeneralTopologyObjectMapper { @@ -82,6 +83,8 @@ public class GeneralTopologyObjectMapper { onapModelInformation.setModelCustomizationUuid(network.getModelInfoNetwork().getModelCustomizationUUID()); networkInformation.setOnapModelInformation(onapModelInformation); } + + networkInformation.setFromPreload(null); networkInformation.setNetworkId(network.getNetworkId()); //TODO fix this after network type filed included in L3Network object type //networkInformation.setNetworkType(network.getNetwork); @@ -109,21 +112,27 @@ public class GeneralTopologyObjectMapper { /* * Build GenericResourceApiVfModuleinformationVfModuleInformation */ - public GenericResourceApiVfmoduleinformationVfModuleInformation buildVfModuleInformation(VfModule vfModule, GenericVnf vnf, ServiceInstance serviceInstance, boolean includeModelInformation){ + public GenericResourceApiVfmoduleinformationVfModuleInformation buildVfModuleInformation(VfModule vfModule, GenericVnf vnf, ServiceInstance serviceInstance, boolean includeModelInformation) throws MapperException { GenericResourceApiVfmoduleinformationVfModuleInformation vfModuleInformation = new GenericResourceApiVfmoduleinformationVfModuleInformation(); if (includeModelInformation) { - GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation = new GenericResourceApiOnapmodelinformationOnapModelInformation(); - onapModelInformation.setModelInvariantUuid(vfModule.getModelInfoVfModule().getModelInvariantUUID()); - onapModelInformation.setModelName(vfModule.getModelInfoVfModule().getModelName()); - onapModelInformation.setModelVersion(vfModule.getModelInfoVfModule().getModelVersion()); - onapModelInformation.setModelUuid(vfModule.getModelInfoVfModule().getModelUUID()); - onapModelInformation.setModelCustomizationUuid(vfModule.getModelInfoVfModule().getModelCustomizationUUID()); - vfModuleInformation.setOnapModelInformation(onapModelInformation); + if (vfModule.getModelInfoVfModule() == null) { + throw new MapperException("VF Module model info is null for " + vfModule.getVfModuleId()); + } + else { + GenericResourceApiOnapmodelinformationOnapModelInformation onapModelInformation = new GenericResourceApiOnapmodelinformationOnapModelInformation(); + onapModelInformation.setModelInvariantUuid(vfModule.getModelInfoVfModule().getModelInvariantUUID()); + onapModelInformation.setModelName(vfModule.getModelInfoVfModule().getModelName()); + onapModelInformation.setModelVersion(vfModule.getModelInfoVfModule().getModelVersion()); + onapModelInformation.setModelUuid(vfModule.getModelInfoVfModule().getModelUUID()); + onapModelInformation.setModelCustomizationUuid(vfModule.getModelInfoVfModule().getModelCustomizationUUID()); + vfModuleInformation.setOnapModelInformation(onapModelInformation); + } } if (vfModule.getModelInfoVfModule() != null) { vfModuleInformation.setVfModuleType(vfModule.getModelInfoVfModule().getModelName()); } vfModuleInformation.setVfModuleId(vfModule.getVfModuleId()); + vfModuleInformation.setFromPreload(null); return vfModuleInformation; } public GenericResourceApiSdncrequestheaderSdncRequestHeader buildSdncRequestHeader(SDNCSvcAction svcAction, String sdncReqId){ diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java index 99256fd507..7013a50dcf 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java @@ -30,6 +30,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; +import org.onap.so.client.exception.MapperException; import org.onap.so.client.sdnc.beans.SDNCSvcAction; import org.onap.so.client.sdnc.beans.SDNCSvcOperation; import org.onap.so.logger.MessageEnum; @@ -58,7 +59,7 @@ public class VfModuleTopologyOperationRequestMapper { public GenericResourceApiVfModuleOperationInformation reqMapper(SDNCSvcOperation svcOperation, SDNCSvcAction svcAction, VfModule vfModule, VolumeGroup volumeGroup, GenericVnf vnf, ServiceInstance serviceInstance, - Customer customer, CloudRegion cloudRegion, RequestContext requestContext, String sdncAssignResponse) { + Customer customer, CloudRegion cloudRegion, RequestContext requestContext, String sdncAssignResponse) throws MapperException { GenericResourceApiVfModuleOperationInformation req = new GenericResourceApiVfModuleOperationInformation(); boolean includeModelInformation = false; @@ -128,6 +129,15 @@ public class VfModuleTopologyOperationRequestMapper { } } + if (vfModule.getCloudParams() != null) { + for (Map.Entry<String, String> entry : vfModule.getCloudParams().entrySet()) { + GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam(); + paramItem.setName(entry.getKey()); + paramItem.setValue(entry.getValue()); + vfModuleInputParameters.addParamItem(paramItem); + } + } + if (volumeGroup != null) { GenericResourceApiParamParam paramItem = new GenericResourceApiParamParam(); paramItem.setName("volume-group-id"); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java index cee94e28bd..eb12278528 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java @@ -23,9 +23,9 @@ package org.onap.so.client.sniro; import java.util.LinkedHashMap; import org.camunda.bpm.engine.delegate.BpmnError; +import org.onap.so.bpmn.common.baseclient.BaseClient; import org.onap.so.bpmn.core.UrnPropertiesReader; import org.onap.so.client.exception.BadResponseException; -import org.onap.so.client.sdnc.BaseClient; import org.onap.so.client.sniro.beans.ManagerProperties; import org.onap.so.client.sniro.beans.SniroConductorRequest; import org.onap.so.client.sniro.beans.SniroManagerRequest; diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java index 6401d5516d..9244f7ee1f 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java @@ -21,14 +21,8 @@ package org.onap.so; -import java.io.IOException; - -import javax.annotation.PreDestroy; - import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator; -import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl; -import org.onap.so.requestsdb.RequestsDBHelper; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; @@ -40,9 +34,7 @@ import org.springframework.context.annotation.Profile; @Profile("test") @EnableProcessApplication("MSO CommonBPMN Test Application") @ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = { - @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class), - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) }) + @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)}) public class TestApplication { public static void main(String... args) { SpringApplication.run(TestApplication.class, args); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java index 501e64f4d4..2b25dfd9f1 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/BaseTaskTest.java @@ -27,7 +27,9 @@ import org.onap.so.bpmn.infrastructure.flowspecific.tasks.AssignNetworkBBUtils; import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup; import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils; import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper; +import org.onap.so.client.appc.ApplicationControllerAction; import org.onap.so.client.orchestration.AAICollectionResources; +import org.onap.so.client.orchestration.AAIConfigurationResources; import org.onap.so.client.orchestration.AAIInstanceGroupResources; import org.onap.so.client.orchestration.AAINetworkResources; import org.onap.so.client.orchestration.AAIServiceInstanceResources; @@ -44,6 +46,8 @@ import org.onap.so.client.orchestration.VnfAdapterVfModuleResources; import org.onap.so.client.orchestration.VnfAdapterVolumeGroupResources; import org.onap.so.client.sdnc.SDNCClient; import org.onap.so.db.catalog.client.CatalogDbClient; +import org.onap.so.db.request.client.RequestsDbClient; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.boot.test.mock.mockito.SpyBean; @@ -108,12 +112,22 @@ public abstract class BaseTaskTest extends TestDataSetup { @MockBean protected CatalogDbClient catalogDbClient; + @MockBean + @Qualifier("RequestsDbClient") + protected RequestsDbClient requestsDbClient; + @Mock protected BBInputSetupUtils bbSetupUtils; @Mock protected BBInputSetup bbInputSetup; - + @SpyBean protected SDNCClient SPY_sdncClient; + + @MockBean + protected ApplicationControllerAction appCClient; + + @MockBean + protected AAIConfigurationResources aaiConfigurationResources; } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java index a20b68b147..fb9533091b 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java @@ -459,6 +459,7 @@ public class TestDataSetup{ genericVnf.setVnfId("testVnfId" + genericVnfCounter); genericVnf.setVnfName("testVnfName" + genericVnfCounter); genericVnf.setVnfType("testVnfType" + genericVnfCounter); + genericVnf.setIpv4OamAddress("10.222.22.2"); Platform platform = new Platform(); platform.setPlatformName("testPlatformName"); @@ -662,4 +663,20 @@ public class TestDataSetup{ return ar; } + + public Configuration setConfiguration () { + Configuration config = new Configuration(); + config.setConfigurationId("testConfigurationId"); + List<Configuration> configurations = new ArrayList<>(); + configurations.add(config); + ServiceInstance serviceInstance = new ServiceInstance(); + try { + serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + } catch(BBObjectNotFoundException e) { + serviceInstance = setServiceInstance(); + } + lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "testConfigurationId"); + serviceInstance.setConfigurations(configurations); + return config; + } }
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java index 51a7f1ab04..0b802a3385 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasksTest.java @@ -26,6 +26,9 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; +import java.util.ArrayList; +import java.util.List; + import org.camunda.bpm.engine.delegate.BpmnError; import org.junit.Before; import org.junit.Rule; @@ -33,6 +36,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; @@ -54,6 +58,7 @@ public class AAICreateTasksTest extends BaseTaskTest{ private CloudRegion cloudRegion; private VfModule vfModule; private Customer customer; + private Configuration configuration; @Rule public final ExpectedException exception = ExpectedException.none(); @@ -67,6 +72,7 @@ public class AAICreateTasksTest extends BaseTaskTest{ volumeGroup = setVolumeGroup(); cloudRegion = setCloudRegion(); vfModule = setVfModule(); + configuration = setConfiguration(); } @@ -384,4 +390,12 @@ public class AAICreateTasksTest extends BaseTaskTest{ aaiCreateTasks.connectNetworkToTenant(execution); verify(aaiNetworkResources, times(1)).connectNetworkToTenant(network, gBBInput.getCloudRegion()); } + + @Test + public void createConfigurationTest() throws Exception { + gBBInput = execution.getGeneralBuildingBlock(); + doNothing().when(aaiConfigurationResources).createConfiguration(configuration); + aaiCreateTasks.createConfiguration(execution); + verify(aaiConfigurationResources, times(1)).createConfiguration(configuration); + } } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasksTest.java new file mode 100644 index 0000000000..efe5b5d971 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasksTest.java @@ -0,0 +1,162 @@ +/*- + * ============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.infrastructure.aai.tasks; + +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import java.util.ArrayList; +import java.util.List; + +import org.camunda.bpm.engine.delegate.BpmnError; +import org.junit.Before; +import org.junit.Test; +import org.onap.so.bpmn.BaseTaskTest; +import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; +import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; +import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; +import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup; +import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; +import org.springframework.beans.factory.annotation.Autowired; + +public class AAIDeleteTasksTest extends BaseTaskTest { + @Autowired + private AAIDeleteTasks aaiDeleteTasks; + + private L3Network network; + private ServiceInstance serviceInstance; + private GenericVnf genericVnf; + private VfModule vfModule; + private VolumeGroup volumeGroup; + private CloudRegion cloudRegion; + private Configuration configuration; + + @Before + public void before() { + serviceInstance = setServiceInstance(); + genericVnf = setGenericVnf(); + vfModule = setVfModule(); + network = setL3Network(); + volumeGroup = setVolumeGroup(); + cloudRegion = setCloudRegion(); + configuration = setConfiguration(); + } + + @Test + public void deleteVfModuleTest() throws Exception { + doNothing().when(aaiVfModuleResources).deleteVfModule(vfModule, genericVnf); + aaiDeleteTasks.deleteVfModule(execution); + verify(aaiVfModuleResources, times(1)).deleteVfModule(vfModule, genericVnf); + } + + @Test + public void deleteVfModuleExceptionTest() throws Exception { + expectedException.expect(BpmnError.class); + doThrow(Exception.class).when(aaiVfModuleResources).deleteVfModule(vfModule, genericVnf); + aaiDeleteTasks.deleteVfModule(execution); + } + + @Test + public void deleteServiceInstanceTest() throws Exception { + doNothing().when(aaiServiceInstanceResources).deleteServiceInstance(serviceInstance); + + aaiDeleteTasks.deleteServiceInstance(execution); + + verify(aaiServiceInstanceResources, times(1)).deleteServiceInstance(serviceInstance); + } + + @Test + public void deleteServiceInstanceExceptionTest() throws Exception { + expectedException.expect(BpmnError.class); + + doThrow(Exception.class).when(aaiServiceInstanceResources).deleteServiceInstance(serviceInstance); + + aaiDeleteTasks.deleteServiceInstance(execution); + } + + @Test + public void deleteVnfTest() throws Exception { + doNothing().when(aaiVnfResources).deleteVnf(genericVnf); + aaiDeleteTasks.deleteVnf(execution); + verify(aaiVnfResources, times(1)).deleteVnf(genericVnf); + } + + @Test + public void deleteVnfTestException() throws Exception { + expectedException.expect(BpmnError.class); + doThrow(Exception.class).when(aaiVnfResources).deleteVnf(genericVnf); + + aaiDeleteTasks.deleteVnf(execution); + verify(aaiVnfResources, times(1)).deleteVnf(genericVnf); + } + + @Test + public void deleteNetworkTest() throws Exception { + doNothing().when(aaiNetworkResources).deleteNetwork(network); + aaiDeleteTasks.deleteNetwork(execution); + verify(aaiNetworkResources, times(1)).deleteNetwork(network); + } + + @Test + public void deleteCollectionTest() throws Exception { + doNothing().when(aaiNetworkResources).deleteCollection(serviceInstance.getCollection()); + aaiDeleteTasks.deleteCollection(execution); + verify(aaiNetworkResources, times(1)).deleteCollection(serviceInstance.getCollection()); + } + + @Test + public void deleteInstanceGroupTest() throws Exception { + doNothing().when(aaiNetworkResources).deleteNetworkInstanceGroup(serviceInstance.getCollection().getInstanceGroup()); + aaiDeleteTasks.deleteInstanceGroup(execution); + verify(aaiNetworkResources, times(1)).deleteNetworkInstanceGroup(serviceInstance.getCollection().getInstanceGroup()); + } + + @Test + public void deleteVolumeGroupTest() { + doNothing().when(aaiVolumeGroupResources).deleteVolumeGroup(volumeGroup, cloudRegion); + + aaiDeleteTasks.deleteVolumeGroup(execution); + + verify(aaiVolumeGroupResources, times(1)).deleteVolumeGroup(volumeGroup, cloudRegion); + } + + @Test + public void deleteVolumeGroupExceptionTest() { + expectedException.expect(BpmnError.class); + + doThrow(Exception.class).when(aaiVolumeGroupResources).deleteVolumeGroup(volumeGroup, cloudRegion); + + aaiDeleteTasks.deleteVolumeGroup(execution); + } + + @Test + public void deleteConfigurationTest() throws Exception { + gBBInput = execution.getGeneralBuildingBlock(); + doNothing().when(aaiConfigurationResources).deleteConfiguration(configuration); + aaiDeleteTasks.deleteConfiguration(execution); + verify(aaiConfigurationResources, times(1)).deleteConfiguration(configuration); + } +} diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java index c9433a6212..d800ae9618 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java @@ -32,6 +32,7 @@ import org.junit.Test; import org.onap.so.adapters.nwrest.CreateNetworkResponse; import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; @@ -50,6 +51,7 @@ public class AAIUpdateTasksTest extends BaseTaskTest{ private GenericVnf genericVnf; private VolumeGroup volumeGroup; private CloudRegion cloudRegion; + private Configuration configuration; @Before public void before() { @@ -59,6 +61,7 @@ public class AAIUpdateTasksTest extends BaseTaskTest{ volumeGroup = setVolumeGroup(); cloudRegion = setCloudRegion(); network = setL3Network(); + configuration = setConfiguration(); } @Test @@ -204,11 +207,13 @@ public class AAIUpdateTasksTest extends BaseTaskTest{ @Test public void updateHeatStackIdVfModuleTest() throws Exception { + execution.setVariable("heatStackId", "newHeatStackId"); doNothing().when(aaiVfModuleResources).updateHeatStackIdVfModule(vfModule, genericVnf); aaiUpdateTasks.updateHeatStackIdVfModule(execution); verify(aaiVfModuleResources, times(1)).updateHeatStackIdVfModule(vfModule, genericVnf); + assertEquals("newHeatStackId", vfModule.getHeatStackId()); } @Test @@ -270,11 +275,13 @@ public class AAIUpdateTasksTest extends BaseTaskTest{ } @Test public void updateHeatStackIdVolumeGroupTest() throws Exception { + execution.setVariable("heatStackId", "newHeatStackId"); doNothing().when(aaiVolumeGroupResources).updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion); aaiUpdateTasks.updateHeatStackIdVolumeGroup(execution); verify(aaiVolumeGroupResources, times(1)).updateHeatStackIdVolumeGroup(volumeGroup, cloudRegion); + assertEquals("newHeatStackId", volumeGroup.getHeatStackId()); } @Test @@ -458,4 +465,23 @@ public class AAIUpdateTasksTest extends BaseTaskTest{ doThrow(Exception.class).when(aaiVfModuleResources).changeAssignVfModule(vfModule, genericVnf); aaiUpdateTasks.updateModelVfModule(execution); } + + @Test + public void updateOrchestrationStatusDeactivateFabricConfigurationTest() throws Exception { + gBBInput = execution.getGeneralBuildingBlock(); + doNothing().when(aaiConfigurationResources).updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ASSIGNED); + + aaiUpdateTasks.updateOrchestrationStatusDeactivateFabricConfiguration(execution); + + verify(aaiConfigurationResources, times(1)).updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ASSIGNED); + } + @Test + public void updateOrchestrationStatusActivateFabricConfigurationTest() throws Exception { + gBBInput = execution.getGeneralBuildingBlock(); + doNothing().when(aaiConfigurationResources).updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ACTIVE); + + aaiUpdateTasks.updateOrchestrationStatusActivateFabricConfiguration(execution); + + verify(aaiConfigurationResources, times(1)).updateOrchestrationStatusConfiguration(configuration, OrchestrationStatus.ACTIVE); + } } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasksTest.java index 4ea11c235b..3ff9ce605e 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasksTest.java @@ -30,7 +30,7 @@ import org.camunda.bpm.engine.delegate.BpmnError; import org.junit.Before; import org.junit.Test; import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest; -import org.onap.so.adapters.vnfrest.DeleteVolumeGroupResponse; +import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest; import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; @@ -95,20 +95,22 @@ public class VnfAdapterDeleteTasksTest extends BaseTaskTest{ @Test public void test_deleteVolumeGroup() throws Exception { - DeleteVolumeGroupResponse deleteVolumeGroupResponse = new DeleteVolumeGroupResponse(); + DeleteVolumeGroupRequest deleteVolumeGroupRequest = new DeleteVolumeGroupRequest(); + deleteVolumeGroupRequest.setVolumeGroupId("volumeGroupId"); - doReturn(deleteVolumeGroupResponse).when(vnfAdapterVolumeGroupResources).deleteVolumeGroup(requestContext, cloudRegion, serviceInstance, volumeGroup); + doReturn(deleteVolumeGroupRequest).when(vnfAdapterVolumeGroupResources).deleteVolumeGroupRequest(requestContext, cloudRegion, serviceInstance, volumeGroup); vnfAdapterDeleteTasks.deleteVolumeGroup(execution); - verify(vnfAdapterVolumeGroupResources, times(1)).deleteVolumeGroup(requestContext, cloudRegion, serviceInstance, volumeGroup); + verify(vnfAdapterVolumeGroupResources, times(1)).deleteVolumeGroupRequest(requestContext, cloudRegion, serviceInstance, volumeGroup); + assertEquals(execution.getVariable("VNFREST_Request"), deleteVolumeGroupRequest.toXmlString()); } @Test public void deleteVolumeGroupExceptionTest() throws Exception { expectedException.expect(BpmnError.class); - doThrow(Exception.class).when(vnfAdapterVolumeGroupResources).deleteVolumeGroup(requestContext, cloudRegion, serviceInstance, volumeGroup); + doThrow(Exception.class).when(vnfAdapterVolumeGroupResources).deleteVolumeGroupRequest(requestContext, cloudRegion, serviceInstance, volumeGroup); vnfAdapterDeleteTasks.deleteVolumeGroup(execution); } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImplTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImplTest.java index 24a99c97f4..2a8046b1be 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImplTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImplTest.java @@ -46,8 +46,9 @@ public class VnfAdapterImplTest extends BaseTaskTest { private static final String VNF_ADAPTER_REST_DELETE_RESPONSE = FileUtil.readResourceFile("__files/VfModularity/VNFAdapterRestDeleteResponse.xml"); private static final String VNF_ADAPTER_REST_CREATE_RESPONSE = FileUtil.readResourceFile("__files/VfModularity/VNFAdapterRestCreateCallback.xml"); private static final String VNF_ADAPTER_VOLUME_CREATE_RESPONSE = FileUtil.readResourceFile("__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml"); + private static final String VNF_ADAPTER_VOLUME_DELETE_RESPONSE = FileUtil.readResourceFile("__files/VfModularity/DeleteVfModuleVolumeCallbackResponse.xml"); private static final String TEST_VFMODULE_HEATSTACK_ID = "slowburn"; - private static final String TEST_VOLUME_HEATSTACK_ID = "testHeatStackId1"; + private static final String TEST_VOLUME_HEATSTACK_ID = "testHeatStackId1"; @Before public void before() { @@ -56,6 +57,7 @@ public class VnfAdapterImplTest extends BaseTaskTest { vfModule = setVfModule(); volumeGroup = setVolumeGroup(); vfModule.setHeatStackId(null); + volumeGroup.setHeatStackId(null); } @Test @@ -98,13 +100,14 @@ public class VnfAdapterImplTest extends BaseTaskTest { @Test public void postProcessVnfAdapter_DeleteResponseTest() { + vfModule.setHeatStackId(TEST_VFMODULE_HEATSTACK_ID); execution.setVariable("vnfAdapterRestV1Response", VNF_ADAPTER_REST_DELETE_RESPONSE); vnfAdapterImpl.postProcessVnfAdapter(execution); assertNull(vfModule.getHeatStackId()); } @Test - public void postProcessVnfAdapter_ResponseNullTest() { + public void postProcessVnfAdapter_ResponseNullTest() { execution.setVariable("vnfAdapterRestV1Response", null); vnfAdapterImpl.postProcessVnfAdapter(execution); assertNull(vfModule.getHeatStackId()); @@ -119,9 +122,10 @@ public class VnfAdapterImplTest extends BaseTaskTest { @Test public void postProcessVnfAdapter_DeleteResponseTest_VfModuleDeletedFalse() { + vfModule.setHeatStackId(TEST_VFMODULE_HEATSTACK_ID); execution.setVariable("vnfAdapterRestV1Response", "<deleteVfModuleResponse><vfModuleDeleted>false</vfModuleDeleted></deleteVfModuleResponse>"); vnfAdapterImpl.postProcessVnfAdapter(execution); - assertNull(vfModule.getHeatStackId()); + assertEquals(TEST_VFMODULE_HEATSTACK_ID, vfModule.getHeatStackId()); } @Test @@ -133,9 +137,10 @@ public class VnfAdapterImplTest extends BaseTaskTest { @Test public void postProcessVnfAdapter_DeleteResponseTest_EmptyVfModuleDeletedTag() { + vfModule.setHeatStackId(TEST_VFMODULE_HEATSTACK_ID); execution.setVariable("vnfAdapterRestV1Response", "<deleteVfModuleResponse></deleteVfModuleResponse>"); vnfAdapterImpl.postProcessVnfAdapter(execution); - assertNull(vfModule.getHeatStackId()); + assertEquals(TEST_VFMODULE_HEATSTACK_ID, vfModule.getHeatStackId()); } @Test @@ -157,10 +162,43 @@ public class VnfAdapterImplTest extends BaseTaskTest { expectedException.expect(BpmnError.class); execution.setVariable("vnfAdapterRestV1Response", "<createVolumeGroupResponse></createVolumeGroupResponse>"); vnfAdapterImpl.postProcessVnfAdapter(execution); + assertNull(volumeGroup.getHeatStackId()); } + + @Test + public void postProcessVnfAdapter_DeleteResponseTest_DeleteVolumeGroup() { + volumeGroup.setHeatStackId(TEST_VOLUME_HEATSTACK_ID); + execution.setVariable("vnfAdapterRestV1Response", VNF_ADAPTER_VOLUME_DELETE_RESPONSE); + vnfAdapterImpl.postProcessVnfAdapter(execution); + assertNull(volumeGroup.getHeatStackId()); + } + + + @Test + public void postProcessVnfAdapter_DeleteResponseTest_VolumeGroupDeletedFalse() { + volumeGroup.setHeatStackId(TEST_VOLUME_HEATSTACK_ID); + execution.setVariable("vnfAdapterRestV1Response", "<deleteVolumeGroupResponse><volumeGroupDeleted>false</volumeGroupDeleted></deleteVolumeGroupResponse>"); + vnfAdapterImpl.postProcessVnfAdapter(execution); + assertEquals(TEST_VOLUME_HEATSTACK_ID, volumeGroup.getHeatStackId()); + } + + @Test + public void postProcessVnfAdapter_DeleteResponseTest_EmptyDeleteVolumeGroupResponseTag() { + expectedException.expect(BpmnError.class); + execution.setVariable("vnfAdapterRestV1Response", "<volumeGroupDeleted></volumeGroupDeleted>"); + vnfAdapterImpl.postProcessVnfAdapter(execution); + } + + @Test + public void postProcessVnfAdapter_DeleteResponseTest_EmptyVolumeGroupDeletedTag() { + volumeGroup.setHeatStackId(TEST_VOLUME_HEATSTACK_ID); + execution.setVariable("vnfAdapterRestV1Response", "<deleteVolumeGroupResponse></deleteVolumeGroupResponse>"); + vnfAdapterImpl.postProcessVnfAdapter(execution); + assertEquals(TEST_VOLUME_HEATSTACK_ID, volumeGroup.getHeatStackId()); + } @Test - public void postProcessVnfAdapterExceptionTest() { + public void postProcessVnfAdapterExceptionTest() { execution.setVariable("vnfAdapterRestV1Response", VNF_ADAPTER_REST_CREATE_RESPONSE); expectedException.expect(BpmnError.class); lookupKeyMap.clear(); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java index a206140014..6e5bd314d8 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkTest.java @@ -25,7 +25,6 @@ import org.junit.Before; import org.junit.Test; import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; -import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey; import org.onap.so.client.exception.BBObjectNotFoundException; import org.onap.so.db.catalog.beans.OrchestrationStatus; @@ -36,80 +35,33 @@ public class AssignNetworkTest extends BaseTaskTest { @Autowired private AssignNetwork assignNetwork; - private ServiceInstance serviceInstance; private L3Network network; @Before public void before() { - serviceInstance = setServiceInstance(); network = setL3Network(); } @Test - public void hasCollectionTest() throws Exception { - setServiceInstance(); - //collection present by default base test setup - boolean hasCollection = assignNetwork.hasCollection(execution); - assertEquals(true, hasCollection); - - boolean skip = assignNetwork.skipNetworkCreationInAAI(execution); - assertEquals(false, skip); - } - - @Test - public void hasNoCollectionTest() throws Exception { - //clear collection + public void networkNotFoundTest() throws Exception { + //network status to PRECREATED - when it was NOT found by name try { - serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); - } catch(BBObjectNotFoundException e) { - serviceInstance = setServiceInstance(); - } - serviceInstance.setCollection(null); - boolean hasCollection = assignNetwork.hasCollection(execution); - assertEquals(false, hasCollection); - - boolean skip = assignNetwork.skipNetworkCreationInAAI(execution); - assertEquals(true, skip); - } - - @Test - public void hasNoCollectionNoNetworkTest() throws Exception { - //clear collection and updated network status to PRECREATED - when it was NOT found by name - try { - serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID,execution.getLookupMap().get(ResourceKey.NETWORK_ID)); } catch(BBObjectNotFoundException e) { - serviceInstance = setServiceInstance(); } - serviceInstance.setCollection(null); + network.setOrchestrationStatus(OrchestrationStatus.PRECREATED); - boolean hasCollection = assignNetwork.hasCollection(execution); boolean networkFound = assignNetwork.networkFoundByName(execution); - assertEquals(false, hasCollection); assertEquals(false, networkFound); - - boolean skip = assignNetwork.skipNetworkCreationInAAI(execution); - assertEquals(true, skip); } @Test - public void hasNetworkNoCollectionTest() throws Exception { - //clear collection and updated network status to INVENTORIED - when it was found by name + public void networkFoundTest() throws Exception { try { - serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID,execution.getLookupMap().get(ResourceKey.NETWORK_ID)); } catch(BBObjectNotFoundException e) { - serviceInstance = setServiceInstance(); } - serviceInstance.setCollection(null); - network.setOrchestrationStatus(OrchestrationStatus.INVENTORIED); - boolean hasCollection = assignNetwork.hasCollection(execution); boolean networkFound = assignNetwork.networkFoundByName(execution); - assertEquals(false, hasCollection); assertEquals(true, networkFound); - - boolean skip = assignNetwork.skipNetworkCreationInAAI(execution); - assertEquals(true, skip); } - } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOutTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOutTest.java new file mode 100644 index 0000000000..dabdc6811c --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOutTest.java @@ -0,0 +1,125 @@ +/*- + * ============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.infrastructure.flowspecific.tasks; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.UUID; + +import org.junit.Before; +import org.junit.Test; +import org.onap.appc.client.lcm.model.Action; +import org.onap.so.bpmn.BaseTaskTest; +import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; +import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; +import org.onap.so.db.catalog.beans.ControllerSelectionReference; +import org.springframework.beans.factory.annotation.Autowired; + +public class ConfigurationScaleOutTest extends BaseTaskTest { + + @Autowired + private ConfigurationScaleOut configurationScaleOut; + + private GenericVnf genericVnf; + private VfModule vfModule; + private RequestContext requestContext; + private String msoRequestId; + private List<Map<String, String>> configurationParameters = new ArrayList<>(); + private Map<String, String> configParamsMap = new HashMap<>(); + + + + @Before + public void before() { + genericVnf = setGenericVnf(); + vfModule = setVfModule(); + msoRequestId = UUID.randomUUID().toString(); + requestContext = setRequestContext(); + requestContext.setMsoRequestId(msoRequestId); + configParamsMap.put("availability-zone", "$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]"); + configParamsMap.put("vnf-id", "$.vnf-topology.vnf-topology-identifier-structure.vnf-id"); + configurationParameters.add(configParamsMap); + requestContext.setConfigurationParameters(configurationParameters); + gBBInput.setRequestContext(requestContext); + } + + @Test + public void setParamsForConfigurationScaleOutTest() throws Exception { + ControllerSelectionReference controllerSelectionReference = new ControllerSelectionReference(); + controllerSelectionReference.setControllerName("testName"); + controllerSelectionReference.setActionCategory("testAction"); + controllerSelectionReference.setVnfType("testVnfType"); + String sdncResponse = new String(Files.readAllBytes(Paths.get("src/test/resources/__files/SDNCClientGetResponse.json"))); + String expectedPayload = "{\\\"request-parameters\\\":{\\\"vnf-host-ip-address\\\":\\\"10.222.22.2\\\"," + + "\\\"vf-module-id\\\":\\\"testVfModuleId1\\\"},\\\"configuration-parameters\\\"" + + ":{\\\"vnf-id\\\":\\\"66dac89b-2a5b-4cb9-b22e-a7e4488fb3db\\\",\\\"availability-zone\\\":\\\"AZ-MN02\\\"}}"; + execution.setVariable("SDNCQueryResponse_" + vfModule.getVfModuleId(), sdncResponse); + + doReturn(controllerSelectionReference).when(catalogDbClient).getControllerSelectionReferenceByVnfTypeAndActionCategory(genericVnf.getVnfType(), Action.ConfigScaleOut.toString()); + + configurationScaleOut.setParamsForConfigurationScaleOut(execution); + + assertEquals(genericVnf.getVnfId(), execution.getVariable("vnfId")); + assertEquals(genericVnf.getVnfName(), execution.getVariable("vnfName")); + assertEquals("ConfigScaleOut", execution.getVariable("action")); + assertEquals(requestContext.getMsoRequestId(), execution.getVariable("msoRequestId")); + assertEquals(controllerSelectionReference.getControllerName(), execution.getVariable("controllerType")); + assertEquals(vfModule.getVfModuleId(), execution.getVariable("vfModuleId")); + assertEquals(expectedPayload, execution.getVariable("payload")); + } + @Test + public void callAppcClientTest() throws Exception { + Action action = Action.ConfigScaleOut; + String vnfId = genericVnf.getVnfId(); + String controllerType = "testType"; + String payload = "{\\\"request-parameters\\\":{\\\"vnf-host-ip-address\\\":\\\"10.222.22.2\\\"," + + "\\\"vf-module-id\\\":\\\"testVfModuleId1\\\"},\\\"configuration-parameters\\\"" + + ":{\\\"vnf-id\\\":\\\"66dac89b-2a5b-4cb9-b22e-a7e4488fb3db\\\",\\\"availability-zone\\\":\\\"AZ-MN02\\\"}}"; + HashMap<String, String> payloadInfo = new HashMap<String, String>(); + payloadInfo.put("vnfName", "testVnfName"); + payloadInfo.put("vfModuleId", "testVfModuleId"); + + execution.setVariable("action", Action.ConfigScaleOut.toString()); + execution.setVariable("msoRequestId", msoRequestId); + execution.setVariable("controllerType", controllerType); + execution.setVariable("vnfId", "testVnfId1"); + execution.setVariable("vnfName", "testVnfName"); + execution.setVariable("vfModuleId", "testVfModuleId"); + execution.setVariable("payload", payload); + + doNothing().when(appCClient).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType); + + configurationScaleOut.callAppcClient(execution); + verify(appCClient, times(1)).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType); + } + +} diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java new file mode 100644 index 0000000000..9f0bb910e6 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheckTest.java @@ -0,0 +1,103 @@ +/*- + * ============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.infrastructure.flowspecific.tasks; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import java.util.HashMap; +import java.util.Optional; +import java.util.UUID; + +import org.junit.Before; +import org.junit.Test; +import org.onap.appc.client.lcm.model.Action; +import org.onap.so.bpmn.BaseTaskTest; +import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; +import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; +import org.onap.so.db.catalog.beans.ControllerSelectionReference; +import org.springframework.beans.factory.annotation.Autowired; + +public class GenericVnfHealthCheckTest extends BaseTaskTest { + + @Autowired + private GenericVnfHealthCheck genericVnfHealthCheck; + + private GenericVnf genericVnf; + private RequestContext requestContext; + private String msoRequestId; + + @Before + public void before() { + genericVnf = setGenericVnf(); + msoRequestId = UUID.randomUUID().toString(); + requestContext = setRequestContext(); + requestContext.setMsoRequestId(msoRequestId); + gBBInput.setRequestContext(requestContext); + } + + @Test + public void setParamsForGenericVnfHealthCheckTest() throws Exception { + ControllerSelectionReference controllerSelectionReference = new ControllerSelectionReference(); + controllerSelectionReference.setControllerName("testName"); + controllerSelectionReference.setActionCategory("testAction"); + controllerSelectionReference.setVnfType("testVnfType"); + + doReturn(controllerSelectionReference).when(catalogDbClient).getControllerSelectionReferenceByVnfTypeAndActionCategory(genericVnf.getVnfType(), Action.HealthCheck.toString()); + + genericVnfHealthCheck.setParamsForGenericVnfHealthCheck(execution); + + assertEquals(genericVnf.getVnfId(), execution.getVariable("vnfId")); + assertEquals(genericVnf.getVnfName(), execution.getVariable("vnfName")); + assertEquals(genericVnf.getIpv4OamAddress(), execution.getVariable("oamIpAddress")); + assertEquals("HealthCheck", execution.getVariable("action")); + assertEquals(requestContext.getMsoRequestId(), execution.getVariable("msoRequestId")); + assertEquals(controllerSelectionReference.getControllerName(), execution.getVariable("controllerType")); + } + @Test + public void callAppcClientTest() throws Exception { + Action action = Action.HealthCheck; + String vnfId = genericVnf.getVnfId(); + String payload = "{\"testName\":\"testValue\",}"; + String controllerType = "testType"; + HashMap<String, String> payloadInfo = new HashMap<String, String>(); + payloadInfo.put("vnfName", "testVnfName"); + payloadInfo.put("vfModuleId", "testVfModuleId"); + payloadInfo.put("oamIpAddress", "testOamIpAddress"); + payloadInfo.put("vnfHostIpAddress", "testOamIpAddress"); + execution.setVariable("action", Action.HealthCheck.toString()); + execution.setVariable("msoRequestId", msoRequestId); + execution.setVariable("controllerType", controllerType); + execution.setVariable("vnfId", "testVnfId1"); + execution.setVariable("vnfName", "testVnfName"); + execution.setVariable("vfModuleId", "testVfModuleId"); + execution.setVariable("oamIpAddress", "testOamIpAddress"); + execution.setVariable("vnfHostIpAddress", "testOamIpAddress"); + execution.setVariable("payload", payload); + + doNothing().when(appCClient).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType); + + genericVnfHealthCheck.callAppcClient(execution); + verify(appCClient, times(1)).runAppCCommand(action, msoRequestId, vnfId, Optional.of(payload), payloadInfo, controllerType); + } +} diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java index d856b5e184..27173b7502 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java @@ -37,6 +37,7 @@ import org.junit.rules.ExpectedException; import org.onap.so.bpmn.BaseTaskTest; import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock; import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; +import org.onap.so.db.request.beans.InfraActiveRequests; import org.springframework.beans.factory.annotation.Autowired; public class WorkflowActionBBTasksTest extends BaseTaskTest { @@ -80,6 +81,32 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest { } @Test + public void getUpdatedRequestTest() throws Exception{ + List<ExecuteBuildingBlock> flowsToExecute = new ArrayList(); + ExecuteBuildingBlock ebb1 = new ExecuteBuildingBlock(); + BuildingBlock bb1 = new BuildingBlock(); + bb1.setBpmnFlowName("CreateNetworkBB"); + flowsToExecute.add(ebb1); + ebb1.setBuildingBlock(bb1); + ExecuteBuildingBlock ebb2 = new ExecuteBuildingBlock(); + BuildingBlock bb2 = new BuildingBlock(); + bb2.setBpmnFlowName("ActivateNetworkBB"); + flowsToExecute.add(ebb2); + ebb2.setBuildingBlock(bb2); + String requestId = "requestId"; + execution.setVariable("mso-request-id", requestId); + execution.setVariable("flowsToExecute", flowsToExecute); + int currentSequence = 2; + String expectedStatusMessage = "Execution of CreateNetworkBB has completed successfully, next invoking ActivateNetworkBB (Execution Path progress: BBs completed = 1; BBs remaining = 1)."; + Long expectedLong = new Long(52); + InfraActiveRequests mockedRequest = new InfraActiveRequests(); + when(requestsDbClient.getInfraActiveRequestbyRequestId(requestId)).thenReturn(mockedRequest); + InfraActiveRequests actual = workflowActionBBTasks.getUpdatedRequest(execution, currentSequence); + assertEquals(expectedStatusMessage, actual.getStatusMessage()); + assertEquals(expectedLong, actual.getProgress()); + } + + @Test public void select2BBTest() throws Exception{ String gAction = "Delete-Network-Collection"; execution.setVariable("mso-request-id", "00f704ca-c5e5-4f95-a72c-6889db7b0688"); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java index 283f8881c7..65d16adb40 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java @@ -36,7 +36,6 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; -import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Optional; @@ -74,7 +73,6 @@ import org.onap.so.db.catalog.beans.Service; import org.onap.so.db.catalog.beans.VfModuleCustomization; import org.onap.so.db.catalog.beans.macro.NorthBoundRequest; import org.onap.so.db.catalog.beans.macro.OrchestrationFlow; -import org.onap.so.serviceinstancebeans.ModelInfo; import org.onap.so.serviceinstancebeans.RequestDetails; import org.onap.so.serviceinstancebeans.RequestParameters; import org.onap.so.serviceinstancebeans.ServiceInstancesRequest; @@ -304,7 +302,7 @@ public class WorkflowActionTest extends BaseTaskTest { orchFlows.add(orch7); OrchestrationFlow orch8 = new OrchestrationFlow(); orch8.setFlowName("ActivateServiceInstanceBB"); - orchFlows.add(orch8); + orchFlows.add(orch8); ServiceInstance serviceInstanceAAI = new ServiceInstance(); serviceInstanceAAI.setServiceInstanceId("si0"); @@ -427,14 +425,20 @@ public class WorkflowActionTest extends BaseTaskTest { orch12.setFlowName("ActivateVfModuleBB"); orchFlows.add(orch12); OrchestrationFlow orch13 = new OrchestrationFlow(); - orch13.setFlowName("ActivateVnfBB"); + orch13.setFlowName("AssignFabricConfigurationBB"); orchFlows.add(orch13); OrchestrationFlow orch14 = new OrchestrationFlow(); - orch14.setFlowName("ActivateNetworkCollectionBB"); + orch14.setFlowName("ActivateFabricConfigurationBB"); orchFlows.add(orch14); OrchestrationFlow orch15 = new OrchestrationFlow(); - orch15.setFlowName("ActivateServiceInstanceBB"); + orch15.setFlowName("ActivateVnfBB"); orchFlows.add(orch15); + OrchestrationFlow orch16 = new OrchestrationFlow(); + orch16.setFlowName("ActivateNetworkCollectionBB"); + orchFlows.add(orch16); + OrchestrationFlow orch17 = new OrchestrationFlow(); + orch17.setFlowName("ActivateServiceInstanceBB"); + orchFlows.add(orch17); Service service = new Service(); doReturn(service).when(catalogDbClient).getServiceByID("3c40d244-808e-42ca-b09a-256d83d19d0a"); @@ -712,6 +716,9 @@ public class WorkflowActionTest extends BaseTaskTest { orch15.setFlowName("ActivateServiceInstanceBB"); orchFlows.add(orch15); + Service service = new Service(); + service.setModelUUID("3c40d244-808e-42ca-b09a-256d83d19d0a"); + VfModuleCustomization vfModuleCustomization = new VfModuleCustomization(); vfModuleCustomization.setModelCustomizationUUID("a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"); HeatEnvironment volumeHeatEnv = new HeatEnvironment(); @@ -737,6 +744,7 @@ public class WorkflowActionTest extends BaseTaskTest { when(catalogDbClient.getVfModuleCustomizationByModelCuztomizationUUID("a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f")).thenReturn(vfModuleCustomization); when(catalogDbClient.getVfModuleCustomizationByModelCuztomizationUUID("72d9d1cd-f46d-447a-abdb-451d6fb05fa8")).thenReturn(vfModuleCustomization2); when(catalogDbClient.getVfModuleCustomizationByModelCuztomizationUUID("da4d4327-fb7d-4311-ac7a-be7ba60cf969")).thenReturn(vfModuleCustomization3); + when(catalogDbClient.getServiceByID("3c40d244-808e-42ca-b09a-256d83d19d0a")).thenReturn(service); workflowAction.selectExecutionList(execution); List<ExecuteBuildingBlock> ebbs = (List<ExecuteBuildingBlock>) execution.getVariable("flowsToExecute"); @@ -772,7 +780,7 @@ public class WorkflowActionTest extends BaseTaskTest { assertEquals(UUID.randomUUID().toString().length(),ebbs.get(14).getWorkflowResourceIds().getVnfId().length()); assertEquals(ebbs.get(15).getBuildingBlock().getBpmnFlowName(),"ActivateServiceInstanceBB"); assertEquals(3,ebbs.get(0).getWorkflowResourceIds().getServiceInstanceId().length()); - + assertEquals(true, execution.getVariable("homing")); } @Test @@ -790,48 +798,48 @@ public class WorkflowActionTest extends BaseTaskTest { NorthBoundRequest northBoundRequest = new NorthBoundRequest(); List<OrchestrationFlow> orchFlows = new LinkedList<>(); northBoundRequest.setOrchestrationFlowList(orchFlows); - OrchestrationFlow orch1 = new OrchestrationFlow(); - orch1.setFlowName("DeactivateVfModuleBB"); - orchFlows.add(orch1); - OrchestrationFlow orch2 = new OrchestrationFlow(); - orch2.setFlowName("DeleteVfModuleBB"); - orchFlows.add(orch2); OrchestrationFlow orch3 = new OrchestrationFlow(); - orch3.setFlowName("DeactivateVolumeGroupBB"); + orch3.setFlowName("DeactivateVfModuleBB"); orchFlows.add(orch3); OrchestrationFlow orch4 = new OrchestrationFlow(); - orch4.setFlowName("DeleteVolumeGroupBB"); + orch4.setFlowName("DeleteVfModuleBB"); orchFlows.add(orch4); OrchestrationFlow orch5 = new OrchestrationFlow(); - orch5.setFlowName("DeactivateVnfBB"); + orch5.setFlowName("DeactivateVolumeGroupBB"); orchFlows.add(orch5); OrchestrationFlow orch6 = new OrchestrationFlow(); - orch6.setFlowName("DeactivateNetworkBB"); + orch6.setFlowName("DeleteVolumeGroupBB"); orchFlows.add(orch6); OrchestrationFlow orch7 = new OrchestrationFlow(); - orch7.setFlowName("DeleteNetworkBB"); + orch7.setFlowName("DeactivateVnfBB"); orchFlows.add(orch7); OrchestrationFlow orch8 = new OrchestrationFlow(); - orch8.setFlowName("DeleteNetworkCollectionBB"); + orch8.setFlowName("DeactivateNetworkBB"); orchFlows.add(orch8); OrchestrationFlow orch9 = new OrchestrationFlow(); - orch9.setFlowName("DeactivateServiceInstanceBB"); + orch9.setFlowName("DeleteNetworkBB"); orchFlows.add(orch9); OrchestrationFlow orch10 = new OrchestrationFlow(); - orch10.setFlowName("UnassignVfModuleBB"); + orch10.setFlowName("DeleteNetworkCollectionBB"); orchFlows.add(orch10); OrchestrationFlow orch11 = new OrchestrationFlow(); - orch11.setFlowName("UnassignVolumeGroupBB"); + orch11.setFlowName("DeactivateServiceInstanceBB"); orchFlows.add(orch11); OrchestrationFlow orch12 = new OrchestrationFlow(); - orch12.setFlowName("UnassignVnfBB"); + orch12.setFlowName("UnassignVfModuleBB"); orchFlows.add(orch12); OrchestrationFlow orch13 = new OrchestrationFlow(); - orch13.setFlowName("UnassignNetworkBB"); + orch13.setFlowName("UnassignVolumeGroupBB"); orchFlows.add(orch13); OrchestrationFlow orch14 = new OrchestrationFlow(); - orch14.setFlowName("UnassignServiceInstanceBB"); + orch14.setFlowName("UnassignVnfBB"); orchFlows.add(orch14); + OrchestrationFlow orch15 = new OrchestrationFlow(); + orch15.setFlowName("UnassignNetworkBB"); + orchFlows.add(orch15); + OrchestrationFlow orch16 = new OrchestrationFlow(); + orch16.setFlowName("UnassignServiceInstanceBB"); + orchFlows.add(orch16); ServiceInstance serviceInstanceAAI = new ServiceInstance(); serviceInstanceAAI.setServiceInstanceId("aaisi123"); @@ -948,49 +956,49 @@ public class WorkflowActionTest extends BaseTaskTest { NorthBoundRequest northBoundRequest = new NorthBoundRequest(); List<OrchestrationFlow> orchFlows = new LinkedList<>(); - northBoundRequest.setOrchestrationFlowList(orchFlows); - OrchestrationFlow orch1 = new OrchestrationFlow(); - orch1.setFlowName("DeactivateVfModuleBB"); - orchFlows.add(orch1); - OrchestrationFlow orch2 = new OrchestrationFlow(); - orch2.setFlowName("DeleteVfModuleBB"); - orchFlows.add(orch2); + northBoundRequest.setOrchestrationFlowList(orchFlows); OrchestrationFlow orch3 = new OrchestrationFlow(); - orch3.setFlowName("DeactivateVolumeGroupBB"); + orch3.setFlowName("DeactivateVfModuleBB"); orchFlows.add(orch3); OrchestrationFlow orch4 = new OrchestrationFlow(); - orch4.setFlowName("DeleteVolumeGroupBB"); + orch4.setFlowName("DeleteVfModuleBB"); orchFlows.add(orch4); OrchestrationFlow orch5 = new OrchestrationFlow(); - orch5.setFlowName("DeactivateVnfBB"); + orch5.setFlowName("DeactivateVolumeGroupBB"); orchFlows.add(orch5); OrchestrationFlow orch6 = new OrchestrationFlow(); - orch6.setFlowName("DeactivateNetworkBB"); + orch6.setFlowName("DeleteVolumeGroupBB"); orchFlows.add(orch6); OrchestrationFlow orch7 = new OrchestrationFlow(); - orch7.setFlowName("DeleteNetworkBB"); + orch7.setFlowName("DeactivateVnfBB"); orchFlows.add(orch7); OrchestrationFlow orch8 = new OrchestrationFlow(); - orch8.setFlowName("DeleteNetworkCollectionBB"); - orchFlows.add(orch8); + orch8.setFlowName("DeactivateNetworkBB"); + orchFlows.add(orch8); OrchestrationFlow orch9 = new OrchestrationFlow(); - orch9.setFlowName("DeactivateServiceInstanceBB"); - orchFlows.add(orch9); + orch9.setFlowName("DeleteNetworkBB"); + orchFlows.add(orch9); OrchestrationFlow orch10 = new OrchestrationFlow(); - orch10.setFlowName("UnassignVfModuleBB"); - orchFlows.add(orch10); + orch10.setFlowName("DeleteNetworkCollectionBB"); + orchFlows.add(orch10); OrchestrationFlow orch11 = new OrchestrationFlow(); - orch11.setFlowName("UnassignVolumeGroupBB"); - orchFlows.add(orch11); + orch11.setFlowName("DeactivateServiceInstanceBB"); + orchFlows.add(orch11); OrchestrationFlow orch12 = new OrchestrationFlow(); - orch12.setFlowName("UnassignVnfBB"); - orchFlows.add(orch12); + orch12.setFlowName("UnassignVfModuleBB"); + orchFlows.add(orch12); OrchestrationFlow orch13 = new OrchestrationFlow(); - orch13.setFlowName("UnassignNetworkBB"); - orchFlows.add(orch13); + orch13.setFlowName("UnassignVolumeGroupBB"); + orchFlows.add(orch13); OrchestrationFlow orch14 = new OrchestrationFlow(); - orch14.setFlowName("UnassignServiceInstanceBB"); - orchFlows.add(orch14); + orch14.setFlowName("UnassignVnfBB"); + orchFlows.add(orch14); + OrchestrationFlow orch15 = new OrchestrationFlow(); + orch15.setFlowName("UnassignNetworkBB"); + orchFlows.add(orch15); + OrchestrationFlow orch16 = new OrchestrationFlow(); + orch16.setFlowName("UnassignServiceInstanceBB"); + orchFlows.add(orch16); ServiceInstance serviceInstanceAAI = new ServiceInstance(); serviceInstanceAAI.setServiceInstanceId("aaisi123"); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java index 6edda44c0a..99f1b188c9 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java @@ -63,7 +63,7 @@ import org.onap.so.db.catalog.beans.OrchestrationStatus; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; -public class AAIObjectMapperTest{ +public class AAIObjectMapperTest { private AAIObjectMapper aaiObjectMapper = new AAIObjectMapper(); private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/"; @@ -245,6 +245,32 @@ public class AAIObjectMapperTest{ assertThat(reqMapper1, sameBeanAs(AAIVfModule)); } + + @Test + public void vfModuleBaseMap() throws Exception { + VfModule vfModule = new VfModule(); + vfModule.setVfModuleId("a"); + vfModule.setVfModuleName("b"); + vfModule.setOrchestrationStatus(OrchestrationStatus.ASSIGNED); + ModelInfoVfModule modelInfoVfModule = new ModelInfoVfModule(); + modelInfoVfModule.setModelCustomizationUUID("f"); + modelInfoVfModule.setModelInvariantUUID("g"); + modelInfoVfModule.setModelUUID("h"); + modelInfoVfModule.setIsBaseBoolean(true); + vfModule.setModelInfoVfModule(modelInfoVfModule); + + org.onap.aai.domain.yang.VfModule AAIVfModule = aaiObjectMapper.mapVfModule(vfModule); + + String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "aaiVfModuleBaseMap.json"))); + + ObjectMapper omapper = new ObjectMapper(); + org.onap.aai.domain.yang.VfModule reqMapper1 = omapper.readValue( + jsonToCompare, + org.onap.aai.domain.yang.VfModule.class); + + assertThat(reqMapper1, sameBeanAs(AAIVfModule)); + + } @Test public void testMapInstanceGroup() { @@ -317,7 +343,7 @@ public class AAIObjectMapperTest{ l3Network.setContrailNetworkFqdn("contrailNetworkFqdn"); l3Network.setIsBoundToVpn(false); l3Network.setIsCascaded(false); - l3Network.setIsExternalNetwork(false); + l3Network.setIsSharedNetwork(false); l3Network.setHeatStackId("heatStackId"); l3Network.setOperationalStatus("operationalStatus"); l3Network.setPhysicalNetworkName("physicalNetworkName"); @@ -403,7 +429,7 @@ public class AAIObjectMapperTest{ l3Network.setPhysicalNetworkName("physicalNetwork_name"); l3Network.setIsProviderNetwork(true); l3Network.setIsSharedNetwork(false); - l3Network.setIsExternalNetwork(false); + l3Network.setIsExternalNetwork(true); l3Network.setSelflink("self_link"); l3Network.setOperationalStatus("operationalStatus"); @@ -536,7 +562,7 @@ public class AAIObjectMapperTest{ AAIObjectMapper aaiObjectMapper = new AAIObjectMapper(); org.onap.aai.domain.yang.CtagAssignments v12CtagAssingments = aaiObjectMapper.mapToAAICtagAssignmentList(ctagAssignments); - assertEquals(ctagAssignments.get(0).getVlanIdInner(), v12CtagAssingments.getCtagAssignment().get(0).getVlanIdInner()); + assertEquals(new Long(ctagAssignments.get(0).getVlanIdInner().longValue()), new Long(v12CtagAssingments.getCtagAssignment().get(0).getVlanIdInner())); String jsonToCompare = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "aaiCtagAssingmentsMapped_to_aai.json"))); ObjectMapper omapper = new ObjectMapper(); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/NetworkAdapterClientIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/NetworkAdapterClientIT.java index 207b9f3f98..352eb20630 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/NetworkAdapterClientIT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/NetworkAdapterClientIT.java @@ -30,7 +30,6 @@ import static org.junit.Assert.assertEquals; import org.junit.BeforeClass; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.adapters.nwrest.CreateNetworkError; import org.onap.so.adapters.nwrest.CreateNetworkRequest; import org.onap.so.adapters.nwrest.CreateNetworkResponse; @@ -45,6 +44,7 @@ import org.onap.so.adapters.nwrest.RollbackNetworkResponse; import org.onap.so.adapters.nwrest.UpdateNetworkError; import org.onap.so.adapters.nwrest.UpdateNetworkRequest; import org.onap.so.adapters.nwrest.UpdateNetworkResponse; +import org.onap.so.BaseTest; import org.onap.so.openstack.beans.NetworkRollback; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java index 96fbe7ffb7..fddba98f4c 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapperTest.java @@ -187,6 +187,7 @@ public class NetworkAdapterObjectMapperTest extends TestDataSetup{ Subnet actualSubnet = new Subnet(); actualSubnet.setSubnetId("subnetId"); + actualSubnet.setDhcpEnabled(false); actualSubnet.setIpVersion("4"); RouteTarget routeTarget = new RouteTarget(); @@ -231,7 +232,7 @@ public class NetworkAdapterObjectMapperTest extends TestDataSetup{ expectedUpdateNetworkRequest.setNetworkParams(userInput); expectedUpdateNetworkRequest.setMsoRequest(msoRequest); expectedUpdateNetworkRequest.setSkipAAI(true); - expectedUpdateNetworkRequest.setBackout(!Boolean.valueOf(orchestrationContext.getIsRollbackEnabled())); + expectedUpdateNetworkRequest.setBackout(!Boolean.TRUE.equals(orchestrationContext.getIsRollbackEnabled())); expectedUpdateNetworkRequest.setMessageId("messageId"); expectedUpdateNetworkRequest.setNotificationUrl("http://localhost:28080/mso/WorkflowMesssage/NetworkAResponse/messageId"); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfAdapterClientIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfAdapterClientIT.java index 85f787faa7..f7ad5f5ff4 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfAdapterClientIT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfAdapterClientIT.java @@ -31,7 +31,6 @@ import static org.junit.Assert.assertEquals; import org.junit.BeforeClass; import org.junit.Test; -import org.onap.so.BaseTest; import org.onap.so.adapters.vnfrest.CreateVfModuleRequest; import org.onap.so.adapters.vnfrest.CreateVfModuleResponse; import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest; @@ -43,7 +42,7 @@ import org.onap.so.adapters.vnfrest.UpdateVfModuleRequest; import org.onap.so.adapters.vnfrest.UpdateVfModuleResponse; import org.onap.so.adapters.vnfrest.VfModuleExceptionResponse; import org.onap.so.adapters.vnfrest.VfModuleRollback; - +import org.onap.so.BaseTest; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientIT.java index b356b21de4..e3d849f925 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientIT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientIT.java @@ -33,7 +33,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; import org.mockito.runners.MockitoJUnitRunner; -import org.onap.so.BaseTest; import org.onap.so.adapters.vnfrest.CreateVolumeGroupRequest; import org.onap.so.adapters.vnfrest.CreateVolumeGroupResponse; import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest; @@ -43,6 +42,7 @@ import org.onap.so.adapters.vnfrest.RollbackVolumeGroupResponse; import org.onap.so.adapters.vnfrest.UpdateVolumeGroupRequest; import org.onap.so.adapters.vnfrest.UpdateVolumeGroupResponse; import org.onap.so.client.adapter.rest.AdapterRestClient; +import org.onap.so.BaseTest; @RunWith(MockitoJUnitRunner.class) diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java index 1bb59e7b8d..0c9e281fc7 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapperPayloadTest.java @@ -103,6 +103,9 @@ public class VnfAdapterVfModuleObjectMapperPayloadTest { modelInfoVfModule.setModelUUID("vfModuleModelUuid"); modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid"); vfModule.setModelInfoVfModule(modelInfoVfModule); + HashMap<String, String> cloudParams = new HashMap<String, String>(); + cloudParams.put("key3", "value3"); + vfModule.setCloudParams(cloudParams); CloudRegion cloudRegion = new CloudRegion(); cloudRegion.setLcpCloudRegionId("cloudRegionId"); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java index cc48c46508..3dc9a4da63 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java @@ -43,6 +43,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy; +import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule; import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding; import org.onap.so.client.aai.AAIObjectType; import org.onap.so.client.aai.AAIResourcesClient; @@ -63,6 +64,7 @@ public class AAIConfigurationResourcesTest extends TestDataSetup{ private ServiceInstance serviceInstance; private GenericVnf genericVnf; private VpnBinding vpnBinding; + private VfModule vfModule; @Mock protected AAIResourcesClient MOCK_aaiResourcesClient; @@ -82,6 +84,7 @@ public class AAIConfigurationResourcesTest extends TestDataSetup{ serviceProxy = buildServiceProxy(); serviceInstance = buildServiceInstance(); genericVnf = buildGenericVnf(); + vfModule = buildVfModule(); vpnBinding = buildVpnBinding(); doReturn(MOCK_aaiResourcesClient).when(MOCK_injectionHelper).getAaiClient(); } @@ -126,6 +129,20 @@ public class AAIConfigurationResourcesTest extends TestDataSetup{ aaiConfigurationResources.connectConfigurationToGenericVnf(configuration.getConfigurationId(), genericVnf.getVnfId()); verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), any(AAIResourceUri.class)); } + + @Test + public void connectConfigurationToVfModuleTest() { + doNothing().when(MOCK_aaiResourcesClient).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class)); + aaiConfigurationResources.connectConfigurationToVfModule(configuration.getConfigurationId(), vfModule.getVfModuleId(),genericVnf.getVnfId()); + verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), any(AAIResourceUri.class)); + } + + @Test + public void connectConfigurationToVnfcTest() { + doNothing().when(MOCK_aaiResourcesClient).connect(isA(AAIResourceUri.class), isA(AAIResourceUri.class)); + aaiConfigurationResources.connectConfigurationToVnfc(configuration.getConfigurationId(), "vnfcName"); + verify(MOCK_aaiResourcesClient, times(1)).connect(any(AAIResourceUri.class), any(AAIResourceUri.class)); + } @Test public void connectConfigurationToVpnBindingTest() { @@ -177,4 +194,13 @@ public class AAIConfigurationResourcesTest extends TestDataSetup{ aaiConfigurationResources.deleteConfiguration("configurationId"); verify(MOCK_aaiResourcesClient, times(1)).delete(aaiResourceUri); } + + @Test + public void updateOrchestrationStatusConfigurationTest() throws Exception { + configuration.setOrchestrationStatus(OrchestrationStatus.ACTIVE); + doNothing().when(MOCK_aaiResourcesClient).update(isA(AAIResourceUri.class), isA(org.onap.aai.domain.yang.Configuration.class)); + aaiConfigurationResources.updateOrchestrationStatusConfiguration(configuration,OrchestrationStatus.ACTIVE); + verify(MOCK_aaiResourcesClient, times(1)).update(any(AAIResourceUri.class), any(org.onap.aai.domain.yang.Configuration.class)); + assertEquals(OrchestrationStatus.ACTIVE, configuration.getOrchestrationStatus()); + } }
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResourcesTest.java index ee0e60c38a..d582253df1 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResourcesTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/VnfAdapterVolumeGroupResourcesTest.java @@ -110,13 +110,10 @@ public class VnfAdapterVolumeGroupResourcesTest extends TestDataSetup { DeleteVolumeGroupRequest deleteVolumeGroupRequest = new DeleteVolumeGroupRequest(); doReturn(deleteVolumeGroupRequest).when(MOCK_vnfAdapterObjectMapper).deleteVolumeGroupRequestMapper(requestContext, cloudRegion, serviceInstance, volumeGroup); - DeleteVolumeGroupResponse expectedDeleteVolumeGroupResponse = new DeleteVolumeGroupResponse(); - doReturn(expectedDeleteVolumeGroupResponse).when(MOCK_vnfVolumeAdapterClient).deleteVNFVolumes(volumeGroup.getVolumeGroupId(), deleteVolumeGroupRequest); + DeleteVolumeGroupRequest expectedDeleteVolumeGroupRequest = new DeleteVolumeGroupRequest(); + DeleteVolumeGroupRequest actualDeleteVolumeGroupRequest = vnfAdapterVolumeGroupResources.deleteVolumeGroupRequest(requestContext, cloudRegion, serviceInstance, volumeGroup); - DeleteVolumeGroupResponse actualDeleteVolumeGroupResponse = vnfAdapterVolumeGroupResources.deleteVolumeGroup(requestContext, cloudRegion, serviceInstance, volumeGroup); - - verify(MOCK_vnfVolumeAdapterClient, times(1)).deleteVNFVolumes(volumeGroup.getVolumeGroupId(), deleteVolumeGroupRequest); verify(MOCK_vnfAdapterObjectMapper, times(1)).deleteVolumeGroupRequestMapper(requestContext, cloudRegion, serviceInstance, volumeGroup); - assertThat(expectedDeleteVolumeGroupResponse, Matchers.sameBeanAs(actualDeleteVolumeGroupResponse)); + assertThat(expectedDeleteVolumeGroupRequest, Matchers.sameBeanAs(actualDeleteVolumeGroupRequest)); } } diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/SDNCClientLogResponseTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/SDNCClientLogResponseTest.java new file mode 100644 index 0000000000..e28c465437 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/SDNCClientLogResponseTest.java @@ -0,0 +1,43 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.client.sdnc; + +import static org.junit.Assert.*; + +import java.util.LinkedHashMap; +import java.util.Optional; + +import org.junit.Test; + +public class SDNCClientLogResponseTest { + + private SDNCClient sdncClient = new SDNCClient(); + + @Test + public void logSDNCResponseTest() { + LinkedHashMap<String, String> output = new LinkedHashMap<>(); + output.put("response-code", "404"); + output.put("response-message", "not found"); + Optional<String> response = sdncClient.logSDNCResponse(output); + assertEquals(true, response.isPresent()); + assertEquals("{\"response-code\":\"404\",\"response-message\":\"not found\"}",response.get()); + } +} diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java index 369a7321e2..04397c499d 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapperTest.java @@ -29,7 +29,9 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.HashMap; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.ExpectedException; import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion; import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; @@ -41,6 +43,7 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext; import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf; import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance; import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule; +import org.onap.so.client.exception.MapperException; import org.onap.so.client.sdnc.beans.SDNCSvcAction; import org.onap.so.client.sdnc.beans.SDNCSvcOperation; @@ -50,6 +53,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; public class VfModuleTopologyOperationRequestMapperTest { private final static String JSON_FILE_LOCATION = "src/test/resources/__files/BuildingBlocks/"; + private final static String ERRORMESSAGE = "VF Module model info is null for testVfModuleId"; + + @Rule + public ExpectedException expectedException = ExpectedException.none(); @Test public void assignGenericResourceApiVfModuleInformationTest() throws Exception { @@ -100,6 +107,9 @@ public class VfModuleTopologyOperationRequestMapperTest { modelInfoVfModule.setModelUUID("vfModuleModelUuid"); modelInfoVfModule.setModelCustomizationUUID("vfModuleModelCustomizationUuid"); vfModule.setModelInfoVfModule(modelInfoVfModule); + HashMap<String, String> cloudParams = new HashMap<String, String>(); + userParams.put("key2", "value2"); + vfModule.setCloudParams(cloudParams); VolumeGroup volumeGroup = new VolumeGroup(); volumeGroup.setVolumeGroupId("volumeGroupId"); @@ -217,5 +227,57 @@ public class VfModuleTopologyOperationRequestMapperTest { assertEquals("vnfModelCustomizationUuid", vfModuleSDNCrequest.getVnfInformation().getOnapModelInformation().getModelCustomizationUuid()); assertEquals("vfModuleModelCustomizationUuid", vfModuleSDNCrequest.getVfModuleInformation().getOnapModelInformation().getModelCustomizationUuid()); } + + @Test + public void reqMapperNoModelInfoTest() throws Exception { + + // prepare and set service instance + ServiceInstance serviceInstance = new ServiceInstance(); + serviceInstance.setServiceInstanceId("serviceInstanceId"); + ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance(); + modelInfoServiceInstance.setModelInvariantUuid("serviceModelInvariantUuid"); + modelInfoServiceInstance.setModelName("serviceModelName"); + modelInfoServiceInstance.setModelUuid("serviceModelUuid"); + modelInfoServiceInstance.setModelVersion("serviceModelVersion"); + + serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance); + // prepare Customer object + Customer customer = new Customer(); + customer.setGlobalCustomerId("globalCustomerId"); + customer.setServiceSubscription(new ServiceSubscription()); + // set Customer on service instance + customer.getServiceSubscription().getServiceInstances().add(serviceInstance); + // + RequestContext requestContext = new RequestContext(); + HashMap<String, String> userParams = new HashMap<String, String>(); + userParams.put("key1", "value1"); + requestContext.setUserParams(userParams); + requestContext.setProductFamilyId("productFamilyId"); + + GenericVnf vnf = new GenericVnf(); + vnf.setVnfId("testVnfId"); + vnf.setVnfType("testVnfType"); + ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf(); + modelInfoGenericVnf.setModelInvariantUuid("vnfModelInvariantUuid"); + modelInfoGenericVnf.setModelName("vnfModelName"); + modelInfoGenericVnf.setModelVersion("vnfModelVersion"); + modelInfoGenericVnf.setModelUuid("vnfModelUuid"); + modelInfoGenericVnf.setModelCustomizationUuid("vnfModelCustomizationUuid"); + vnf.setModelInfoGenericVnf(modelInfoGenericVnf); + + VfModule vfModule = new VfModule(); + vfModule.setVfModuleId("testVfModuleId"); + vfModule.setVfModuleName("testVfModuleName"); + vfModule.setModelInfoVfModule(null); + + CloudRegion cloudRegion = new CloudRegion(); + + VfModuleTopologyOperationRequestMapper mapper = new VfModuleTopologyOperationRequestMapper(); + expectedException.expect(MapperException.class); + expectedException.expectMessage(ERRORMESSAGE); + + mapper.reqMapper(SDNCSvcOperation.VF_MODULE_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN, vfModule, null, vnf, serviceInstance, customer, + cloudRegion, requestContext, null); + } } diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json index a24f8bf125..8e43f2a1e5 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopology.json @@ -1,4 +1,5 @@ { +"vf-module-topology":{ "vf-module-assignments": { "vms": { "vm": [ @@ -175,4 +176,4 @@ } ] } -}
\ No newline at end of file +}}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json index eaedb92281..2036501572 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVfModuleTopologyWithCloudResources.json @@ -1,4 +1,5 @@ { +"vf-module-topology":{ "vf-module-assignments": { "vms": { "vm": [ @@ -176,4 +177,4 @@ ] }, "sdnc-generated-cloud-resources": "true" -}
\ No newline at end of file +}}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json index 39c6708631..5a5b2febbd 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopology.json @@ -1,4 +1,5 @@ { +"vnf-topology":{ "vnf-resource-assignments": { "availability-zones": { "availability-zone": [ @@ -45,4 +46,5 @@ "vnf-topology-identifier-structure": {}, "onap-model-information": {}, "aic-cloud-region": "" +} }
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json index 21ba0876f5..73e36758fc 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetDhcpDisabled.json @@ -1,4 +1,5 @@ { +"vnf-topology":{ "vnf-resource-assignments": { "availability-zones": { "availability-zone": [ @@ -45,4 +46,4 @@ "vnf-topology-identifier-structure": {}, "onap-model-information": {}, "aic-cloud-region": "" -}
\ No newline at end of file +}}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json index 5062a06117..e6ea0b2e5c 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologySubnetMultipleDhcp.json @@ -1,4 +1,5 @@ { +"vnf-topology":{ "vnf-resource-assignments": { "availability-zones": { "availability-zone": [ @@ -65,4 +66,4 @@ "vnf-topology-identifier-structure": {}, "onap-model-information": {}, "aic-cloud-region": "" -}
\ No newline at end of file +}}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json index fedee49609..3ca3403d47 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithCloudResources.json @@ -1,4 +1,5 @@ { +"vnf-topology":{ "vnf-resource-assignments": { "availability-zones": { "availability-zone": [ @@ -44,4 +45,4 @@ "onap-model-information": {}, "aic-cloud-region": "", "sdnc-generated-cloud-resources": "true" -}
\ No newline at end of file +}}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json index a6964a323f..7690c6bf54 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/genericResourceApiVfModuleSdncVnfTopologyWithSingletonArray.json @@ -1,4 +1,5 @@ { +"vnf-topology":{ "vnf-resource-assignments": { "availability-zones": { "availability-zone": "zone0" @@ -41,4 +42,4 @@ "vnf-topology-identifier-structure": {}, "onap-model-information": {}, "aic-cloud-region": "" -}
\ No newline at end of file +}}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json index 0db327eae4..0132068fe4 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/VnfAndVfModuleMapper/vnfAdapterCreateVfModuleRequest.json @@ -39,6 +39,7 @@ "fw_subint_ctrl_port_0_floating_v6_ip": "floatingIpV60", "workload_context": "workloadContext", "key1": "value2", + "key3": "value3", "availability_zone_0": "zone0", "availability_zone_1": "zone1", "availability_zone_2": "zone2", diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped.json index 81362e3dca..d6c08fbaee 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped.json @@ -14,7 +14,6 @@ "physicalNetworkName": "physicalNetworkName", "isProviderNetwork": false, "isSharedNetwork": false, - "isExternalNetwork": false, "selflink": "selflink", "operationalStatus": "operationalStatus" }
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped_to_aai.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped_to_aai.json index 7a30ade095..bca5f94294 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped_to_aai.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiL3NetworkMapped_to_aai.json @@ -5,7 +5,7 @@ "networkRole" : "dmz_direct", "networkTechnology" : "contrail", "neutronNetworkId" : null, - "isBoundToVpn" : false, + "isBoundToVpn" : true, "serviceId" : "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", "networkRoleInstance" : 1, "resourceVersion" : null, @@ -20,9 +20,9 @@ "widgetModelId" : "widgetModel_id", "widgetModelVersion" : "widgetModel_version", "physicalNetworkName" : "physicalNetwork_name", - "isProviderNetwork" : false, + "isProviderNetwork" : true, "isSharedNetwork" : false, - "isExternalNetwork" : false, + "isExternalNetwork" : true, "selflink" : "self_link", "operationalStatus" : "operationalStatus", "subnets" : { diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiVfModuleBaseMap.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiVfModuleBaseMap.json new file mode 100644 index 0000000000..9637e00fe1 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/aaiVfModuleBaseMap.json @@ -0,0 +1,12 @@ +{ + + "modelCustomizationId" : "f", + "vfModuleId" : "a", + "vfModuleName" : "b", + "modelInvariantId" : "g", + "modelVersionId" : "h", + "orchestrationStatus" : "Assigned", + "personaModelVersion" : "g", + "isBaseVfModule" : true + +}
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformation.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformation.json index cc32040f38..91d64b98ca 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformation.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformation.json @@ -47,6 +47,7 @@ "model-uuid" : "modelUuid", "model-invariant-uuid" : "modelInvariantUuid" }, + "from-preload": null, "network-id" : "TEST_NETWORK_ID", "network-type" : null } diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationNoNetworkName.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationNoNetworkName.json index 40946725d9..95a2af3880 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationNoNetworkName.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationNoNetworkName.json @@ -46,6 +46,7 @@ "model-uuid" : "modelUuid", "model-invariant-uuid" : "modelInvariantUuid" }, + "from-preload": null, "network-id" : "TEST_NETWORK_ID", "network-type" : null } diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationUnAssign.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationUnAssign.json index 7ca8153def..a7cf1e1434 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationUnAssign.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiNetworkOperationInformationUnAssign.json @@ -47,6 +47,7 @@ "model-uuid" : "modelUuid", "model-invariant-uuid" : "modelInvariantUuid" }, + "from-preload": null, "network-id" : "TEST_NETWORK_ID", "network-type" : null } diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json index 4231152d86..a344e8081e 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationAssign.json @@ -23,6 +23,10 @@ "value" : "value1" }, { + "name" : "key2", + "value" : "value2" + }, + { "name" : "volume-group-id", "value" : "volumeGroupId" } ] @@ -51,6 +55,7 @@ "model-invariant-uuid" : "vfModuleModelInvariantUuid" }, "vf-module-id" : "testVfModuleId", + "from-preload" : null, "vf-module-type": "vfModuleModelName" }, diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationUnassign.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationUnassign.json index 64192ff8d0..f06d72a806 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationUnassign.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/genericResourceApiVfModuleOperationInformationUnassign.json @@ -21,8 +21,9 @@ "svc-action" : "unassign" }, "vf-module-information" : { - "vf-module-id" : "testVfModuleId" - }, + "vf-module-id" : "testVfModuleId", + "from-preload": null + }, "vnf-information" : { "vnf-id" : "testVnfId", "vnf-type" : "testVnfType" diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml new file mode 100644 index 0000000000..feb7ede50b --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/CreateVfModuleVolumeCallbackResponse.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<createVolumeGroupResponse> + <messageId>{{MESSAGE-ID}}</messageId> + <volumeGroupCreated>true</volumeGroupCreated> + <volumeGroupId>d485ecee-957c-4a0a-8b95-27a22b90103f</volumeGroupId> + <volumeGroupOutputs> + <entry> + <key>mmsc_vol_1</key> + <value>a73e0fe9-1ce8-49c2-8fef-e2788605be29</value> + </entry> + <entry> + <key>mmsc_vol_2</key> + <value>37b6455a-5ea8-463a-89e3-0efeaf7b7c6d</value> + </entry> + <entry> + <key>nemsfe_vol_1</key> + <value>b7ff1c21-d138-49a3-bf13-4cfd91efaf48</value> + </entry> + <entry> + <key>nemsbe_vol_1</key> + <value>a5988471-cd42-44d8-b078-64f2f13d3d4c</value> + </entry> + <entry> + <key>mmsc_vol_5</key> + <value>f7b91c1e-ab8c-413a-a850-ba80a246c7e0</value> + </entry> + <entry> + <key>nemsfe_vol_2</key> + <value>957ea3f3-2d4a-4707-bfd2-ba66f42037c2</value> + </entry> + <entry> + <key>mmsc_vol_3</key> + <value>de6fccfe-d61a-48b0-b03b-87bf1bf749b3</value> + </entry> + <entry> + <key>mmsc_vol_4</key> + <value>76162310-2c38-4c32-981c-5c2880190077</value> + </entry> + </volumeGroupOutputs> + <volumeGroupRollback> + <cloudSiteId>RDM2WAGPLCP</cloudSiteId> + <messageId>e585e4f4-9452-437a-b294-45a2d6d3b7a3</messageId> + <msoRequest> + <requestId>c30b9453-4b68-4c2e-aacf-58a5ba648bf5</requestId> + <serviceInstanceId>a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb</serviceInstanceId> + </msoRequest> + <tenantId>1bbab536a19b4756926e7d0ec1eb543c</tenantId> + <volumeGroupCreated>true</volumeGroupCreated> + <volumeGroupId>78987</volumeGroupId> + <volumeGroupStackId>ZRDM1MMSC01_base_vol/7f74e5e1-5fc1-4593-ac7e-cc9899a106ef</volumeGroupStackId> + </volumeGroupRollback> + <volumeGroupStackId>testHeatStackId1</volumeGroupStackId> +</createVolumeGroupResponse> diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/DeleteVfModuleVolumeCallbackResponse.xml b/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/DeleteVfModuleVolumeCallbackResponse.xml new file mode 100644 index 0000000000..25aa45afd9 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/DeleteVfModuleVolumeCallbackResponse.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<deleteVolumeGroupResponse> + <messageId>{{MESSAGE-ID}}</messageId> + <volumeGroupDeleted>true</volumeGroupDeleted> +</deleteVolumeGroupResponse> diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml b/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml new file mode 100644 index 0000000000..b5b61192f7 --- /dev/null +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/VfModularity/VNFAdapterRestDeleteResponse.xml @@ -0,0 +1,56 @@ +<deleteVfModuleResponse> + <messageId>testMessageId</messageId> + <vfModuleDeleted>true</vfModuleDeleted> + <vfModuleId>testVfModuleId</vfModuleId> + <vfModuleOutputs> + <entry> + <key>key1</key> + <value>value1</value> + </entry> + <entry> + <key>key2</key> + <value>value2</value> + </entry> + <entry> + <key>server1_private_ip</key> + <value>192.168.28.3</value> + </entry> + <entry> + <key>contrail-service-instance-fqdn</key> + <value>default-domain:MSOTest:MsoNW-RA</value> + </entry> + <entry> + <key>policyKey1_contrail_network_policy_fqdn</key> + <value>MSOTest:DefaultPolicyFQDN1</value> + </entry> + <entry> + <key>policyKey2_contrail_network_policy_fqdn</key> + <value>MSOTest:DefaultPolicyFQDN2</value> + </entry> + <entry> + <key>oam_management_v6_address</key> + <value>2000:abc:bce:1111</value> + </entry> + <entry> + <key>oam_management_v4_address</key> + <value>127.0.0.1</value> + </entry> + <entry> + <key>internal_security_group</key> + <value>test_internal_security_group</value> + </entry> + <entry> + <key>int_internal_net_id</key> + <value>test_int_internal_net_id</value> + </entry> + <entry> + <key>dsx_server_group_id</key> + <value>test_dsx_server_group_id</value> + </entry> + <entry> + <key>mcas_host_key</key> + <value>test_mcas_host_key</value> + </entry> + </vfModuleOutputs> + <vnfId>testVnfId</vnfId> +</deleteVfModuleResponse>
\ No newline at end of file diff --git a/bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml b/bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml index ac8446cbb9..8a3ce7f099 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml +++ b/bpmn/so-bpmn-tasks/src/test/resources/application-test.yaml @@ -31,6 +31,9 @@ log: vnfAdapterRestV1: 'true' mso: adapters: + requestDb: + auth: Basic YnBlbDptc28tZGItMTUwNyE= + endpoint: http://localhost:8081 completemsoprocess: endpoint: http://localhost:${wiremock.server.port}/CompleteMsoProcess db: |