I was exploring the event architecture to see if it would work for me when I found something that might be a bug... but it might also be by design so I'm posting it here.
The code for the EntityIdentityInsertAction / EntityUpdateAction / EntityDelete action appears to function in this method for the Execution of the actual action:
Execute()
{
bool veto = PreAction(); //where Action is Insert/Update/Delete
if(!veto)
PerformTheActualAction();
//other function calls ommitted for brevity
PostAction();
}
This means that even if the PreAction() approves a veto the PostAction will still be called.
It seems to me that these should only be called if the action isn't vetoed -- if the action actually happens. But perhaps there's a good reason for them to always be called that I can't think of.
-Will