I want to catch a notes/domino error in an input transform and remove the association on the object being processed. Seems all fine in designer and engine trace, nevertheless the association remains on the object. Here are policy and trace, anyone able to explain this?

input transorm policy triggering on an error status coming back from the driver:


<rule>
<description>Remove association for invalid UNIDs</description>
<conditions>
<or>
<if-xpath op="true">self::status//*[contains(text(),"ID = 4091. Message: Invalid universal id")]</if-xpath>
</or>
</conditions>
<actions>
<do-set-xml-attr expression="." name="level">
<arg-string>
<token-text xml:space="preserve">error</token-text>
</arg-string>
</do-set-xml-attr>
<do-if>
<arg-conditions>
<and>
<if-xpath op="true">contains(description/text(),"Error processing note")</if-xpath>
</and>
</arg-conditions>
<arg-actions>
<do-remove-association>
<arg-association>
<token-replace-first regex="^.*Error processing note ([0-9A-F]{32}).*$" replace-with="$1">
<token-xpath expression="description/text()"/>
</token-replace-first>
</arg-association>
</do-remove-association>
</arg-actions>
<arg-actions/>
</do-if>
</actions>
</rule>



And here's the trace showing a success status for the remove-association:




[08/03/09 11:51:51.342]RV_NAMES :Remote Interface Driver: Received.
[08/03/09 11:51:51.343]RV_NAMES :
<nds dtdversion="2.0" ndsversion="8.x">
<source>
<product build="20090520_001502" instance="DRV_NAMES" version="3.5.4">Identity Manager Driver for Lotus Notes</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="0" level="warning" type="app-general">
<description>processAssociatedQueryEvent: Error processing note 0FD343EEA4521CEFC12575470031BDD4 ID = 4091. Message: Invalid universal id.</description>
</status>
</output>
</nds>
[08/03/09 11:51:51.342]RV_NAMES :Remote Interface Driver: Received document for subscriber channel
[08/03/09 11:51:51.346]RV_NAMES ST:SubscriptionShim.execute() returned:
[08/03/09 11:51:51.344]RV_NAMES ST:
<nds dtdversion="2.0" ndsversion="8.x">
<source>
<product build="20090520_001502" instance="DRV_NAMES" version="3.5.4">Identity Manager Driver for Lotus Notes</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="0" level="warning" type="app-general">
<description>processAssociatedQueryEvent: Error processing note 0FD343EEA4521CEFC12575470031BDD4 ID = 4091. Message: Invalid universal id.</description>
</status>
</output>
</nds>
[08/03/09 11:51:51.346]RV_NAMES ST:Applying input transformation policies.
[08/03/09 11:51:51.365]RV_NAMES ST:Applying policy: %+C%14Citp: disassociate on invalid UNID%-C.
[08/03/09 11:51:51.365]RV_NAMES ST: Applying to status #1.
[08/03/09 11:51:51.366]RV_NAMES ST: Evaluating selection criteria for rule 'Remove association for invalid UNIDs'.
[08/03/09 11:51:51.371]RV_NAMES ST: (if-xpath true "self::status//*[contains(text(),"ID = 4091. Message: Invalid universal id")]") = TRUE.
[08/03/09 11:51:51.368]RV_NAMES ST: Rule selected.
[08/03/09 11:51:51.368]RV_NAMES ST: Applying rule 'Remove association for invalid UNIDs'.
[08/03/09 11:51:51.368]RV_NAMES ST: Action: do-set-xml-attr("level",".","error").
[08/03/09 11:51:51.369]RV_NAMES ST: arg-string("error")
[08/03/09 11:51:51.369]RV_NAMES ST: token-text("error")
[08/03/09 11:51:51.370]RV_NAMES ST: Arg Value: "error".
[08/03/09 11:51:51.372]RV_NAMES ST: Action: do-if().
[08/03/09 11:51:51.372]RV_NAMES ST: Evaluating conditions.
[08/03/09 11:51:51.372]RV_NAMES ST: (if-xpath true "contains(description/text(),"Error processing note")") = TRUE.
[08/03/09 11:51:51.372]RV_NAMES ST: Performing if actions.
[08/03/09 11:51:51.373]RV_NAMES ST: Action: do-remove-association(direct="true",arg-association(token-replace-first("^.*Error processing note ([0-9A-F]{32}).*$","$1",token-xpath("description/text()")))).
[08/03/09 11:51:51.378]RV_NAMES ST: arg-association(token-replace-first("^.*Error processing note ([0-9A-F]{32}).*$","$1",token-xpath("description/text()")))
[08/03/09 11:51:51.379]RV_NAMES ST: token-replace-first("^.*Error processing note ([0-9A-F]{32}).*$","$1",token-xpath("description/text()"))
[08/03/09 11:51:51.376]RV_NAMES ST: token-replace-first("^.*Error processing note ([0-9A-F]{32}).*$","$1",token-xpath("description/text()"))
[08/03/09 11:51:51.376]RV_NAMES ST: token-xpath("description/text()")
[08/03/09 11:51:51.377]RV_NAMES ST: Token Value: "processAssociatedQueryEvent: Error processing note 0FD343EEA4521CEFC12575470031BDD4 ID = 4091. Message: Invalid universal id.".
[08/03/09 11:51:51.378]RV_NAMES ST: Arg Value: "processAssociatedQueryEvent: Error processing note 0FD343EEA4521CEFC12575470031BDD4 ID = 4091. Message: Invalid universal id.".
[08/03/09 11:51:51.383]RV_NAMES ST: Token Value: "0FD343EEA4521CEFC12575470031BDD4".
[08/03/09 11:51:51.380]RV_NAMES ST: Arg Value: "0FD343EEA4521CEFC12575470031BDD4".
[08/03/09 11:51:51.380]RV_NAMES ST: Direct command from policy
[08/03/09 11:51:51.381]RV_NAMES ST:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.6.10.4747">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<remove-association event-id="0">0FD343EEA4521CEFC12575470031BDD4</remove-association>
</input>
</nds>
[08/03/09 11:51:51.387]RV_NAMES ST: Pumping XDS to eDirectory.
[08/03/09 11:51:51.384]RV_NAMES ST: Performing operation remove-association for .
[08/03/09 11:51:51.378]RV_NAMES :Remote Interface Driver: Waiting for receive...
[08/03/09 11:51:51.396]RV_NAMES ST: Processing returned document.
[08/03/09 11:51:51.396]RV_NAMES ST: Processing operation <status> for .
[08/03/09 11:51:51.396]RV_NAMES ST:
DirXML Log Event -------------------
Driver: \MUMMERT-META\de\mummert\hamburg\DIRXML_DRVSET01\DRV_NAMES
Channel: Subscriber
Object: \MUMMERT-META\MUMMERT\de\users\removed\Some One
Status: Success
[08/03/09 11:51:51.402]RV_NAMES ST: Direct command from policy result
[08/03/09 11:51:51.403]RV_NAMES ST:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.6.10.4747">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="0" level="success"><application>DirXML</application>
<module>DRV_NAMES</module>
<object-dn>\MUMMERT-META\MUMMERT\de\users\removed\Some One</object-dn>
<component>Subscriber</component>
</status>
</output>
</nds>
[08/03/09 11:51:51.401]RV_NAMES ST:Policy returned:
[08/03/09 11:51:51.401]RV_NAMES ST:
<nds dtdversion="2.0" ndsversion="8.x">
<source>
<product build="20090520_001502" instance="DRV_NAMES" version="3.5.4">Identity Manager Driver for Lotus Notes</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="0" level="error" type="app-general">
<description>processAssociatedQueryEvent: Error processing note 0FD343EEA4521CEFC12575470031BDD4 ID = 4091. Message: Invalid universal id.</description>
</status>
</output>
</nds>
[08/03/09 11:51:51.404]RV_NAMES ST:Applying schema mapping policies to input.
[08/03/09 11:51:51.404]RV_NAMES ST:Applying policy: %+C%14CSchema%-C.
[08/03/09 11:51:51.404]RV_NAMES ST:Resolving association references.
[08/03/09 11:51:51.436]RV_NAMES ST:
DirXML Log Event -------------------
Driver: \MUMMERT-META\de\mummert\hamburg\DIRXML_DRVSET01\DRV_NAMES
Channel: Subscriber
Object: \MUMMERT-META\MUMMERT\de\users\removed\Some One
Status: Error
Message: Code(-9024) Unable to read current state of 0FD343EEA4521CEFC12575470031BDD4.
[08/03/09 11:51:51.442]RV_NAMES ST:End transaction.

