+ protected GeneralBuildingBlock getGBBRanSlicing(ExecuteBuildingBlock executeBB, RequestDetails requestDetails,
+ Map<ResourceKey, String> lookupKeyMap, String requestAction, String resourceId) throws Exception {
+ org.onap.aai.domain.yang.ServiceInstance serviceInstanceAAI = null;
+ String serviceInstanceId = lookupKeyMap.get(ResourceKey.SERVICE_INSTANCE_ID);
+
+ executeBB.setHoming(true);
+ Customer customer = new Customer();
+
+ String subscriberId = executeBB.getRequestDetails().getSubscriberInfo().getGlobalSubscriberId();
+ customer.setGlobalCustomerId(subscriberId);
+
+ String subscriberName = executeBB.getRequestDetails().getSubscriberInfo().getSubscriberName();
+ customer.setSubscriberName(subscriberName);
+
+ String subscriptionType = executeBB.getRequestDetails().getRequestParameters().getSubscriptionServiceType();
+
+ ServiceSubscription serviceSubscription = new ServiceSubscription();
+ serviceSubscription.setServiceType(subscriptionType);
+
+ customer.setServiceSubscription(serviceSubscription);
+
+ String bbName = executeBB.getBuildingBlock().getBpmnFlowName();
+
+ serviceInstanceAAI = getServiceInstanceAAI(requestDetails, customer, serviceInstanceId, false, bbName);
+
+ ServiceInstance serviceInstance = new ServiceInstance();
+ serviceInstance.setServiceInstanceId(serviceInstanceId);
+ logger.debug(">>>>> serviceInstanceAAI: {}", serviceInstanceAAI);
+ if (serviceInstanceAAI != null) {
+ String modelVersionId = serviceInstanceAAI.getModelVersionId();
+
+ Service service = bbInputSetupUtils.getCatalogServiceByModelUUID(modelVersionId);
+
+ // Check if there is any existing method for mapping
+ String modelInvariantId = serviceInstanceAAI.getModelInvariantId();
+ String modelVersion = service.getModelVersion();
+ String serviceType = service.getServiceType();
+ String serviceRole = service.getServiceRole();
+ String controllerActor = service.getControllerActor();
+ String blueprintName = service.getBlueprintName();
+ String blueprintVersion = service.getBlueprintVersion();
+
+ ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
+ modelInfoServiceInstance.setServiceType(serviceType);
+ modelInfoServiceInstance.setServiceRole(serviceRole);
+ modelInfoServiceInstance.setControllerActor(controllerActor);
+ modelInfoServiceInstance.setBlueprintName(blueprintName);
+ modelInfoServiceInstance.setBlueprintVersion(blueprintVersion);
+ modelInfoServiceInstance.setModelInvariantUuid(modelInvariantId);
+ modelInfoServiceInstance.setModelUuid(modelVersionId);
+ modelInfoServiceInstance.setModelVersion(modelVersion);
+
+ serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
+ }
+ BBInputSetupParameter parameter = new BBInputSetupParameter.Builder().setRequestDetails(requestDetails)
+ .setServiceInstance(serviceInstance).setExecuteBB(executeBB).setRequestAction(requestAction)
+ .setCustomer(customer).build();
+ return this.populateGBBWithSIAndAdditionalInfo(parameter);
+
+ }
+