class BBInputSetup implements JavaDelegate {

    protected GeneralBuildingBlock getGBBALaCarteService(ExecuteBuildingBlock executeBB, RequestDetails requestDetails,
            Map<ResourceKey, String> lookupKeyMap, String requestAction, String resourceId) throws Exception {
        Customer customer = getCustomerAndServiceSubscription(requestDetails, resourceId);
        if (customer != null) {
            Project project = null;
            OwningEntity owningEntity = null;

            if (requestDetails.getProject() != null)
                project = mapperLayer.mapRequestProject(requestDetails.getProject());
            if (requestDetails.getOwningEntity() != null)
                owningEntity = mapperLayer.mapRequestOwningEntity(requestDetails.getOwningEntity());

            Service service =
                    bbInputSetupUtils.getCatalogServiceByModelUUID(requestDetails.getModelInfo().getModelVersionId());
            if (service == null) {
                service = bbInputSetupUtils.getCatalogServiceByModelVersionAndModelInvariantUUID(
                        requestDetails.getModelInfo().getModelVersion(),
                        requestDetails.getModelInfo().getModelInvariantId());
                if (service == null) {
                    throw new Exception("Could not find service for model version Id: "
                            + requestDetails.getModelInfo().getModelVersionId() + " and for model invariant Id: "
                            + requestDetails.getModelInfo().getModelInvariantId());
                }
            }
            ServiceInstance serviceInstance = this.getALaCarteServiceInstance(service, requestDetails, customer,
                    project, owningEntity, lookupKeyMap, resourceId, Boolean.TRUE.equals(executeBB.isaLaCarte()),
                    executeBB.getBuildingBlock().getBpmnFlowName());
            BBInputSetupParameter parameter = new BBInputSetupParameter.Builder().setRequestDetails(requestDetails)
                    .setServiceInstance(serviceInstance).setExecuteBB(executeBB).setRequestAction(requestAction)
                    .setCustomer(customer).build();
            return this.populateGBBWithSIAndAdditionalInfo(parameter);
        } else {
            throw new Exception("Could not find customer");
        }
    }

}