Add the query to AAI for SI with customer info 17/74517/2
authorKalkere Ramesh, Sharan (sk720x) <sk720x@att.com>
Tue, 11 Dec 2018 16:52:11 +0000 (11:52 -0500)
committerKalkere Ramesh, Sharan (sk720x) <sk720x@att.com>
Wed, 12 Dec 2018 15:14:14 +0000 (10:14 -0500)
added in the same block of code to getSIHelper method

Change-Id: I512898d86b5bfd10d1cbbdfeaaa5f2b8cf71510a
Issue-ID: SO-1326
Signed-off-by: Kalkere Ramesh, Sharan (sk720x) <sk720x@att.com>
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java

index b794e41..985b53d 100644 (file)
@@ -1285,7 +1285,12 @@ public class BBInputSetup implements JavaDelegate {
                                        .getAAIServiceInstanceByName(requestDetails.getRequestInfo().getInstanceName(), customer);
                        }
                        if (serviceInstanceId != null && serviceInstanceAAI == null) {
-                               serviceInstanceAAI = bbInputSetupUtils.getAAIServiceInstanceById(serviceInstanceId);
+                               if(customer != null && customer.getServiceSubscription() != null) {
+                                       serviceInstanceAAI = bbInputSetupUtils.getAAIServiceInstanceByIdAndCustomer(customer.getGlobalCustomerId(), 
+                                                       customer.getServiceSubscription().getServiceType(), serviceInstanceId);
+                               } else {
+                                       serviceInstanceAAI = bbInputSetupUtils.getAAIServiceInstanceById(serviceInstanceId);
+                               }
                        }
                        if (serviceInstanceAAI != null) {
                                lookupKeyMap.put(ResourceKey.SERVICE_INSTANCE_ID, serviceInstanceId);