aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/WorkflowResourceIds.java21
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/BadResponseException.java42
3 files changed, 23 insertions, 46 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/WorkflowResourceIds.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/WorkflowResourceIds.java
index e8be2734cc..508709e12c 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/WorkflowResourceIds.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/WorkflowResourceIds.java
@@ -41,14 +41,33 @@ public class WorkflowResourceIds implements Serializable {
private String configurationId;
private String instanceGroupId;
+
+ public WorkflowResourceIds() {
+ super();
+ }
+
+ public WorkflowResourceIds(WorkflowResourceIds workflowResourceIds) {
+ this.serviceInstanceId = workflowResourceIds.serviceInstanceId;
+ this.pnfId = workflowResourceIds.pnfId;
+ this.vnfId = workflowResourceIds.vnfId;
+ this.networkId = workflowResourceIds.networkId;
+ this.volumeGroupId = workflowResourceIds.volumeGroupId;
+ this.vfModuleId = workflowResourceIds.vfModuleId;
+ this.networkCollectionId = workflowResourceIds.networkCollectionId;
+ this.configurationId = workflowResourceIds.configurationId;
+ this.instanceGroupId = workflowResourceIds.instanceGroupId;
+ }
+
+
@Override
public String toString() {
return new ToStringBuilder(this).append("serviceInstanceId", serviceInstanceId).append("pnfId", pnfId)
.append("vnfId", vnfId).append("networkId", networkId).append("volumeGroupId", volumeGroupId)
.append("vfModuleId", vfModuleId).append("networkCollectionId", networkCollectionId)
- .append("configurationId", configurationId).toString();
+ .append("configurationId", configurationId).append("instanceGroupId", instanceGroupId).toString();
}
+
public String getServiceInstanceId() {
return serviceInstanceId;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
index 5a52e3a49d..4206596c94 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java
@@ -104,7 +104,7 @@ public class ExecuteBuildingBlockRainyDay {
handlingCode = "Abort";
} else {
try {
- if (gBBInput.getCustomer().getServiceSubscription() != null) {
+ if (gBBInput.getCustomer() != null && gBBInput.getCustomer().getServiceSubscription() != null) {
serviceType = gBBInput.getCustomer().getServiceSubscription().getServiceInstances().get(0)
.getModelInfoServiceInstance().getServiceType();
}
@@ -119,7 +119,7 @@ public class ExecuteBuildingBlockRainyDay {
String vnfType = ASTERISK;
String vnfName = ASTERISK;
try {
- if (gBBInput.getCustomer().getServiceSubscription() != null) {
+ if (gBBInput.getCustomer() != null && gBBInput.getCustomer().getServiceSubscription() != null) {
for (GenericVnf vnf : gBBInput.getCustomer().getServiceSubscription().getServiceInstances()
.get(0).getVnfs()) {
if (vnf.getVnfId().equalsIgnoreCase(lookupKeyMap.get(ResourceKey.GENERIC_VNF_ID))) {
@@ -173,7 +173,7 @@ public class ExecuteBuildingBlockRainyDay {
String serviceRole = ASTERISK;
try {
- if (gBBInput.getCustomer().getServiceSubscription() != null) {
+ if (gBBInput.getCustomer() != null && gBBInput.getCustomer().getServiceSubscription() != null) {
serviceRole = gBBInput.getCustomer().getServiceSubscription().getServiceInstances().get(0)
.getModelInfoServiceInstance().getServiceRole();
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/BadResponseException.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/BadResponseException.java
deleted file mode 100644
index 7b1066d48c..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/BadResponseException.java
+++ /dev/null
@@ -1,42 +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.exception;
-
-public class BadResponseException extends Exception {
-
- String responseCode;
-
- public BadResponseException() {}
-
- public BadResponseException(String message) {
- super(message);
- }
-
- public BadResponseException(String message, String responseCode) {
- super(message);
- this.responseCode = responseCode;
- }
-
- public String getResponseCode() {
- return responseCode;
- }
-
-}