On 9/13/2013 9:50 AM, alexmchugh wrote:
>
> Anyone else played with this (fantastic) piece of code and found/fixed
> any bugs?
>


One minor update to this here:
<do-if>
<arg-conditions>
<and>
<if-local-variable mode="nocase" name="MULTI-VALUED" op="equal">false</if-local-variable>
</and>
</arg-conditions>
<arg-actions>
<do-if>
<arg-conditions>
<and>
<if-op-attr name="$current-node$" op="changing"/>
<if-op-attr name="$current-node$" op="not-available"/>
</and>
</arg-conditions>
<arg-actions>
<do-clear-dest-attr-value name="$current-node$"/>
</arg-actions>
<arg-actions>
<do-set-local-variable name="VALUE" scope="policy">
<arg-string>
<token-op-attr name="$current-node$"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="TYPE" scope="policy">
<arg-string>
<token-xpath expression="(.//@type[ancestor-or-self::*[@attr-name=$current-node]])[1]"/>
</arg-string>
</do-set-local-variable>
<do-strip-op-attr name="$current-node$"/>
<do-set-dest-attr-value name="$current-node$">
<arg-value type="$TYPE$">
<token-local-variable name="VALUE"/>
</arg-value>
</do-set-dest-attr-value>
</arg-actions>
</do-if>
</arg-actions>
<arg-actions/>
</do-if>

Accounts for this use case:
<input>
<modify cached-time="20140708194950.592Z" class-name="Group" src-dn="\AAAE-TESTGROUP">
<association state="associated">ffffffff</association>
<modify-attr attr-name="adminDescription">
<remove-value>
<value timestamp="1404848945#1" type="string">somevalue</value>
</remove-value>
</modify-attr>
</modify>
</input>



--
-----------------------------------------------------------------------
Will Schneider
Knowledge Partner http://forums.netiq.com

If you find this post helpful, please click on the star below.