From 3d09d109e0a3548281f68ec8656cbea26e874f47 Mon Sep 17 00:00:00 2001 From: "Kalkere Ramesh, Sharan (sk720x)" Date: Tue, 11 Dec 2018 10:50:04 -0500 Subject: fix lookup of si if customer exists fix lookup of service instance in aai if customer exists remove the unwanted mock in the bb input setup test Change-Id: I12a666fef771c127a69eef254228753204cadd73 Issue-ID: SO-1321 Signed-off-by: Kalkere Ramesh, Sharan (sk720x) --- .../onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src/main/java') 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 b794e4174b..513a19be0a 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 @@ -865,8 +865,13 @@ public class BBInputSetup implements JavaDelegate { String serviceInstanceId, boolean aLaCarte, String bbName) throws Exception { ServiceInstance serviceInstance = this.getServiceInstanceHelper(requestDetails, customer, project, owningEntity, lookupKeyMap, serviceInstanceId, aLaCarte, service, bbName); - org.onap.aai.domain.yang.ServiceInstance serviceInstanceAAI = this.bbInputSetupUtils - .getAAIServiceInstanceById(serviceInstanceId); + org.onap.aai.domain.yang.ServiceInstance serviceInstanceAAI = null; + if(customer != null && customer.getServiceSubscription() != null) { + serviceInstanceAAI = bbInputSetupUtils.getAAIServiceInstanceByIdAndCustomer(customer.getGlobalCustomerId(), + customer.getServiceSubscription().getServiceType(), serviceInstanceId); + } else { + serviceInstanceAAI = bbInputSetupUtils.getAAIServiceInstanceById(serviceInstanceId); + } if (serviceInstanceAAI != null && !serviceInstanceAAI.getModelVersionId().equalsIgnoreCase(service.getModelUUID())) { Service tempService = this.bbInputSetupUtils -- cgit 1.2.3-korg