class WorkflowAction {

    protected List<Resource> sortVfModulesByBaseFirst(List<Resource> vfModuleResources) {
        int count = 0;
        for (Resource resource : vfModuleResources) {
            if (resource.isBaseVfModule()) {
                Collections.swap(vfModuleResources, 0, count);
                break;
            }
            count++;
        }
        return vfModuleResources;
    }

}