What's your rule or theory on inviting exes (DH or DF... Not bf/gf) to your wedding IF you have had kids together?

Provided you're still fairly good mates and everything is good between you both and get on well despite the separation reasons