Auto close phase a PM when every related CM closed

I'm using HPSM 9.30 without Process Designer.

How can i Auto close phase a PM when every related CM closed