aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java16
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowProcessorException.java19
2 files changed, 28 insertions, 7 deletions
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..67fb6a6f37 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
@@ -346,13 +346,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;
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..768bee578c
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowProcessorException.java
@@ -0,0 +1,19 @@
+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;
+ }
+}