In a previous Cool Solutions article (http://www.novell.com/coolsolutions/tip/19039.html) I strongly recommended that when using a Veto command to scope events, you need to limit it to the class of the object you are watching for.
Of course, there are always exceptions, and here is one that came to mind soon after.
Imagine an Identity Vault linked to Active Directory. When a delete in AD occurs, you probably do not want to always delete the user in the IDV, but maybe you want to disable them in the IDV just in case.
The rule below seems to make sense for handling this problem:
<description>Convert Deletes in AD to remove association in
<comment xml:space="preserve">Delete in AD means remove
association in IDV and disable the user in IDV.</comment>
<do-add-dest-attr-value direct="true" name="Login Disabled">
Basically, this rule checks if it is a User, and then if it is a Delete event. So I would probably put it in the Publisher Event Transform rule. And I would expect it to just work. But then, do it, and the User gets deleted in the IDV, gosh-darn it!
As usual in cases like this, we head off to our handy Dstrace. Man, where would we be without Dstrace?
Looking at the event that gets generated on an AD delete we see this:
<product version="18.104.22.16860630 ">DirXML</product>
<delete event-id="ADLink##112e8db8074##0" src-dn="CN=AAA
So we see an event that is a Delete. Good so far, but when we watch the trace processing the rule, we will see that the condition "if object class is User" will not be true.
This makes sense; if you look at the document you get from the AD driver, it is not talking about a user. Deleted users get moved to a hidden container off the root of the domain, called Deleted Objects.
So the fix is pretty easy: remove the test for User class, and the deletes will be caught. You should consider how you want to handle Group or other object class deletes, since a Disable login will not make much sense against a group or OU in the IDV.