Custom flow order change Exclusive gateways

Hi…
I want to custom changes flow order (switching from default sequence flow to a custom one) properties in exclusive gateways.How can I do it?

Any code snippet/tutorial link will be helpful.