How to call a Process task in an onsaving script or Template

I need to call a Send Mail task on saving of an object (or in the template). I need this to inform the admin that some objects don't satisfy the condition and that it needs their attention. However they dont need to be saved unitl then.

Can someone guide me on this please?

Thanks in advance

Kind Regards,

Nutan