Primary and secondary nucleation of the transition between the A and B phases of superfluid 3He