In a large skillet set over moderately low heat, heat the oil until it is hot. Add the onion, red pepper and fennel and cook the vegetables, covered, stirring occasionally, for 5 minutes. Add the tomatoes, garlic, herbs, cannellini beans, salt and pepper to taste and simmer the mixture, covered, stirring occasionally, for 5 minutes more. Stir in the basil or parsley.
Meanwhile, cook the ravioli in boiling salted water until al dente. Drain and transfer to a serving dish. Top with sauce. Serve with freshly grated Parmesan.