Nevertheless, when I check the object, the association is still there:

idmserver:~ # ldapsearch -xZ -D cn=admin,o=admin -w ***** -b o=MUMMERT -s sub "(cn=Some One)" dirxml-associations | grep -A 1 DRV_NAMES
dirxml-associations: cn=DRV_NAMES,cn=DIRXML_DRVSET01,ou=hamburg,ou=mumm ert,o=de#1#0FD343EEA4521CEFC12575470031BDD4



I've also tried when="after" and direct="true" with do-remove-association and even added it to the output node directly with do-append-xml-node/text without success. Seems like the engine simply ignores everything after the initial status operation in that case, regardless of the DTD saying: "<remove-association> should generally occur when an invalid association value is sent to the driver by Identity Manager. [...] Can be included in any <output> or <input> from the driver to Identity Manager." Looks like this in a trace:



[08/03/09 12:10:33.216]RV_NAMES ST:Policy returned:
[08/03/09 12:10:33.217]RV_NAMES ST:
<nds dtdversion="2.0" ndsversion="8.x">
<source>
<product build="20090520_001502" instance="DRV_NAMES" version="3.5.4">Identity Manager Driver for Lotus Notes</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="0" level="warning" type="app-general">
<description>processAssociatedQueryEvent: Error processing note 0FD343EEA4521CEFC12575470031BDD4 ID = 4091. Message: Invalid universal id.</description>
</status>
</output>
</nds>
[08/03/09 12:10:33.217]RV_NAMES ST:Applying policy: %+C%14Citp: disassociate on invalid UNID%-C.
[08/03/09 12:10:33.219]RV_NAMES ST: Applying to status #1.
[08/03/09 12:10:33.223]RV_NAMES ST: Evaluating selection criteria for rule 'Remove association for invalid UNIDs'.
[08/03/09 12:10:33.220]RV_NAMES ST: (if-xpath true "self::status//*[contains(text(),"ID = 4091. Message: Invalid universal id")]") = TRUE.
[08/03/09 12:10:33.220]RV_NAMES ST: Rule selected.
[08/03/09 12:10:33.221]RV_NAMES ST: Applying rule 'Remove association for invalid UNIDs'.
[08/03/09 12:10:33.221]RV_NAMES ST: Action: do-set-xml-attr("level",".","error").
[08/03/09 12:10:33.221]RV_NAMES ST: arg-string("error")
[08/03/09 12:10:33.221]RV_NAMES ST: token-text("error")
[08/03/09 12:10:33.222]RV_NAMES ST: Arg Value: "error".
[08/03/09 12:10:33.227]RV_NAMES ST: Action: do-if().
[08/03/09 12:10:33.227]RV_NAMES ST: Evaluating conditions.
[08/03/09 12:10:33.227]RV_NAMES ST: (if-xpath true "contains(description/text(),"Error processing note")") = TRUE.
[08/03/09 12:10:33.224]RV_NAMES ST: Performing if actions.
[08/03/09 12:10:33.224]RV_NAMES ST: Action: do-append-xml-element("remove-association","..").
[08/03/09 12:10:33.224]RV_NAMES ST: Action: do-append-xml-text("../remove-association[last()]",token-replace-first("^.*Error processing note ([0-9A-F]{32}).*$","$1",token-xpath("description/text()"))).
[08/03/09 12:10:33.225]RV_NAMES ST: arg-string(token-replace-first("^.*Error processing note ([0-9A-F]{32}).*$","$1",token-xpath("description/text()")))
[08/03/09 12:10:33.225]RV_NAMES ST: token-replace-first("^.*Error processing note ([0-9A-F]{32}).*$","$1",token-xpath("description/text()"))
[08/03/09 12:10:33.225]RV_NAMES ST: token-replace-first("^.*Error processing note ([0-9A-F]{32}).*$","$1",token-xpath("description/text()"))
[08/03/09 12:10:33.226]RV_NAMES ST: token-xpath("description/text()")
[08/03/09 12:10:33.231]RV_NAMES ST: Token Value: "processAssociatedQueryEvent: Error processing note 0FD343EEA4521CEFC12575470031BDD4 ID = 4091. Message: Invalid universal id.".
[08/03/09 12:10:33.231]RV_NAMES ST: Arg Value: "processAssociatedQueryEvent: Error processing note 0FD343EEA4521CEFC12575470031BDD4 ID = 4091. Message: Invalid universal id.".
[08/03/09 12:10:33.228]RV_NAMES ST: Token Value: "0FD343EEA4521CEFC12575470031BDD4".
[08/03/09 12:10:33.228]RV_NAMES ST: Arg Value: "0FD343EEA4521CEFC12575470031BDD4".
[08/03/09 12:10:33.229]RV_NAMES ST:Policy returned:
[08/03/09 12:10:33.229]RV_NAMES ST:
<nds dtdversion="2.0" ndsversion="8.x">
<source>
<product build="20090520_001502" instance="DRV_NAMES" version="3.5.4">Identity Manager Driver for Lotus Notes</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="0" level="error" type="app-general">
<description>processAssociatedQueryEvent: Error processing note 0FD343EEA4521CEFC12575470031BDD4 ID = 4091. Message: Invalid universal id.</description>
</status>
<remove-association>0FD343EEA4521CEFC12575470031BDD4</remove-association>
</output>
</nds>
[08/03/09 12:10:33.235]RV_NAMES ST:Applying schema mapping policies to input.
[08/03/09 12:10:33.235]RV_NAMES ST:Applying policy: %+C%14CSchema%-C.
[08/03/09 12:10:33.235]RV_NAMES ST:Resolving association references.
[08/03/09 12:10:33.237]RV_NAMES :Remote Interface Driver: Waiting for receive...
[08/03/09 12:10:33.241]RV_NAMES ST:
DirXML Log Event -------------------
Driver: \MUMMERT-META\de\mummert\hamburg\DIRXML_DRVSET01\DRV_NAMES
Channel: Subscriber
Object: \MUMMERT-META\MUMMERT\de\users\removed\Some One
Status: Error
Message: Code(-9024) Unable to read current state of 0FD343EEA4521CEFC12575470031BDD4.
[08/03/09 12:10:33.244]RV_NAMES ST:End transaction.