Generally, if you can batter them down by a certain proportion of their health (I assume it scales by difficulty) the Rulers will decide this isn't their day and create a portal. On their next action they head for this and escape to fight another day.
I was fortunate on my 2nd game with them and had a frost grenade ready right when the Viper king decided to do this, pinning him in place so I could keep stacking damage and killed him before he defrosted.