Cancel does not trigger any microflows, Save will trigger the before and after commit of the objects being saved. However, i suggest using custom buttons to handle this kind of logic. You can set one of those buttons as the default cancel button (that is, it will be triggered when the user closes the form by any means).