diff options
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
7 files changed, 220 insertions, 235 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy index 00bd8e9ef8..9e71313e09 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AbstractServiceTaskProcessor.groovy @@ -694,32 +694,6 @@ public abstract class AbstractServiceTaskProcessor implements ServiceTaskProcess } /** - * Constructs a workflow message callback URL for the specified message type and correlator. - * This type of callback URL is used when a workflow wants an MSO adapter (like the SDNC - * adapter) to call it back. In other words, this is for callbacks internal to the MSO - * complex. Use <code>createWorkflowMessageAdapterCallbackURL</code> if the callback - * will come from outside the MSO complex. - * @param endpoint endpoint address to contruct URL from - * @param messageType the message type (e.g. SDNCAResponse or VNFAResponse) - * @param correlator the correlator value (e.g. a request ID) - */ - public String createCallbackURL(String endpoint, String messageType, String correlator) { - if (endpoint == null || endpoint.isEmpty()) { - ExceptionUtil exceptionUtil = new ExceptionUtil() - exceptionUtil.buildAndThrowWorkflowException(execution, 2000, - 'mso:workflow:message:endpoint was not passed in') - } - - while (endpoint.endsWith('/')) { - endpoint = endpoint.substring(0, endpoint.length()-1) - } - - return endpoint + - '/' + UriUtils.encodePathSegment(messageType, 'UTF-8') + - '/' + UriUtils.encodePathSegment(correlator, 'UTF-8') - } - - /** * * Constructs a workflow message callback URL for the specified message type and correlator. * This type of callback URL is used when a workflow wants a system outside the MSO complex 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 aa0d8ace6a..533df72285 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 @@ -41,6 +41,7 @@ import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.json.JSONArray import org.json.JSONObject +import org.springframework.web.util.UriUtils import static org.onap.so.bpmn.common.scripts.GenericUtils.* @@ -338,4 +339,37 @@ class OofHoming extends AbstractServiceTaskProcessor { */ public void preProcessRequest(DelegateExecution execution) {} // Not Implemented Method + + /** + * Constructs a workflow message callback URL for the specified message type and correlator. + * This type of callback URL is used when a workflow wants an MSO adapter (like the SDNC + * adapter) to call it back. In other words, this is for callbacks internal to the MSO + * complex. Use <code>createWorkflowMessageAdapterCallbackURL</code> if the callback + * will come from outside the MSO complex. + * @param endpoint endpoint address to contruct URL from + * @param messageType the message type (e.g. SDNCAResponse or VNFAResponse) + * @param correlator the correlator value (e.g. a request ID) + */ + public String createHomingCallbackURL(String endpoint, String messageType, String correlator) { + try { + if (endpoint == null || endpoint.isEmpty()) { + ExceptionUtil exceptionUtil = new ExceptionUtil() + exceptionUtil.buildAndThrowWorkflowException(execution, 2000, + 'mso:workflow:message:endpoint was not passed in') + } + + utils.log("DEBUG", "passed in endpoint: " + endpoint + " *****", "true") + + while (endpoint.endsWith('/')) { + endpoint = endpoint.substring(0, endpoint.length() - 1) + } + utils.log("DEBUG", "processed endpoint: " + endpoint + " *****", "true") + + return endpoint + + '/' + UriUtils.encodePathSegment(messageType, 'UTF-8') + + '/' + UriUtils.encodePathSegment(correlator, 'UTF-8') + } catch (Exception ex) { + utils.log("DEBUG", "createCallbackURL Exception: " + ex + " *****", "true") + } + } } 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 b1da7cf49b..197589efa1 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 @@ -89,138 +89,148 @@ class OofUtils { utils.log("DEBUG", "Started Building OOF Request", isDebugEnabled) String callbackEndpoint = UrnPropertiesReader.getVariable("mso.oof.callbackEndpoint", execution) utils.log("DEBUG", "mso.oof.callbackEndpoint is: " + callbackEndpoint, isDebugEnabled) - def callbackUrl = utils.createWorkflowMessageAdapterCallbackURL(callbackEndpoint, "oofResponse", requestId) - def transactionId = requestId - //ServiceInstance Info - ServiceInstance serviceInstance = decomposition.getServiceInstance() - def serviceInstanceId = "" - def serviceName = "" - - serviceInstanceId = execution.getVariable("serviceInstanceId") - 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(\"serviceInstanceId\") is null") - } - if (serviceName == null || serviceName == "null") { - utils.log("DEBUG", "Unable to obtain Service Name", isDebugEnabled) - exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - Unable to " + - "obtain Service Name, execution.getVariable(\"subscriptionServiceType\") is null") - } - //Model Info - ModelInfo model = decomposition.getModelInfo() - String modelType = model.getModelType() - String modelInvariantId = model.getModelInvariantUuid() - String modelVersionId = model.getModelUuid() - String modelName = model.getModelName() - String modelVersion = model.getModelVersion() - //Subscriber Info - String subscriberId = "" - String subscriberName = "" - String commonSiteId = "" - if (subscriber != null){ - subscriberId = subscriber.getGlobalId() - subscriberName = subscriber.getName() - commonSiteId = subscriber.getCommonSiteId() - } - - //Determine RequestType - //TODO Figure out better way to determine this - String requestType = "create" - List<Resource> resources = decomposition.getServiceResources() - for(Resource r:resources){ - HomingSolution currentSolution = (HomingSolution) r.getCurrentHomingSolution() - if(currentSolution != null){ - requestType = "speed changed" + try { + def callbackUrl = utils.createHomingCallbackURL(callbackEndpoint, "oofResponse", requestId) + utils.log("DEBUG", "callbackUrl is: " + callbackUrl, isDebugEnabled) + + + def transactionId = requestId + utils.log("DEBUG", "transactionId is: " + transactionId, isDebugEnabled) + //ServiceInstance Info + ServiceInstance serviceInstance = decomposition.getServiceInstance() + def serviceInstanceId = "" + def serviceName = "" + + serviceInstanceId = execution.getVariable("serviceInstanceId") + utils.log("DEBUG", "serviceInstanceId is: " + serviceInstanceId, isDebugEnabled) + serviceName = execution.getVariable("subscriptionServiceType") + utils.log("DEBUG", "serviceName is: " + serviceName, isDebugEnabled) + + 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(\"serviceInstanceId\") is null") + } + if (serviceName == null || serviceName == "null") { + utils.log("DEBUG", "Unable to obtain Service Name", isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - Unable to " + + "obtain Service Name, execution.getVariable(\"subscriptionServiceType\") is null") + } + //Model Info + ModelInfo model = decomposition.getModelInfo() + utils.log("DEBUG", "ModelInfo: " + model.toString(), isDebugEnabled) + String modelType = model.getModelType() + String modelInvariantId = model.getModelInvariantUuid() + String modelVersionId = model.getModelUuid() + String modelName = model.getModelName() + String modelVersion = model.getModelVersion() + //Subscriber Info + String subscriberId = "" + String subscriberName = "" + String commonSiteId = "" + if (subscriber != null) { + subscriberId = subscriber.getGlobalId() + subscriberName = subscriber.getName() + commonSiteId = subscriber.getCommonSiteId() } - } - //Demands - String placementDemands = "" - StringBuilder sb = new StringBuilder() - List<AllottedResource> allottedResourceList = decomposition.getAllottedResources() - List<VnfResource> vnfResourceList = decomposition.getVnfResources() + //Determine RequestType + //TODO Figure out better way to determine this + String requestType = "create" + List<Resource> resources = decomposition.getServiceResources() + for (Resource r : resources) { + HomingSolution currentSolution = (HomingSolution) r.getCurrentHomingSolution() + if (currentSolution != null) { + requestType = "speed changed" + } + } - if (allottedResourceList == null || allottedResourceList.isEmpty() ) { - utils.log("DEBUG", "Allotted Resources List is empty - will try to get service VNFs instead.", - isDebugEnabled) - allottedResourceList = decomposition.getVnfResources() - } + //Demands + String placementDemands = "" + StringBuilder sb = new StringBuilder() + List<AllottedResource> allottedResourceList = decomposition.getAllottedResources() + List<VnfResource> vnfResourceList = decomposition.getVnfResources() - if (allottedResourceList == null || allottedResourceList.isEmpty()) { - utils.log("DEBUG", "Resources List is Empty", isDebugEnabled) - } else { - for (AllottedResource resource : allottedResourceList) { - utils.log("DEBUG", "Allotted Resource: " + resource.toString(), + if (allottedResourceList == null || allottedResourceList.isEmpty()) { + utils.log("DEBUG", "Allotted Resources List is empty - will try to get service VNFs instead.", isDebugEnabled) - def serviceResourceId = resource.getResourceId() - 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( - existingCandidates, - excludedCandidates, - requiredCandidates) - - String demand = - " {\n" + - " \"resourceModuleName\": \"${resourceModelName}\",\n" + - " \"serviceResourceId\": \"${serviceResourceId}\",\n" + - " \"tenantId\": \"${tenantId}\",\n" + - " \"resourceModelInfo\": {\n" + - " \"modelInvariantId\": \"${resourceModelInvariantId}\",\n" + - " \"modelVersionId\": \"${resourceModelVersionId}\",\n" + - " \"modelName\": \"${resourceModelName}\",\n" + - " \"modelType\": \"${resourceModelType}\",\n" + - " \"modelVersion\": \"${resourceModelVersion}\",\n" + - " \"modelCustomizationName\": \"\"\n" + - " }" + requiredCandidatesJson + "\n" + - " }," - - placementDemands = sb.append(demand) + } else { + for (AllottedResource resource : allottedResourceList) { + utils.log("DEBUG", "Allotted Resource: " + resource.toString(), + isDebugEnabled) + def serviceResourceId = resource.getResourceId() + 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( + existingCandidates, + excludedCandidates, + requiredCandidates) + + String demand = + " {\n" + + " \"resourceModuleName\": \"${resourceModelName}\",\n" + + " \"serviceResourceId\": \"${serviceResourceId}\",\n" + + " \"tenantId\": \"${tenantId}\",\n" + + " \"resourceModelInfo\": {\n" + + " \"modelInvariantId\": \"${resourceModelInvariantId}\",\n" + + " \"modelVersionId\": \"${resourceModelVersionId}\",\n" + + " \"modelName\": \"${resourceModelName}\",\n" + + " \"modelType\": \"${resourceModelType}\",\n" + + " \"modelVersion\": \"${resourceModelVersion}\",\n" + + " \"modelCustomizationName\": \"\"\n" + + " }" + requiredCandidatesJson + "\n" + + " }," + + placementDemands = sb.append(demand) + } } - for (VnfResource vnfResource : vnfResourceList) { - utils.log("DEBUG", "VNF Resource: " + vnfResource.toString(), + + if (vnfResourceList == null || vnfResourceList.isEmpty()) { + utils.log("DEBUG", "VNF Resources List is empty", isDebugEnabled) - ModelInfo vnfResourceModelInfo = vnfResource.getModelInfo() - def serviceResourceId = vnfResource.getResourceId() - def resourceModelInvariantId = vnfResourceModelInfo.getModelInvariantUuid() - def resourceModelName = vnfResourceModelInfo.getModelName() - def resourceModelVersion = vnfResourceModelInfo.getModelVersion() - def resourceModelVersionId = vnfResourceModelInfo.getModelUuid() - def resourceModelType = vnfResourceModelInfo.getModelType() - def tenantId = execution.getVariable("tenantId") - def requiredCandidatesJson = "" - - - String placementDemand = - " {\n" + - " \"resourceModuleName\": \"${resourceModelName}\",\n" + - " \"serviceResourceId\": \"${serviceResourceId}\",\n" + - " \"tenantId\": \"${tenantId}\",\n" + - " \"resourceModelInfo\": {\n" + - " \"modelInvariantId\": \"${resourceModelInvariantId}\",\n" + - " \"modelVersionId\": \"${resourceModelVersionId}\",\n" + - " \"modelName\": \"${resourceModelName}\",\n" + - " \"modelType\": \"${resourceModelType}\",\n" + - " \"modelVersion\": \"${resourceModelVersion}\",\n" + - " \"modelCustomizationName\": \"\"\n" + - " }" + requiredCandidatesJson + "\n" + - " }," - - placementDemands = sb.append(placementDemand) + } else { + + for (VnfResource vnfResource : vnfResourceList) { + utils.log("DEBUG", "VNF Resource: " + vnfResource.toString(), + isDebugEnabled) + ModelInfo vnfResourceModelInfo = vnfResource.getModelInfo() + def serviceResourceId = vnfResource.getResourceId() + def resourceModelInvariantId = vnfResourceModelInfo.getModelInvariantUuid() + def resourceModelName = vnfResourceModelInfo.getModelName() + def resourceModelVersion = vnfResourceModelInfo.getModelVersion() + def resourceModelVersionId = vnfResourceModelInfo.getModelUuid() + def resourceModelType = vnfResourceModelInfo.getModelType() + def tenantId = execution.getVariable("tenantId") + def requiredCandidatesJson = "" + + + String placementDemand = + " {\n" + + " \"resourceModuleName\": \"${resourceModelName}\",\n" + + " \"serviceResourceId\": \"${serviceResourceId}\",\n" + + " \"tenantId\": \"${tenantId}\",\n" + + " \"resourceModelInfo\": {\n" + + " \"modelInvariantId\": \"${resourceModelInvariantId}\",\n" + + " \"modelVersionId\": \"${resourceModelVersionId}\",\n" + + " \"modelName\": \"${resourceModelName}\",\n" + + " \"modelType\": \"${resourceModelType}\",\n" + + " \"modelVersion\": \"${resourceModelVersion}\",\n" + + " \"modelCustomizationName\": \"\"\n" + + " }" + requiredCandidatesJson + "\n" + + " }," + + placementDemands = sb.append(placementDemand) + } + placementDemands = placementDemands.substring(0, placementDemands.length() - 1) } - placementDemands = placementDemands.substring(0, placementDemands.length() - 1) - } - /* Commenting Out Licensing as OOF doesn't support for Beijing + /* Commenting Out Licensing as OOF doesn't support for Beijing String licenseDemands = "" sb = new StringBuilder() if (vnfResourceList.isEmpty() || vnfResourceList == null) { @@ -265,50 +275,53 @@ class OofUtils { licenseDemands = licenseDemands.substring(0, licenseDemands.length() - 1) }*/ - String request = - "{\n" + - " \"requestInfo\": {\n" + - " \"transactionId\": \"${transactionId}\",\n" + - " \"requestId\": \"${requestId}\",\n" + - " \"callbackUrl\": \"${callbackUrl}\",\n" + - " \"sourceId\": \"so\",\n" + - " \"requestType\": \"${requestType}\"," + - " \"numSolutions\": 1,\n" + - " \"optimizers\": [\"placement\"],\n" + - " \"timeout\": 600\n" + - " },\n" + - " \"placementInfo\": {\n" + - " \"requestParameters\": {\n" + - " \"customerLatitude\": \"${customerLocation.customerLatitude}\",\n" + - " \"customerLongitude\": \"${customerLocation.customerLongitude}\",\n" + - " \"customerName\": \"${customerLocation.customerName}\"\n" + - " }," + - " \"subscriberInfo\": { \n" + - " \"globalSubscriberId\": \"${subscriberId}\",\n" + - " \"subscriberName\": \"${subscriberName}\",\n" + - " \"subscriberCommonSiteId\": \"${commonSiteId}\"\n" + - " },\n" + - " \"placementDemands\": [\n" + - " ${placementDemands}\n" + - " ]\n" + - " },\n" + - " \"serviceInfo\": {\n" + - " \"serviceInstanceId\": \"${serviceInstanceId}\",\n" + - " \"serviceName\": \"${serviceName}\",\n" + - " \"modelInfo\": {\n" + - " \"modelType\": \"${modelType}\",\n" + - " \"modelInvariantId\": \"${modelInvariantId}\",\n" + - " \"modelVersionId\": \"${modelVersionId}\",\n" + - " \"modelName\": \"${modelName}\",\n" + - " \"modelVersion\": \"${modelVersion}\",\n" + - " \"modelCustomizationName\": \"\"\n" + - " }\n" + - " }\n" + - "}" - - - utils.log("DEBUG", "Completed Building OOF Request", isDebugEnabled) - return request + String request = + "{\n" + + " \"requestInfo\": {\n" + + " \"transactionId\": \"${transactionId}\",\n" + + " \"requestId\": \"${requestId}\",\n" + + " \"callbackUrl\": \"${callbackUrl}\",\n" + + " \"sourceId\": \"so\",\n" + + " \"requestType\": \"${requestType}\"," + + " \"numSolutions\": 1,\n" + + " \"optimizers\": [\"placement\"],\n" + + " \"timeout\": 600\n" + + " },\n" + + " \"placementInfo\": {\n" + + " \"requestParameters\": {\n" + + " \"customerLatitude\": \"${customerLocation.customerLatitude}\",\n" + + " \"customerLongitude\": \"${customerLocation.customerLongitude}\",\n" + + " \"customerName\": \"${customerLocation.customerName}\"\n" + + " }," + + " \"subscriberInfo\": { \n" + + " \"globalSubscriberId\": \"${subscriberId}\",\n" + + " \"subscriberName\": \"${subscriberName}\",\n" + + " \"subscriberCommonSiteId\": \"${commonSiteId}\"\n" + + " },\n" + + " \"placementDemands\": [\n" + + " ${placementDemands}\n" + + " ]\n" + + " },\n" + + " \"serviceInfo\": {\n" + + " \"serviceInstanceId\": \"${serviceInstanceId}\",\n" + + " \"serviceName\": \"${serviceName}\",\n" + + " \"modelInfo\": {\n" + + " \"modelType\": \"${modelType}\",\n" + + " \"modelInvariantId\": \"${modelInvariantId}\",\n" + + " \"modelVersionId\": \"${modelVersionId}\",\n" + + " \"modelName\": \"${modelName}\",\n" + + " \"modelVersion\": \"${modelVersion}\",\n" + + " \"modelCustomizationName\": \"\"\n" + + " }\n" + + " }\n" + + "}" + + + utils.log("DEBUG", "Completed Building OOF Request", isDebugEnabled) + return request + } catch (Exception ex) { + utils.log("DEBUG", "buildRequest Exception: " + ex, isDebugEnabled) + } } /** diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/BuildingBlockExecution.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/BuildingBlockExecution.java index a2f6637b5b..1ffd9dd167 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/BuildingBlockExecution.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/BuildingBlockExecution.java @@ -34,4 +34,5 @@ public interface BuildingBlockExecution { public <T> T getRequiredVariable(String key) throws RequiredExecutionVariableExeception; public void setVariable(String key, Serializable value); public Map<ResourceKey, String> getLookupMap(); + public String getFlowToBeCalled(); } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/DelegateExecutionImpl.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/DelegateExecutionImpl.java index ef564c6af4..1c1d6b73fd 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/DelegateExecutionImpl.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/DelegateExecutionImpl.java @@ -97,6 +97,10 @@ public class DelegateExecutionImpl implements BuildingBlockExecution, Serializab return this.get("lookupKeyMap"); } + @Override + public String getFlowToBeCalled() { + return this.get("flowToBeCalled"); + } public DelegateExecution getDelegateExecution() { return this.execution; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/SpringContextHelper.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/SpringContextHelper.java deleted file mode 100644 index edc544d939..0000000000 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/SpringContextHelper.java +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * ============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; - -import org.springframework.beans.BeansException; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.stereotype.Component; - -@Component -public class SpringContextHelper implements ApplicationContextAware { - - private static ApplicationContext context; - - @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - context = applicationContext; - } - - public static ApplicationContext getAppContext() { - return context; - } -} 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 769d3e4e89..8cc25a2c52 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 @@ -571,7 +571,7 @@ public class BBInputSetup implements JavaDelegate { if (relatedInstanceList != null) { for (RelatedInstanceList relatedInstList : relatedInstanceList) { RelatedInstance relatedInstance = relatedInstList.getRelatedInstance(); - if (relatedInstance.getModelInfo().getModelType().equals(ModelType.networkCollection)) { + if (relatedInstance.getModelInfo().getModelType().equals(ModelType.networkInstanceGroup)) { instanceGroupModelInfo = relatedInstance.getModelInfo(); instanceGroupId = relatedInstance.getInstanceId(); } |