class WorkflowAction {

    protected List<ExecuteBuildingBlock> getConfigBuildingBlocks(ConfigBuildingBlocksDataObject dataObj)
            throws Exception {

        List<ExecuteBuildingBlock> flowsToExecuteConfigs = new ArrayList<>();
        List<OrchestrationFlow> result = dataObj.getOrchFlows().stream()
                .filter(item -> item.getFlowName().contains(FABRIC_CONFIGURATION)).collect(Collectors.toList());
        String vnfId = dataObj.getWorkflowResourceIds().getVnfId();
        String vfModuleId = dataObj.getWorkflowResourceIds().getVfModuleId();

        String vnfCustomizationUUID = bbInputSetupUtils.getAAIGenericVnf(vnfId).getModelCustomizationId();
        String vfModuleCustomizationUUID;
        org.onap.aai.domain.yang.VfModule aaiVfModule = bbInputSetupUtils.getAAIVfModule(vnfId, vfModuleId);

        if (aaiVfModule == null) {
            logger.error("No matching VfModule is found in Generic-Vnf in AAI for vnfId: {} and vfModuleId : {}", vnfId,
                    vfModuleId);
            throw new AAIEntityNotFoundException("No matching VfModule is found in Generic-Vnf in AAI for vnfId: "
                    + vnfId + " and vfModuleId : " + vfModuleId);
        } else {
            vfModuleCustomizationUUID = aaiVfModule.getModelCustomizationId();
        }

        List<org.onap.aai.domain.yang.Vnfc> vnfcs =
                getRelatedResourcesInVfModule(vnfId, vfModuleId, org.onap.aai.domain.yang.Vnfc.class, Types.VNFC);
        for (org.onap.aai.domain.yang.Vnfc vnfc : vnfcs) {
            WorkflowResourceIds workflowIdsCopy = SerializationUtils.clone(dataObj.getWorkflowResourceIds());
            org.onap.aai.domain.yang.Configuration configuration =
                    getRelatedResourcesInVnfc(vnfc, org.onap.aai.domain.yang.Configuration.class, Types.CONFIGURATION);
            if (configuration == null) {
                logger.warn(String.format("No configuration found for VNFC %s in AAI", vnfc.getVnfcName()));
                continue;
            }
            workflowIdsCopy.setConfigurationId(configuration.getConfigurationId());
            for (OrchestrationFlow orchFlow : result) {
                dataObj.getResourceKey().setVfModuleCustomizationId(vfModuleCustomizationUUID);
                dataObj.getResourceKey().setCvnfModuleCustomizationId(vnfc.getModelCustomizationId());
                dataObj.getResourceKey().setVnfCustomizationId(vnfCustomizationUUID);
                String vnfcName = vnfc.getVnfcName();
                if (vnfcName == null || vnfcName.isEmpty()) {
                    buildAndThrowException(dataObj.getExecution(), "Exception in create execution list "
                            + ": VnfcName does not exist or is null while there is a configuration for the vfModule",
                            new Exception("Vnfc and Configuration do not match"));
                }
                ExecuteBuildingBlock ebb = buildExecuteBuildingBlock(orchFlow, dataObj.getRequestId(),
                        dataObj.getResourceKey(), dataObj.getApiVersion(), dataObj.getResourceId(),
                        dataObj.getRequestAction(), dataObj.isaLaCarte(), dataObj.getVnfType(), workflowIdsCopy,
                        dataObj.getRequestDetails(), false, null, vnfcName, true, null);
                flowsToExecuteConfigs.add(ebb);
            }
        }
        return flowsToExecuteConfigs;
    }

}