aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-08-13 11:58:37 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-13 11:58:37 +0000
commiteca03683aa4abd9230d2ca7c1ea4a4bfddba9bf7 (patch)
treec8b52b43230b2c37b7a0ee138439df3674391bec /bpmn/so-bpmn-infrastructure-common
parent5bd7a5cb8a769ce7b6fa89d8df1b1863d977666f (diff)
parentcf90f6988c717eb609f5da7d1aee04c668b21fe9 (diff)
Merge "Casablana bugfixes"
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy27
1 files changed, 15 insertions, 12 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
index 34a73bd35c..6b42406883 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
@@ -304,19 +304,22 @@ class DoUpdateVnfAndModules extends AbstractServiceTaskProcessor {
VnfResource vnfResource = (VnfResource) execution.getVariable("vnfResourceDecomposition")
List<ModuleResource> moduleResources = vnfResource.getVfModules()
- for (j in 0..moduleResources.size()-1) {
- ModelInfo modelInfo = moduleResources[j].getModelInfo()
- String modelInvariantUuidFromDecomposition = modelInfo.getModelInvariantUuid()
- msoLogger.debug("modelInvariantUuidFromDecomposition: " + modelInvariantUuidFromDecomposition)
-
- if (modelInvariantUuid.equals(modelInvariantUuidFromDecomposition)) {
- String vfModuleModelInfo = modelInfo.toJsonString()
- String vfModuleModelInfoValue = jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo")
- execution.setVariable("DUVAM_vfModuleModelInfo", vfModuleModelInfoValue)
- msoLogger.debug("vfModuleModelInfo: " + vfModuleModelInfoValue)
- break
+ if (moduleResources != null && !moduleResources.isEmpty()) {
+
+ for (j in 0..moduleResources.size()-1) {
+ ModelInfo modelInfo = moduleResources[j].getModelInfo()
+ String modelInvariantUuidFromDecomposition = modelInfo.getModelInvariantUuid()
+ msoLogger.debug("modelInvariantUuidFromDecomposition: " + modelInvariantUuidFromDecomposition)
+
+ if (modelInvariantUuid.equals(modelInvariantUuidFromDecomposition)) {
+ String vfModuleModelInfo = modelInfo.toJsonString()
+ String vfModuleModelInfoValue = jsonUtil.getJsonValue(vfModuleModelInfo, "modelInfo")
+ execution.setVariable("DUVAM_vfModuleModelInfo", vfModuleModelInfoValue)
+ msoLogger.debug("vfModuleModelInfo: " + vfModuleModelInfoValue)
+ break
+ }
+
}
-
}
}catch(Exception e){