class MultiStageSkipListener implements FlowManipulator, PostCompletionRequestsDbListener {

    @Override
    public void run(List<ExecuteBuildingBlock> flowsToExecute, ExecuteBuildingBlock currentBB,
            BuildingBlockExecution execution) {
        String vfModuleId = currentBB.getResourceId();
        String vnfId = currentBB.getWorkflowResourceIds().getVnfId();
        org.onap.aai.domain.yang.VfModule vfModule = bbInputSetupUtils.getAAIVfModule(vnfId, vfModuleId);
        if (vfModule == null) {
            org.onap.aai.domain.yang.GenericVnf vnf = bbInputSetupUtils.getAAIGenericVnf(vnfId);
            if (vnf != null) {
                VnfResourceCustomization vnfCust = catalogDbClient
                        .getVnfResourceCustomizationByModelCustomizationUUID(vnf.getModelCustomizationId());
                if (vnfCust != null && vnfCust.getMultiStageDesign() != null
                        && vnfCust.getMultiStageDesign().equalsIgnoreCase("true")) {
                    flowsToExecute.retainAll(Collections.singletonList(currentBB));
                    execution.setVariable(G_MULTI_STAGE_DESIGN, Boolean.valueOf(vnfCust.getMultiStageDesign()));
                }
            }
        }

    }

}