I think they have their minds made up way beforehand. Joe Massino turned to a former federal prosecutor as soon as jury rendered it's verdict and signaled that he wanted to talk. Also Sam Gravano saw that trial was not going to go well and flipped. Joe Valachi is only one I can think of who did some time, then turned on Mafia.